Skip to content

github-authentication - simplify avatar persistence - #331061

Open
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
mainfrom
dev/dmitriv/account-avatar-simplify
Open

github-authentication - simplify avatar persistence#331061
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
mainfrom
dev/dmitriv/account-avatar-simplify

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #308654, which introduced authSessionAccountIcon and account avatar support.

This PR applies Tyler's review cleanup to the GitHub Authentication session-persistence implementation:

  • Derives the stored icon component type from vscode.Uri.from instead of maintaining a duplicate URI-components interface.
  • Relies on native vscode.Uri JSON serialization instead of manually rebuilding stored URI components.
  • Stops making /user requests solely to backfill icons for sessions that already contain account information.
  • Removes the no-avatar null sentinel, WeakSet cache, manual pruning, serialization helpers, and their helper-only tests.

New sessions and legacy accountless sessions still receive and persist avatars during their already-required /user lookup. Existing accountful sessions created before avatar support remain valid and iconless until naturally recreated or refreshed.

Validation

  • GitHub Authentication extension compilation passed.
  • ESLint passed.
  • GitHub Authentication extension suite: 26 passing.
  • git diff --check passed.

Copilot AI balanced review requested due to automatic review settings August 16, 2026 07:50
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added feature-request Request for new features or functionality api-proposal authentication Issues with the Authentication platform authentication-github Issues with the GitHub Authentication extension agents-window labels Aug 16, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) force-pushed the dev/dmitriv/account-avatar-simplify branch from d5c211d to 9188490 Compare August 16, 2026 07:53
@dmitrivMS Dmitriy Vasyura (dmitrivMS) removed api-proposal agents-window feature-request Request for new features or functionality labels Aug 16, 2026
@dmitrivMS Dmitriy Vasyura (dmitrivMS) changed the title authentication - add session account icons github-authentication - simplify avatar persistence Aug 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Simplifies avatar persistence in the GitHub Authentication provider while preserving avatar lookup for new and legacy accountless sessions.

Changes:

  • Uses native URI serialization and inferred URI component types.
  • Removes redundant avatar lookup, caching, and serialization helpers.
  • Removes helper-specific tests made obsolete by the simplification.
Show a summary per file
File Description
extensions/github-authentication/src/github.ts Simplifies session and avatar persistence.
extensions/github-authentication/src/test/github.test.ts Removes obsolete helper tests.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

authentication Issues with the Authentication platform authentication-github Issues with the GitHub Authentication extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants