Skip to content

sessions: show GitHub avatar in account widget#310222

Merged
hawkticehurst merged 2 commits into
microsoft:mainfrom
hawkticehurst:agents/artificial-ape
Apr 15, 2026
Merged

sessions: show GitHub avatar in account widget#310222
hawkticehurst merged 2 commits into
microsoft:mainfrom
hawkticehurst:agents/artificial-ape

Conversation

@hawkticehurst
Copy link
Copy Markdown
Member

@hawkticehurst hawkticehurst commented Apr 15, 2026

Summary

Related to #310014

  • render the signed-in GitHub profile image in the sessions titlebar account widget
  • keep the existing account codicon as the fallback for loading, signed-out, non-GitHub, and failed-image cases
  • add localized avatar alt text and sync the sessions docs with the current titlebar account widget implementation
Screenshot 2026-04-15 at 4 29 47 PM

Testing

  • npm run compile-check-ts-native
  • node --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.md

Notes

  • The Electron unit-test harness did not run successfully in this environment because it crashed before test execution (app.setPath on an undefined app).

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>
Copilot AI review requested due to automatic review settings April 15, 2026 20:33
osortega
osortega previously approved these changes Apr 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 getAccountProfileImageUrl helper 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.

Comment thread src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts Outdated
Comment thread src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts
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>
@hawkticehurst hawkticehurst merged commit 9b80405 into microsoft:main Apr 15, 2026
25 of 26 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 15, 2026
@hawkticehurst hawkticehurst deleted the agents/artificial-ape branch April 22, 2026 21:56
@hawkticehurst hawkticehurst self-assigned this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants