Avoid flicker when checkpoint toolbar appears on request#298501
Merged
roblourens merged 1 commit intomainfrom Feb 28, 2026
Merged
Avoid flicker when checkpoint toolbar appears on request#298501roblourens merged 1 commit intomainfrom
roblourens merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a UI flicker/height jump in the chat list by ensuring MenuWorkbenchToolBar instances can synchronously populate actions immediately after context keys are updated, instead of waiting for the menu’s debounced change event.
Changes:
- Added
MenuWorkbenchToolBar.refresh()to force an immediate synchronous re-evaluation of menu actions. - Refactored
MenuWorkbenchToolBar’s internal update closure into a private method with stored state. - Updated the chat list renderer to call
refresh()on relevant toolbars after setting context keys, and removed the prioreventDebounceDelay: 0workaround on the footer toolbar.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/platform/actions/browser/toolbar.ts | Adds a synchronous refresh() API and refactors menu-driven toolbar update logic into a method. |
| src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts | Forces immediate toolbar action evaluation after context key updates to avoid visible layout shifts. |
alexdima
approved these changes
Feb 28, 2026
DonJayamanne
pushed a commit
that referenced
this pull request
Mar 2, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When scrolling to a request row in the chat list, the checkpoint toolbar (and other
MenuWorkbenchToolBarinstances) would not populate their actions until after the debounced menu change event fired (~50-100ms after context keys were set inrenderElement). This caused a visible height jump as the toolbar went from empty to populated.Changes
src/vs/platform/actions/browser/toolbar.tsrefresh()method toMenuWorkbenchToolBarthat forces an immediate synchronous re-evaluation of menu actionsupdateToolbarclosure to a private_updateToolbar()method, storing the necessary state (_menu,_menuOptions,_toolbarOptions,_container) as class fieldssrc/vs/workbench/contrib/chat/browser/widget/chatListRenderer.tsrenderChatTreeItem, callrefresh()on all four toolbars (title, footer, checkpoint, checkpoint restore) to force synchronous action evaluationeventDebounceDelay: 0workaround from the footer toolbar(Written by Copilot)
cc @jrieken