Skip to content

editor: refine Connected tab geometry and visual states - #340635

Merged
Cherry Wang (chryw) merged 6 commits into
mainfrom
dev/cherwan/agents/tab-refinement-and-visual-consistency
Oct 9, 2026
Merged

Cherry Wang (chryw) merged 6 commits into
mainfrom
dev/cherwan/agents/tab-refinement-and-visual-consistency

Conversation

@chryw

@chryw Cherry Wang (chryw) commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Fix Connected tab height, spacing, border, and overflow problems while preserving the selected tab's connection to the editor.

Changes

  • Align Connected tab content heights with Pill in default and compact density, and make wrapped and separate pinned-row gutters consistent.
  • Fix shoulder gaps, clipped corners, and doubled borders, including customized backgrounds and high-contrast themes. Keep modified indicators and multi-selection visible without closing the selected tab's bottom join.
  • Prevent Close-button hover backgrounds from spilling outside the tab. In Connected and Pill, hide clean inactive Close buttons until hover or keyboard focus, regardless of action-space reservation.
  • Restore ordinary end-ellipsis filenames and keep icons on short fit tabs. Refresh fit widths when labels, decorations, or reservation settings change.
  • Prevent overlapping wrapped editor actions in the Agents Window and reveal the terminal detail tab's Close button and shoulder before Add Tab/fullscreen controls.
  • Add regression coverage for closing the final chat while scrolled fully right: scrolling clamps, the replacement terminal shoulder appears, and stale clipping clears.

Legacy styling and Pill geometry are unchanged.

Testing

  1. Enable Modern UI and select Connected. Compare default/compact density and tab heights, with wrapping and separate pinned rows on and off. Switch the selected tab between rows; check stable content heights, even gutters, and clean shoulder joins.
  2. Repeat in regular and high-contrast themes with modified tabs, multi-selection, hover, and keyboard focus. Customize tab backgrounds and borders; check the selected outline, modified indicator, and Close-button background.
  3. In Connected and Pill, toggle action-space reservation and Close visibility. Check clean inactive buttons at rest and on hover/focus, hidden disabled Close actions, and retained dirty/pin indicators. Test short and long filenames with fit and shrink sizing; close/reorder tabs and change label options.
  4. In the Agents editor/detail strip, enable wrapping and check Add Tab/fullscreen controls do not overlap. Disable wrapping, overflow the strip, and reveal the final tab at fractional zoom; its Close button and shoulder should be fully visible.
  5. In the Agents main chat strip, scroll fully right and close the final chat. Check the intended chat closes, scrolling clamps, and the new terminal shoulder is visible without a stale overflow mask.

Affected Electron/WebKit tab suites and the existing Playwright tab tests pass, as do client compilation, type-checking, and changed-file hygiene. Manually checked in Code OSS across regular and high-contrast themes, including the Agents terminal tab reveal. See Screenshots & Tests for before/after comparisons.

Fixes #340427
Fixes #339963
Fixes #339962
Fixes #339673
Fixes #338948
Fixes #338446
Fixes #337728
Fixes #337502
Fixes #337476
Fixes #336898
Fixes #326833

Cherry Wang (chryw) and others added 3 commits October 8, 2026 18:28
Align connected content heights, gutters, action targets and theme states while retaining independent convex corners and concave document joins. Preserve fit widths across transient action and editor changes, and reveal terminal tabs before sticky Add Tab controls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise the real decoration provider and resource label event path when an unreserved tab badge is added and removed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 01:33
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: fa646873 Current: e8a9854b

Changed (40)

