Skip to content

Fix overlapping issues when multiple compact tabs are pinned#325195

Open
hawkticehurst wants to merge 5 commits into
mainfrom
agents/fix-vscode-compact-pinned-tabs
Open

Fix overlapping issues when multiple compact tabs are pinned#325195
hawkticehurst wants to merge 5 commits into
mainfrom
agents/fix-vscode-compact-pinned-tabs

Conversation

@hawkticehurst

@hawkticehurst hawkticehurst commented Jul 9, 2026

Copy link
Copy Markdown
Member

Fixes #325136

Changes:

  • Added a solid pinned-tab background so scrolling tabs no longer show through / overlap with unpinned tabs
  • Reduced compact pinned tabs width to better fit their icons
  • Optically centered pinned-tab icons by knudging them 1px to the left
Screen.Recording.2026-07-10.at.4.56.17.PM.mov

@hawkticehurst hawkticehurst self-assigned this Jul 9, 2026
Copilot AI review requested due to automatic review settings July 9, 2026 21:30

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

This PR fixes issue #325136, where non-pinned editor tabs overlap pinned tabs when the modern/experimental UI is enabled together with pinnedTabSizing: "compact" and pinnedTabsOnSeparateRow: false. The root cause is that the modern-UI style override adds a margin-right: 4px pill spacing to every tab, but the layout math that reserves horizontal space for sticky tabs (and positions them via left) only used the raw compact tab width, underestimating the real slot width and causing overlap.

Changes:

  • Extracts the duplicated sticky-tab-width switch into a single getStickyTabWidth() helper, used by both the per-tab left positioning and the stickyTabsWidth layout computation.
  • Adds STYLE_OVERRIDE_COMPACT_PINNED_TAB_SPACING (4px) to the compact width when the tabs live inside a .style-override container, so the reserved width matches the actual pill + margin footprint.
  • Adds CSS to pin sticky-compact tabs to a fixed 38px width (re-asserting it over the modern-UI sizing-fit rule) and to strip inner icon/label spacing.

Reviewed changes

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

File Description
src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts Refactors sticky-tab width into getStickyTabWidth() and adds modern-UI spacing to the compact branch.
src/vs/workbench/contrib/styleOverrides/browser/media/tabs.css Adds sticky-compact fixed-width and inner-spacing overrides so compact pinned tabs render as consistent pills.

One concern worth addressing: in modern-UI mode the same 4px tab margin also applies to sticky-shrink tabs, but getStickyTabWidth('shrink') does not add the spacing, so pinnedTabSizing: "shrink" can still reproduce the overlap this PR fixes for compact.

Comment thread src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts
@hawkticehurst hawkticehurst marked this pull request as ready for review July 10, 2026 21:03
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

@benibenj

Matched files:

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

@hawkticehurst hawkticehurst requested a review from Copilot July 10, 2026 21:05
@hawkticehurst hawkticehurst changed the title [WIP] Fix overlapping issues when multiple compact tabs are pinned Fix overlapping issues when multiple compact tabs are pinned Jul 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

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

Comment thread src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts
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.

Workbench tabs overlapping with experimental UI

3 participants