sessions: show GitHub avatar in account widget#310222
Merged
hawkticehurst merged 2 commits intoApr 15, 2026
Merged
Conversation
Prefer the signed-in GitHub profile image in the sessions titlebar account widget while keeping the existing codicon fallback for loading, signed-out, non-GitHub, and failed-image states. Also add localized avatar alt text and sync the sessions docs with the current titlebar account widget implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
osortega
previously approved these changes
Apr 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GitHub avatar rendering to the Sessions (Agent Sessions) titlebar account widget, while preserving the existing codicon fallback behavior and updating related docs/tests.
Changes:
- Add
getAccountProfileImageUrlhelper and unit tests for GitHub avatar URL generation. - Update the Sessions titlebar account widget to load/show a GitHub avatar image with codicon fallback and new styling.
- Sync Sessions documentation to reflect the current titlebar account widget behavior/location.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/accountMenu/test/browser/accountTitleBarState.test.ts | Adds coverage for GitHub profile image URL generation and fallback behavior. |
| src/vs/sessions/contrib/accountMenu/browser/media/accountTitleBarWidget.css | Adds styles to toggle between codicon and avatar image display. |
| src/vs/sessions/contrib/accountMenu/browser/accountTitleBarState.ts | Introduces getAccountProfileImageUrl to build the GitHub avatar URL. |
| src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts | Renders an <img> avatar, preloads it, and toggles visibility vs. codicon fallback. |
| src/vs/sessions/README.md | Updates feature/docs text to match titlebar account widget behavior. |
| src/vs/sessions/LAYOUT.md | Updates layout docs to reflect titlebar account widget and avatar preference. |
Only expose the GitHub-specific avatar alt text when a GitHub avatar is actually rendered, and apply no-referrer to the preload image as well. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Yoyokrazy
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related to #310014
Testing
npm run compile-check-ts-nativenode --experimental-strip-types build/hygiene.ts src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts src/vs/sessions/contrib/accountMenu/browser/accountTitleBarState.ts src/vs/sessions/contrib/accountMenu/browser/media/accountTitleBarWidget.css src/vs/sessions/contrib/accountMenu/test/browser/accountTitleBarState.test.ts src/vs/sessions/README.md src/vs/sessions/LAYOUT.mdNotes
app.setPathon an undefinedapp).