Skip to content

sessions: balance chat and detail tab spacing - #340823

Open
Cherry Wang (chryw) wants to merge 3 commits into
mainfrom
dev/cherwan/agents/agents-window-chat-tab-spacing-fix
Open

Cherry Wang (chryw) wants to merge 3 commits into
mainfrom
dev/cherwan/agents/agents-window-chat-tab-spacing-fix

Conversation

@chryw

Copy link
Copy Markdown
Contributor

Balance label and Close-button spacing in Agents-window chat tabs, and keep detail-pane icon insets consistent without changing ordinary editor-tab geometry.

Follow-up to #340635. Fixes #336471. Related to #331234 and #339782; these broader spacing reports are non-closing references.

Changes

  • Separate standalone chat-tab padding from editor file-icon gutters. Use logical toolbar spacing and a compact trailing inset only when a chat has tab actions.
  • Give docked detail tabs their own leading icon inset, preserving the RTL file-icon gutter and excluding modal editors.
  • Preserve Connected RTL shoulders and aligned terminal outlines without an opaque cap covering labels. For an actually right-clipped tab, retain a stroke-only viewport boundary; distinguish real clipping from rounded clientWidth at fractional widths.
  • Use a border-based strip separator and cover RTL scrolling, terminal closing, tab rebuilding, and clipping-state disposal.

Testing

  1. Enable Modern UI with Connected tabs. Open a main chat and related chats; compare their label and Close-button spacing in LTR and RTL.
  2. With running chats, hover an inactive tab and its Close button, then switch the active chat. Check readable labels, compact trailing spacing, and unobstructed actions. Repeat with Pill tabs.
  3. Overflow the Connected strip in RTL. Partially clip an active nonterminal tab at either viewport edge, then reveal and close the terminal chat. Check the visible outline, replacement shoulder, scroll clamping, and removal of stale clipping paint in regular and high-contrast themes.
  4. Check aligned RTL tabs at fractional widths and zoom levels: alignment must not create an extra viewport stroke. Verify the docked Changes tab with file icons enabled and disabled.
  5. Compare ordinary editor tabs, including compact, sticky, action-reservation, and high-contrast states, with the behavior from editor: refine Connected tab geometry and visual states #340635.

Local validation:

  • npm run build-fast -- --client-only — passed.
  • ./scripts/test.sh --run src/vs/sessions/test/browser/chatCompositeBar.test.ts --run src/vs/workbench/test/browser/parts/editor/multiEditorTabsControl.test.ts --reporter dot — passed.
  • npm run typecheck-client — passed.
  • Changed-file ESLint and Stylelint — passed.
  • Headless component renders preserve exact same-platform editor image bytes against the clean base and chat/detail image bytes against the approved reference. Direct raster checks verify the visible high-contrast RTL viewport stroke.
  • Independent local code review and read-only Copilot CLI review completed; the RTL truncation finding is addressed.

Visual comparison

Matched dark-theme, running-chat scenes at the same viewport, zoom, and device scale; spinner animation is frozen. An inactive Close button is hovered.

Before:

Before: inactive Close hover with the wider trailing inset

After:

After: inactive Close hover with the compact trailing inset

Corner-contour refinement and wrapped editor-action overlap are separate workstreams; this PR does not claim to resolve them.

baseline-running-tabs-inactive-close-hover

candidate-running-tabs-inactive-close-hover

Preserve editor icon gutters, logical chat action spacing, and Connected RTL outlines at aligned and genuinely clipped viewport edges.

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

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 04861ffb Current: 931cf243

Changed (33)

sessions/grid/sessionsGrid/SidePanelGap/Light
Before After
before after
sessions/grid/sessionsGrid/PillSidePanelGap/Light
Before After
before after
sessions/grid/sessionsGrid/JustifiedPillSideAndBottomPanelGap/Light
Before After
before after
sessions/grid/sessionsGrid/MultipleChats/Light
Before After
before after
sessions/grid/sessionsGrid/RelatedChats/Light
Before After
before after
sessions/grid/sessionsGrid/MixedRelatedChats/Light
Before After
before after
sessions/grid/sessionsGrid/PillChatTabs/Light
Before After
before after
sessions/grid/sessionsGrid/NestedChatGroups/Light
Before After
before after
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/blockedSessionsList/BlockedSessionsList_FixCIAndApproval/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
sessions/chatCompositeBar/PillTabs/Light
Before After
before after

Added (3)

sessions/grid/sessionsGrid/SidePanelGapRtl/Light

current

sessions/grid/sessionsGrid/SidePanelGapRtlNoFileIcons/Light

current

sessions/grid/sessionsGrid/RelatedChatsRtl/Light

current

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.

🟢 Approval recommended

The spacing and RTL changes are focused, lifecycle-safe, and comprehensively covered by targeted tests and fixtures.

0 open findings

What changed in this PR

Balances Agents-window tab spacing while preserving standard editor-tab geometry and improving RTL clipping behavior.

Changes:

  • Separates chat-tab padding from editor icon gutters.
  • Corrects Connected-tab RTL shoulders, clipping strokes, and cleanup.
  • Adds RTL, high-contrast, fractional-width, and visual fixture coverage.
File Description
build/​lib/​stylelint/​vscode-known-variables.json Registers the new tab inset variable.
src/​vs/​sessions/​browser/​parts/​chatCompositeBar.ts Tracks action spacing and clipping state.
src/​vs/​sessions/​browser/​parts/​media/​chatCompositeBar.css Updates chat spacing and RTL rendering.
src/​vs/​sessions/​browser/​parts/​media/​editorPart.css Defines detail-tab icon insets.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionsGrid.fixture.ts Adds RTL visual fixtures.
src/​vs/​sessions/​test/​browser/​chatCompositeBar.test.ts Expands spacing and clipping tests.
src/​vs/​workbench/​contrib/​modernUI/​browser/​media/​tabs.css Separates editor and standalone tab padding.
src/​vs/​workbench/​test/​browser/​componentFixtures/​sessions/​chatCompositeBar.fixture.ts Updates visual expectations.

🧠 Review effort: Balanced


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

Size the tab viewport and its scrollable wrapper explicitly so RTL clipping coverage does not depend on platform-specific outer flex sizing.

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.

🟢 Approval recommended

The scoped styling and lifecycle changes are supported by focused RTL, clipping, disposal, and visual regression coverage.

0 open findings

🧠 Review effort: Balanced

@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

Preserve the validated source tree while refreshing the head signature using cherwan@microsoft.com.

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

Fractional-width RTL clipping relies on browser-specific geometry and warrants final human visual verification.

0 open findings

🧠 Review effort: Balanced

This branch has not been deployed

No deployments
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.

Off-center tabs in agents window

3 participants