Skip to content

sessions: show the Session Toolbar only beside existing chats - #341912

Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
sandy081/agents/session-toolbar-existing-chats-only
Oct 16, 2026
Merged

Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
sandy081/agents/session-toolbar-existing-chats-only

Conversation

@sandy081

Copy link
Copy Markdown
Member

Follow-up to #341841. The Session Toolbar now shows only beside existing chats. The new-session view and the new-chat view no longer show it, and no longer reserve room for it, so their composers keep the full width.

What changed

  • New-session view (SessionView): the standalone Session Toolbar is removed. That covers both the new-session composer and the view shown while a new session is being prepared. SessionView is back to its state before sessions: add a Session Toolbar beside the active chat #341841.
  • Chat groups (ChatGroupView): the toolbar is active, and its room reserved, only while the group shows an existing chat (kind === 'chat'). A group showing the new-chat view (newChatInSession) has neither.
  • Context menu: the Session Toolbar toggle is removed from the new-session view's background menu, since the toolbar never appears there. The toggle in the chat transcript's background menu stays.
  • Dead code: NewChatView no longer applies a toolbar inset, and its .chat-view-new width rule is removed.
  • DESKTOP.md now describes where the toolbar appears.

How to test

  1. In the desktop Agents window, open a new session: no Session Toolbar, and the composer uses the full width.
  2. Send the first prompt: still no toolbar while the session is prepared.
  3. Once the session is created, the toolbar appears beside the chat.
  4. Start a new chat in that session: no toolbar while its new-chat view is shown; it appears once the chat has started.
  5. Right-click the new-session view's background: no Session Toolbar toggle. Right-click an existing chat's transcript background: the toggle is still there.

Validation

  • ./scripts/test.sh on the affected suites (sessionView, chatGroupsView, sessionToolbar, layoutActions, chatView, sessionsChatAccessibilityHelp, newSessionComposerLayout, chatBackgroundTint, sessionsActions): 404 passing.
    • New and updated tests: the new-session view has no toolbar and no inset; a group's new-chat view has no toolbar and no inset until the chat becomes an existing one; the toggle is absent from the new-session menu.
  • 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. They are pixel-identical, including all 24 that block CI, with 0 render errors.
  • Not run: a live Agents window session.

The new-session view (including while a new session is being prepared) and the new-chat view no longer show the Session Toolbar or reserve room for it, so their composers keep the full width. The toolbar's toggle is also removed from the new-session view's background context menu, since the toolbar never appears there.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 00:52
@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/sessionView.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.

🟢 Approval recommended

The scoped changes consistently implement the intended behavior with focused regression coverage and no identified blocking issues.

0 open findings

What changed in this PR

Restricts the Agents window Session Toolbar to existing chats, keeping new-session and new-chat composers full-width.

Changes:

  • Removes the standalone toolbar and gates chat-group visibility and spacing on existing chats.
  • Removes the new-session context-menu toggle and unused composer inset styling.
  • Updates regression tests and desktop documentation.
File Description
src/​vs/​sessions/​test/​browser/​sessionView.test.ts Checks toolbar absence before session creation.
src/​vs/​sessions/​test/​browser/​layoutActions.test.ts Checks removal of the new-session menu toggle.
src/​vs/​sessions/​test/​browser/​chatGroupsView.test.ts Covers toolbar and inset changes when a chat starts.
src/​vs/​sessions/​DESKTOP.md Documents toolbar availability.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​chatView.css Removes new-chat inset styling.
src/​vs/​sessions/​contrib/​chat/​browser/​chatView.ts Restores full-width new-chat layout.
src/​vs/​sessions/​contrib/​chat/​browser/​chat.contribution.ts Keeps the toggle only in the transcript background menu.
src/​vs/​sessions/​browser/​parts/​sessionView.ts Removes standalone toolbar management.
src/​vs/​sessions/​browser/​parts/​chatGroupView.ts Limits toolbar visibility and reserved space to existing chats.

🧠 Review effort: Balanced


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

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