Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a toolbar with previous, next, and dismiss buttons to the chat tip widget, addressing issue #295172. The toolbar appears on hover/focus and provides navigation through available tips without permanently dismissing them.
Changes:
- Added CSS styling for the new toolbar with fade-in/fade-out transitions on hover/focus
- Implemented three toolbar actions (previous, next, dismiss) and registered them to a new MenuId
- Added navigation methods to ChatTipService to cycle through non-dismissed tips
- Integrated MenuWorkbenchToolBar into ChatTipContentPart to render the toolbar
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| chatTipContent.css | Added CSS for toolbar positioning, fade transitions, and button styling |
| chatTipContentPart.ts | Added toolbar instantiation in _renderTip, registered three new Action2 classes for navigation and dismiss, added _suppressNextDismissHandler flag |
| chatTipService.ts | Added navigateToNextTip and navigateToPreviousTip methods to IChatTipService interface, implemented _navigateTip helper method |
| actions.ts | Registered new MenuId.ChatTipToolbar for the tip toolbar menu |
Comments suppressed due to low confidence (4)
src/vs/workbench/contrib/chat/browser/chatTipService.ts:801
- If all tips except the current one are dismissed, navigation returns undefined instead of staying on the current tip or wrapping to the current tip. This differs from the behavior in
_pickTip()which has a fallback to always return a tip (line 758). Consider either returning the current tip when no other tips are available, or wrapping back to the current tip after checking all possibilities.
const idx = ((currentIndex + direction * i) % TIP_CATALOG.length + TIP_CATALOG.length) % TIP_CATALOG.length;
const candidate = TIP_CATALOG[idx];
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.ts:174
- The navigation action calls
navigateToNextTipbut ignores the returned tip and doesn't trigger any UI update. The same issue exists as in the previous action - clicking next/previous won't actually change the displayed tip.
const contextKeyService = accessor.get(IContextKeyService);
chatTipService.navigateToNextTip(contextKeyService);
}
});
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.ts:69
- The
_suppressNextDismissHandlerflag is set but never actually set to true anywhere. The intent seems to be to prevent the dismiss event from triggering when navigating to a new tip, but since navigation doesn't fire the dismiss event (and doesn't update the UI at all), this flag is currently unused. Once navigation is fixed to properly update the UI, you'll need to either fire a dismiss event and use this flag, or implement a different event likeonDidNavigateTip.
this._renderTip(nextTip);
} else {
this._onDidHide.fire();
}
src/vs/workbench/contrib/chat/browser/chatTipService.ts:780
- The
_contextKeyServiceparameter is prefixed with underscore (indicating it's unused) but is declared as a parameter. If the context key service isn't needed for eligibility checks in navigation, it shouldn't be passed as a parameter. If it is needed, remove the underscore prefix and use it to call_isEligible()similar to how_pickTip()works.
navigateToNextTip(contextKeyService: IContextKeyService): IChatTip | undefined {
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.ts
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit 576aa1b.
Tyriar
approved these changes
Feb 13, 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.
fix #295172
To do:
whentips container focused for screen reader userstips-demo.mov