sessions/editorHeader/editorHeader/ConnectedChangesCard/Light
Before After
before after
sessions/editorHeader/editorHeader/CompactLayoutChangesCard/Light
Before After
before after
sessions/editorHeader/editorHeader/CompactLayoutSecondTabCard/Light
Before After
before after
sessions/editorHeader/editorHeader/ConnectedSecondTabCard/Light
Before After
before after
sessions/editorHeader/editorHeader/FullHeader/Light
Before After
before after
sessions/editorHeader/editorHeader/CompactFullHeader/Light
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsAndAction/Light
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsAndSecondaryAction/Light
Before After
before after
sessions/editorHeader/editorHeader/BreadcrumbsOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/PrimaryActionOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/SecondaryActionOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/LayoutActionsOnly/Light
Before After
before after
sessions/editorHeader/editorHeader/SingleTabFullHeader/Light
Before After
before after
sessions/editorHeader/editorHeader/SingleTabCompactFullHeader/Light
Before After
before after
sessions/editorHeader/editorHeader/SingleTabDockedHeader/Light
Before After
before after
sessions/editorHeader/editorHeader/SingleTabCompactDockedHeader/Light
Before After
before after
sessions/editorHeader/editorHeader/SingleTabEmptyFiles/Light
Before After
before after
sessions/editorHeader/editorHeader/SingleTabCompactEmptyFiles/Light
Before After
before after
sessions/chatCompositeBar/StickyMessageFrame/Light
Before After
before after
sessions/chatCompositeBar/StickyMessageFrameNarrow/Light
Before After
before after
sessions/chatCompositeBar/FirstChatActive/Light
Before After
before after
sessions/chatCompositeBar/TwoChats/Light
Before After
before after
sessions/chatCompositeBar/MixedStatuses/Light
Before After
before after
sessions/chatCompositeBar/LongTitles/Light
Before After
before after
sessions/chatCompositeBar/Renaming/Light
Before After
before after
sessions/chatCompositeBar/WithDraftChat/Light
Before After
before after
sessions/chatCompositeBar/CompactTabs/Light
Before After
before after
sessions/chatCompositeBar/InactiveSession/Light
Before After
before after
sessions/chatCompositeBar/OverflowingTabs/Light
Before After
before after
editor/tabs/Colors/BorderCustomizations/ConnectedMultiSelection/FocusedEditorGroup/Light
Before After
before after
editor/tabs/Colors/BorderCustomizations/ConnectedMultiSelection/UnfocusedEditorGroup/Light
Before After
before after
editor/tabs/Colors/ColorFallbacks/SelectedTopBorder/FocusedEditorGroup/Light
Before After
before after
editor/tabs/Colors/ColorFallbacks/SelectedTopBorder/UnfocusedEditorGroup/Light
Before After
before after
editor/tabs/Colors/ColorFallbacks/UnfocusedHoverAndDividers/Light
Before After
before after
editor/tabs/Layout/ActionsUnreserved/Light
Before After
before after
editor/tabs/Layout/LongNamesFit/Light
Before After
before after
editor/tabs/Layout/LongNamesFixed/Light
Before After
before after
editor/tabs/Layout/LongNamesShrink/Light
Before After
before after
editor/tabs/Layout/ModifiedAndMultiSelected/Light
Before After
before after
editor/tabs/Layout/PinnedIconOnly/Light
Before After
before after

Added (19)

editor/tabs/Density/Compact/AcrossTabStyles/Light

current

editor/tabs/Density/Compact/SingleRow/Light

current

editor/tabs/Density/Compact/SingleTab/Light

current

editor/tabs/Density/Compact/WrappedBottomActive/Light

current

editor/tabs/Density/Compact/WrappedUpperActive/Light

current

editor/tabs/Density/Default/AcrossTabStyles/Light

current

editor/tabs/Density/Default/SingleRow/Light

current

editor/tabs/Density/Default/SingleTab/Light

current

editor/tabs/Density/Default/WrappedBottomActive/Light

current

editor/tabs/Density/Default/WrappedUpperActive/Light

current

editor/tabs/Layout/ActionsHidden/Light

current

editor/tabs/Layout/ActionsOnLeft/Light

current

editor/tabs/Layout/FileIconsMinimal/Light

current

editor/tabs/Layout/FileIconsNone/Light

current

editor/tabs/Layout/PinnedSeparateRow/Light

