Skip to content

Add configurable hover title verbosity for editor tabs#293510

Open
murataslan1 wants to merge 1 commit intomicrosoft:mainfrom
murataslan1:codex/issue-163166-tab-hover-mode
Open

Add configurable hover title verbosity for editor tabs#293510
murataslan1 wants to merge 1 commit intomicrosoft:mainfrom
murataslan1:codex/issue-163166-tab-hover-mode

Conversation

@murataslan1
Copy link
Contributor

@murataslan1 murataslan1 commented Feb 6, 2026

Fixes #163166.

Summary

  • add a new setting workbench.editor.tabHoverMode with values default, short, medium, long
  • map the configured tab hover mode to editor title verbosity when rendering editor tab hovers
  • keep existing behavior by default (default maps to long/absolute path style)
  • add a regression test for hover mode to verbosity mapping

Test Plan

  • npx tsx ./node_modules/mocha/bin/mocha --ui tdd src/vs/workbench/test/common/editor.test.ts --timeout 10000

Copilot AI review requested due to automatic review settings February 6, 2026 18:58
@vs-code-engineering
Copy link

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/editor/editor.ts
  • src/vs/workbench/browser/parts/editor/editorTabsControl.ts
  • src/vs/workbench/browser/workbench.contribution.ts
  • src/vs/workbench/common/editor.ts

@bpasero bpasero self-assigned this Feb 6, 2026
@bpasero bpasero added this to the Backlog milestone Feb 6, 2026
Copy link
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

Adds a new workbench setting to control how verbose editor tab hover titles are, wiring it into the tab hover rendering via existing EditorInput.getTitle(Verbosity) behavior.

Changes:

  • Introduces workbench.editor.tabHoverMode (default/short/medium/long) as a configurable setting.
  • Maps tabHoverMode to Verbosity and uses it when computing editor tab hover titles.
  • Adds a regression test to validate the mapping behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/vs/workbench/test/common/editor.test.ts Adds a unit test covering tab-hover-mode → Verbosity mapping.
src/vs/workbench/common/editor.ts Introduces TabHoverMode and getEditorHoverVerbosity, and extends editor part config to include tabHoverMode.
src/vs/workbench/browser/workbench.contribution.ts Registers the new workbench.editor.tabHoverMode setting and its descriptions.
src/vs/workbench/browser/parts/editor/editorTabsControl.ts Applies the configured hover mode when generating tab hover titles.
src/vs/workbench/browser/parts/editor/editor.ts Adds default + validation for tabHoverMode in editor part options.

Comment on lines +157 to +163
localize('workbench.editor.tabHoverMode.default', "Show the title in the default format."),
localize('workbench.editor.tabHoverMode.short', "Show the file name."),
localize('workbench.editor.tabHoverMode.medium', "Show the file path relative to the workspace folder."),
localize('workbench.editor.tabHoverMode.long', "Show the absolute file path.")
],
'default': 'default',
'description': localize('workbench.editor.tabHoverMode', "Controls the format of the title shown from editor tabs when hovered."),
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The new workbench.editor.tabHoverMode setting descriptions are a bit misleading relative to the implemented behavior: default is mapped to Verbosity.LONG (absolute path), but the enum description says "default format" without indicating it matches the existing absolute-path tooltip. Consider updating the default enum description (and/or the setting description) to explicitly state what is shown for default, and tweak the phrasing "shown from editor tabs when hovered" to the more standard "shown when hovering over editor tabs" for clarity.

Suggested change
localize('workbench.editor.tabHoverMode.default', "Show the title in the default format."),
localize('workbench.editor.tabHoverMode.short', "Show the file name."),
localize('workbench.editor.tabHoverMode.medium', "Show the file path relative to the workspace folder."),
localize('workbench.editor.tabHoverMode.long', "Show the absolute file path.")
],
'default': 'default',
'description': localize('workbench.editor.tabHoverMode', "Controls the format of the title shown from editor tabs when hovered."),
localize('workbench.editor.tabHoverMode.default', "Show the absolute file path (default)."),
localize('workbench.editor.tabHoverMode.short', "Show the file name."),
localize('workbench.editor.tabHoverMode.medium', "Show the file path relative to the workspace folder."),
localize('workbench.editor.tabHoverMode.long', "Show the absolute file path.")
],
'default': 'default',
'description': localize('workbench.editor.tabHoverMode', "Controls the format of the title shown when hovering over editor tabs."),

Copilot uses AI. Check for mistakes.
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.

File/Editor tab hover content customization

2 participants