Skip to content

Show keybinding in Toggle Search Details tooltip - #311859

Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
microsoft:mainfrom
yogeshwaran-c:fix/search-toggle-details-tooltip-keybinding-131484
Jul 29, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 2 commits into
microsoft:mainfrom
yogeshwaran-c:fix/search-toggle-details-tooltip-keybinding-131484

Conversation

@yogeshwaran-c

Copy link
Copy Markdown
Contributor

Summary

The "Toggle Search Details" button in the search view shows a tooltip but does not include the configured keybinding — even though the command workbench.action.search.toggleQueryDetails has Ctrl+Shift+J bound by default.

Fix

Use keybindingService.appendKeybinding(label, commandId) on the hover label, matching the pattern already used in the same file for:

  • appendSearchWithAIButton (line 1741)
  • appendSearchInOpenedEditorsMessage (line 2043)

One-line change, single file.

Test plan

  • Open search view, hover the chevron/"Toggle Search Details" button
  • Tooltip shows "Toggle Search Details (Ctrl+Shift+J)" (or the user's custom binding)

Fixes #131484

The Toggle Search Details button's hover tooltip showed a static label,
unlike other search view buttons that use
keybindingService.appendKeybinding(label, commandId) to surface the
configured shortcut (see appendSearchWithAIButton at line 1741 and
appendSearchInOpenedEditorsMessage at line 2043 in the same file).

Use the same pattern so the button's tooltip reflects
workbench.action.search.toggleQueryDetails (Ctrl+Shift+J by default).

Fixes microsoft#131484
Copilot AI review requested due to automatic review settings July 28, 2026 23:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds the configured keybinding to the “Toggle Search Details” tooltip.

Changes:

  • Uses appendKeybinding to display the active default or custom shortcut.
Show a summary per file
File Description
src/vs/workbench/contrib/search/browser/searchView.ts Appends the toggle command’s keybinding to its hover label.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 0f90552 into microsoft:main Jul 29, 2026
29 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 29, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] "Toggle Search Details" doesn't show keybinding when hovering over

5 participants