current

editor/tabs/Layout/ShowBreadCrumbs/Light

current

editor/tabs/Styles/Connected/Light

current

editor/tabs/Styles/Legacy/Light

current

editor/tabs/Styles/Pill/Light

current

Removed (19)

editor/tabs/Density/PinnedSeparateRow/Compact/Light

baseline

editor/tabs/Density/PinnedSeparateRow/Default/Light

baseline

editor/tabs/Density/SingleRow/Compact/Light

baseline

editor/tabs/Density/SingleRow/Default/Light

baseline

editor/tabs/Density/Wrapped/Compact/Light

baseline

editor/tabs/Density/Wrapped/Default/Light

baseline

editor/tabs/Density/WrappedBottomActive/Compact/Light

baseline

editor/tabs/Density/WrappedBottomActive/Default/Light

baseline

editor/tabs/FileIcons/Disabled/Light

baseline

editor/tabs/FileIcons/Minimal/Light

baseline

editor/tabs/Layout/ActionsLeading/Light

baseline

editor/tabs/Layout/CloseActionsHidden/Light

baseline

editor/tabs/Layout/SingleEditor/Light

baseline

editor/tabs/Scrolling/Breadcrumbs/Light

baseline

editor/tabs/Scrolling/ClippedActiveTab/Light

baseline

editor/tabs/Scrolling/StickyPinnedTabs/Light

baseline

editor/tabs/TabStyles/Connected/Light

baseline

editor/tabs/TabStyles/Legacy/Light

baseline

editor/tabs/TabStyles/Pill/Light

baseline

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.

🟡 Changes recommended

The right-clipped cap loses explicit or modified top-border paint because its overflow surrogate always uses the structural border color.

1 open finding
What changed in this PR

Refines Connected editor-tab geometry, action visibility, overflow handling, and theme-specific painting across the workbench and Agents window.

Changes:

  • Aligns Connected and Pill tab dimensions and spacing.
  • Stabilizes fit sizing, action visibility, and terminal-tab reveal.
  • Expands visual and unit coverage for themes, wrapping, and overflow.
File Description
build/​lib/​stylelint/​vscode-known-variables.json Registers new CSS properties.
src/​vs/​workbench/​browser/​parts/​editor/​editorTabsControl.ts Defines Connected tab heights.
src/​vs/​workbench/​browser/​parts/​editor/​multiEditorTabsControl.ts Updates sizing, row classification, and reveal logic.
src/​vs/​workbench/​contrib/​modernUI/​README.md Documents Connected behavior.
src/​vs/​workbench/​contrib/​modernUI/​browser/​media/​connectedEditorTabs.css Refines Connected geometry and paint ownership.
src/​vs/​workbench/​contrib/​modernUI/​browser/​media/​tabs.css Adjusts action visibility and fit sizing.
src/​vs/​workbench/​contrib/​modernUI/​test/​browser/​modernUI.contribution.test.ts Updates styling tests.
src/​vs/​workbench/​test/​browser/​componentFixtures/​editor/​tabs.fixture.ts Reorganizes tab fixtures.
src/​vs/​sessions/​browser/​parts/​chatCompositeBar.ts Adds overflow-edge structure.
src/​vs/​sessions/​browser/​parts/​media/​chatCompositeBar.css Aligns chat-tab height.
src/​vs/​sessions/​browser/​parts/​media/​editorPart.css Updates Agents HC framing.
src/​vs/​sessions/​test/​browser/​chatCompositeBar.test.ts Covers terminal-chat closure and overflow.
src/​vs/​sessions/​test/​browser/​editorPart.test.ts Updates Connected detail-tab assertions.

🧠 Review effort: Balanced


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

Comment thread src/vs/workbench/contrib/modernUI/browser/media/connectedEditorTabs.css Outdated
Carry explicit and modified top paint independently through overflow caps, include terminal rounding clearance in reveal, and update existing cross-browser fixture assertions to the new paint owners. Repair repository fixture formatting and Agents layout expectations discovered by CI.

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.

