Skip to content

Render GitHub profile image in workbench#319510

Draft
hawkticehurst wants to merge 4 commits into
mainfrom
agents/update-vscode-profile-icon-github
Draft

Render GitHub profile image in workbench#319510
hawkticehurst wants to merge 4 commits into
mainfrom
agents/update-vscode-profile-icon-github

Conversation

@hawkticehurst
Copy link
Copy Markdown
Member

@hawkticehurst hawkticehurst commented Jun 2, 2026

In alignment with agents window start rendering GitHub profile image instead of default user icon in VS Code core when logged into GitHub account.

Fallback to default user icon when logged out or logged into other non-GitHub accounts.

Screenshot 2026-06-01 at 11 53 51 PM Screenshot 2026-06-01 at 11 54 07 PM

@hawkticehurst hawkticehurst self-assigned this Jun 2, 2026
Copilot AI review requested due to automatic review settings June 2, 2026 04:01
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

This PR updates the workbench “Accounts” action (activity bar + title bar) to render a GitHub avatar image when the user is signed in with a GitHub account, and fall back to the default accounts icon otherwise.

Changes:

  • Add an <img> element to the Accounts activity item and dynamically toggle between codicon vs. avatar rendering.
  • Add CSS rules for the new avatar container class in the activity bar and title bar.
  • Preload the avatar URL and only switch to the avatar once the image loads successfully.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css Styles the account avatar image in the title bar action toolbar.
src/vs/workbench/browser/parts/globalCompositeBar.ts Adds avatar DOM + image loading logic for the Accounts activity item.
src/vs/workbench/browser/parts/activitybar/media/activityaction.css Styles the avatar container and prevents text-label padding rules from applying to the avatar container.

Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts Outdated
Comment thread src/vs/workbench/browser/parts/globalCompositeBar.ts
@abhijit-chikane
Copy link
Copy Markdown
Contributor

Right now agents window doesn’t show the profile image if we logged in using the enterprise github copilot account @hawkticehurst @TylerLeonhardt

@hawkticehurst
Copy link
Copy Markdown
Member Author

Right now agents window doesn’t show the profile image if we logged in using the enterprise github copilot account @hawkticehurst @TylerLeonhardt

Thanks for the heads up. Once this is merged I can toss up another PR that adds enterprise support to agents window

@lramos15
Copy link
Copy Markdown
Member

lramos15 commented Jun 4, 2026

@hawkticehurst the enterprise avatar URLs cannot be statically constructed and require an API request that we should likely cache in some way. Just a heads up. Here's an example https://github.com/microsoft/vscode-copilot/pull/6340

We already calculate the enterprise url in defaultAccount so reusing that when possible would be good

@hawkticehurst hawkticehurst marked this pull request as draft June 5, 2026 15:49
@hawkticehurst
Copy link
Copy Markdown
Member Author

@hawkticehurst the enterprise avatar URLs cannot be statically constructed and require an API request that we should likely cache in some way. Just a heads up. Here's an example microsoft/vscode-copilot#6340

We already calculate the enterprise url in defaultAccount so reusing that when possible would be good

Oh amazing, thank you for the heads up! I've converted this PR to draft and will make that change on Monday

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.

5 participants