Skip to content

Fix missing tab icons for short file names - #339489

Closed
Marc Mueller (cdce8p) wants to merge 2 commits into
microsoft:mainfrom
cdce8p-forks:fix-missing-tab-icons
Closed

Marc Mueller (cdce8p) wants to merge 2 commits into
microsoft:mainfrom
cdce8p-forks:fix-missing-tab-icons

Conversation

@cdce8p

Copy link
Copy Markdown
Contributor

With the ModernUI enabled and "workbench.experimental.modernUIEditorTabStyle": "connected" (the default), the icon is missing for short file names, even with "workbench.editor.tabSizing": "fit" (the default). This PR restores the "old" behavior and only shrinks / removes the icon if tabSizing is set to fixed or shrink.

Fixes: #338171

Before

Screenshot 2026-10-03 at 19 20 27

After

Screenshot 2026-10-03 at 19 19 28

The overflow will move to the horizontal scroll bar

Screenshot 2026-10-03 at 19 21 48

Copilot AI balanced review requested due to automatic review settings October 3, 2026 17:32
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts

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.

Copilot review overview

🟡 Changes recommended

The group-wide guard also disables necessary icon collapsing for shrink-sized sticky tabs.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Restores icons for short filenames in Modern UI connected editor tabs, addressing #338171.

Changes:

  • Skips icon collapsing when the group uses fit sizing.
  • Adds checks for icon and filename preservation across layout widths.
File Description
src/​vs/​workbench/​test/​browser/​parts/​editor/​multiEditorTabsControl.test.ts Adds connected fit-tab layout coverage.
src/​vs/​workbench/​browser/​parts/​editor/​multiEditorTabsControl.ts Guards icon collapsing by group tab sizing.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts Outdated
Comment on lines +386 to +387
override getName(): string { return `file${i}.txt`; }
}(URI.file(`/path/file${i}.txt`), 'testEditorInput'));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not necessary. The test still checks that connected-tab-narrow isn't added.

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.

Copilot review overview

🔵 Needs a closer look

The regression test needs short filenames to exercise the reported failure and detect removal of the fix.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

@cdce8p

Copy link
Copy Markdown
Contributor Author

This issue seems to be resolved on main. Likely with #340635. Closing the PR.

@cdce8p
Marc Mueller (cdce8p) deleted the fix-missing-tab-icons branch October 10, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The tab icon is missing if the filename is 'git', regardless of its extension.

6 participants