🔵 Needs a closer look

Cross-cutting visual geometry, high-contrast painting, fractional zoom, and overflow behavior warrant final human visual review.

0 open findings

1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Qualify README claim that Pill behavior is wholly unchanged

src/​vs/​workbench/​contrib/​modernUI/​README.md:29

This sentence contradicts both this PR and the later action-space sections: Pill now receives the Close-visibility and fit-width reservation changes in tabs.css/multiEditorTabsControl.ts. Qualify the statement as geometry-only so the README does not claim Pill behavior is wholly unchanged.

🧠 Review effort: Balanced

Qualify the geometry claim so it does not contradict the shared action-space and Close-visibility fixes described below.

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.

🔵 Needs a closer look

The shared multi-selection border still closes bottom-row Connected active tabs in regular themes.

0 open findings

Previously missed (1)

In code that hasn't changed since last review

Medium severity Avoid bottom border on bottom-row Connected active tab fills

src/​vs/​workbench/​contrib/​modernUI/​browser/​media/​tabs.css:389

Exclude bottom-row Connected active multi-selections from this fill border. connectedEditorTabs.css:315-317 already moves their selection color onto the outer cap, but this rule also adds a bottom border to .tab-fill, closing the active tab's connection to the document in regular themes. High-contrast explicitly clears that fill border, and upper-row Connected tabs have their own border rule.

🧠 Review effort: Balanced

Restrict the shared closed fill outline to Pill active multi-selections; Connected caps and upper pills use their existing dedicated painters. Cover the open document join in regular themes at both tab heights and wrapping states.

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.

🔵 Needs a closer look

Disabled Close actions remain visibly rendered on clean active tabs.

0 open findings

Previously missed (1)

In code that hasn't changed since last review

Medium severity Hide clean active Close action when tabActionCloseVisibility is false

src/​vs/​workbench/​contrib/​modernUI/​browser/​media/​tabs.css:624

The new :not(.active) exclusion leaves a clean active tab with tabActionCloseVisibility: false visibly showing the disabled Close icon: the base active-tab rule gives it opacity, while .close-action-off only disables pointer events. Keep active Close buttons visible when enabled, but explicitly hide clean .close-action-off actions so the setting still removes the control.

🧠 Review effort: Balanced

@chryw
Cherry Wang (chryw) marked this pull request as ready for review October 9, 2026 02:30
@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/sessions/browser/parts/chatCompositeBar.ts
  • src/vs/sessions/browser/parts/media/chatCompositeBar.css
  • src/vs/sessions/browser/parts/media/editorPart.css
  • src/vs/workbench/browser/parts/editor/editorTabsControl.ts
  • src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts

@chryw

Copy link
Copy Markdown
Contributor Author

Follow-up on the review-summary concerns:

  • Pill documentation: corrected in fc51556. The README now distinguishes unchanged Pill geometry from the shared Close-visibility and action-space fixes.
  • Connected multi-selection: addressed in 2699578 by excluding Connected active fills from the shared multi-selection border rule. Added regular-theme regression coverage for both tab heights and wrapped/single rows; the document join stays open.
  • Disabled Close visibility: verified not reproducible. The base editor rule sets the clean disabled action container to display: none, independently of the icon opacity. Confirmed in native Code OSS for Pill and Connected, regular and HC themes, with reservation on/off. No additional CSS override is needed.

The earlier clipped-top-paint inline finding is fixed and its thread resolved. Geometry and hover states were manually reviewed in Component Explorer and Code OSS. CI is still running, with no failures currently reported.

@chryw
Cherry Wang (chryw) merged commit a64c64a into main Oct 9, 2026
36 checks passed
@chryw
Cherry Wang (chryw) deleted the dev/cherwan/agents/tab-refinement-and-visual-consistency branch October 9, 2026 05:12
@vs-code-engineering vs-code-engineering Bot added this to the 1.142.0 milestone Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment