Skip to content

sessions: keep even space beside chat content with the Session Toolbar - #341996

Merged
Sandeep Somavarapu (sandy081) merged 4 commits into
mainfrom
sandy081/agents/session-toolbar-even-spacing
Oct 16, 2026
Merged

Sandeep Somavarapu (sandy081) merged 4 commits into
mainfrom
sandy081/agents/session-toolbar-even-spacing

Conversation

@sandy081

@sandy081 Sandeep Somavarapu (sandy081) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #341841 and #341912. With the Session Toolbar enabled, chat content had uneven space on its two sides. In narrow and medium chats it gave up room only on the toolbar's side: about 24px on the left versus 62px on the right. This keeps the content centered with even space on both sides, and makes the toolbar slimmer.

What changed

  • Even spacing: content (transcript rows, input, suggestions, external-session banner, progress bar, scroll-down button) keeps the same inset on both sides. The centered band is then min(950px, width − 2 × inset), which always clears the toolbar.
    • This replaces the width-dependent clamp that shifted content to the left only, and the split-group overrides it needed.
    • Wide chats are unchanged: their 950px band already clears the toolbar.
  • Slimmer toolbar: 24px buttons instead of 28px (still the WCAG 2.5.8 minimum target size), and 12px instead of 16px from the right edge, which still clears the 10px overlay scrollbar.
    • The strip is 30px wide instead of 34px, and the inset on each side drops from 38px to 30px.
    • The 12px gap between content and toolbar is unchanged.
  • Ruler prompt timeline (sessions.chatTimeline.display: ruler): the rail now shares the toolbar's column.
    • Its resting marks are centered on the strip, and the toolbar sits above the rail where they overlap.
    • The content keeps the same even inset as without the ruler, so the transcript and input share one centered band.
    • Before, the transcript used only the ruler's right-side reservation, so it started further left and ended well before the input. Without the toolbar, the ruler keeps that reservation.
  • AbstractChatView.layout()'s contentRightInset is renamed contentInset, since it now applies to each side. Embedded editors are laid out for width − 2 × inset.

At 640px the composer now has 54px on each side, where it had 24px and 62px before.

Trade-off: in narrow chats the content is inset 30px further from the left edge than the session header title. Moving the toolbar into the chat header at narrow widths would avoid that, and could follow later.

How to test

  1. In the desktop Agents window, open an existing chat at a narrow-to-medium width (under about 1010px): the transcript and input have the same space on both sides, with the toolbar in the right margin.
  2. Widen the chat: at wide widths the content stays centered as before.
  3. Split the chat into two groups: each group's content is evenly inset.
  4. Turn the toolbar off from View > Appearance: content returns to the full width.
  5. With "sessions.chatTimeline.display": "ruler", the transcript and input stay aligned and evenly spaced, and the ruler marks appear in the toolbar's column.

Validation

  • ./scripts/test.sh on the affected suites (sessionToolbar, chatGroupsView, sessionView, chatView, layoutActions, sessionsChatAccessibilityHelp): 302 passing.
    • The toolbar test now asserts equal space beside padded content (54px / 54px), as well as the 30px strip, 24px buttons, 12px gap, and 12px clearance.
    • The real-CSS geometry test now expects symmetric bands at narrow, nearly-wide, wide, and split widths.
    • With the ruler timeline, it expects transcript and input in the same even band (input 30–570px, text 54–546px at 600px), and a resting mark centered on the toolbar's center line, 27px from the edge.
  • npx tsc --noEmit -p src/tsconfig.json --skipLibCheck: passed.
  • node build/eslint.ts, npm run stylelint, and node build/hygiene.ts on the changed files, plus npm run valid-layers-check: passed.
  • Component fixtures: rendered all 186 newChatWidget, chatView, and sessionToolbar fixtures on this branch and on main, with 0 errors.
    • Only Session Toolbar scenarios with the toolbar enabled changed (32 of 36).
    • All 24 that block CI, and every other fixture, are pixel-identical.
  • Not run: a live Agents window session.

With the Session Toolbar enabled, chat content now keeps the same inset on both sides, so it stays centered with even space beside it instead of giving up room only on the toolbar's side. The toolbar is also slimmer: 24px buttons (the minimum target size) and 12px clearance from the scrollbar, so the inset on each side drops from 38px to 30px. Wide chats are unchanged.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 10:00
@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.143.0 milestone Oct 16, 2026
@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/chatGroupView.ts
  • src/vs/sessions/browser/parts/chatView.ts
  • src/vs/sessions/browser/parts/media/chatGroupsView.css
  • src/vs/sessions/browser/parts/media/sessionToolbar.css
  • src/vs/sessions/browser/parts/media/sessionsPart.css
  • src/vs/sessions/browser/parts/sessionToolbar.ts

@sandy081
Sandeep Somavarapu (sandy081) marked this pull request as draft October 16, 2026 10:02
auto-merge was automatically disabled October 16, 2026 10:02

Pull request was converted to draft

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 6e7a5980 Current: 68ccca63

Changed (13)

sessions/sessionToolbar/sessionToolbar/Narrow/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/WorkspaceChat/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/NearlyWide/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/Wide/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/SplitGroup/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/RulerTimeline/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/RulerTimelineWide/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/ExternalSessionBanner/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/ExternalSessionBannerWide/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/ChatWithoutWorkspace/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/Moved/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/AtBottom/Light
Before After
before after
sessions/sessionToolbar/sessionToolbar/SubmenuOpen/Light
Before After
before after

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 layout changes and updated regression assertions are consistent, with no unresolved blocking findings.

0 open findings

What changed in this PR

Centers existing chat content beside the Session Toolbar in the Agents window, following the earlier toolbar additions.

Changes:

  • Applies equal content insets while preserving full-width scrollbars.
  • Reduces toolbar buttons to 24px and updates layout calculations.
  • Updates documentation, fixtures, and regression assertions.

No actionable findings remain. Live Agents window validation was not reported.

File Description
src/​vs/​sessions/​test/​browser/​sessionView.test.ts Updates expected toolbar insets.
src/​vs/​sessions/​test/​browser/​sessionToolbar.test.ts Checks slimmer toolbar and equal spacing.
src/​vs/​sessions/​test/​browser/​chatGroupsView.test.ts Updates group inset assertions.
src/​vs/​sessions/​DESKTOP.md Documents symmetric content spacing.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionToolbar.fixture.ts Mirrors symmetric renderer sizing.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​chatView.test.ts Checks centered bands and editor widths.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​chatView.css Centers content and related controls.
src/​vs/​sessions/​contrib/​chat/​browser/​chatView.ts Deducts both insets from content width.
src/​vs/​sessions/​browser/​parts/​sessionToolbar.ts Updates toolbar dimensions and contract.
src/​vs/​sessions/​browser/​parts/​media/​sessionToolbar.css Shrinks buttons and edge clearance.
src/​vs/​sessions/​browser/​parts/​media/​sessionsPart.css Applies symmetric content and progress insets.
src/​vs/​sessions/​browser/​parts/​media/​chatGroupsView.css Removes obsolete split-group overrides.
src/​vs/​sessions/​browser/​parts/​chatView.ts Renames the inset to reflect both sides.
src/​vs/​sessions/​browser/​parts/​chatGroupView.ts Passes the renamed inset through layout.

🧠 Review effort: Balanced


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

… timeline

With the ruler prompt timeline and the Session Toolbar both shown, the transcript dropped the even content inset and used only the ruler's right-side reservation. It then started further left and ended well before the input. The chat view now widens the even inset on both sides to clear the rail as well, so the transcript and input share one centered band. Without the toolbar, the ruler keeps its own reservation.

Co-authored-by: Copilot <[email protected]>
Instead of widening the content inset to clear the ruler prompt timeline (reverting 4d395c9), the ruler now sits in the Session Toolbar's column, with its resting marks centered on the strip. The content keeps the same even inset as without the ruler, and the toolbar sits above the rail where they overlap.

Co-authored-by: Copilot <[email protected]>
@sandy081
Sandeep Somavarapu (sandy081) merged commit 166933c into main Oct 16, 2026
36 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/agents/session-toolbar-even-spacing branch October 16, 2026 11:38
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.

3 participants