sessions: ensure account/update widgets render with icons#312645
Merged
sessions: ensure account/update widgets render with icons#312645
Conversation
…sectionObserver fires actionViewItemService.register() does not fire onDidChange when a factory is it only fires when the optional `event` argument fires.registered This caused a race: if the toolbar's IntersectionObserver fired its first visible callback (and called _updateToolbar()) before AccountWidgetContribution registered its view item factories, the toolbar rendered text-label fallbacks and was never notified to re-render with the custom widgets. Fix by passing a shared Emitter to both register() calls and firing it once after both factories are in place. This triggers IActionViewItemService.onDidChange for Menus.TitleBarRightLayout regardless of ordering, so the toolbar always re-renders with TitleBarAccountWidget / TitleBarUpdateWidget. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the sessions window titlebar account/update widgets’ registration timing so the custom action view items are available when the titlebar toolbar is first built (ensuring the intended icon/widget rendering shows up reliably).
Changes:
- Keep the titlebar actions registered at module-load time so
Menus.TitleBarRightLayoutis non-empty during initial toolbar construction. - Register the
AccountWidgetContributionearlier (WorkbenchPhase.BlockRestore) so the customIActionViewItemServicemappings are in place before the toolbar renders.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts | Moves the custom view-item registration earlier in lifecycle and trims the explanatory comment for module-level action registration. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
justschen
approved these changes
Apr 27, 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.
No description provided.