Skip to content

Sessions: one session object per session - #346561

Merged
Sandeep Somavarapu (sandy081) merged 39 commits into
mainfrom
agents/canonical-session-object-design
Nov 6, 2026
Merged

Sandeep Somavarapu (sandy081) merged 39 commits into
mainfrom
agents/canonical-session-object-design

Conversation

@sandy081

Copy link
Copy Markdown
Member

Follow-up to #346171 ("Sessions: session hosts replace the active session"), from its "Known deviations".

What changed

Every host of a session in the Agents window now shows one session object: the provider's ISession. This covers grid slots, detached panes, chat windows, chat editors and composers. There are no per-pane copies of a session anymore.

  • Panes own presentation. The grid (VisibleSessions) owns its panes (ISessionGridPane: id, kind Slot/Detached, session, chat, sticky, tabs). Per-pane state moves from session wrappers onto the pane: the tab strip, closed chats, shown subagent chats, pin, the active chat, and whether the pane is detached. When a session's incarnation is replaced (for example a draft that becomes a created session), the pane swaps its state atomically. The pane object and its id stay the same.
  • Removed: IActiveSession, VisibleSession, IHostSession, ActiveSessionHost, ResourceOverrideSession and scopedChatResource. They have no references left in code or docs.
  • Pane-addressed APIs.
    • ISessionsService and ISessionsPartService address panes: panes/slotPanes/activePane, activatePane, closePane, collapseToPane, focus/move/resizePaneInDirection, focusPane, toggleMaximizePane, focusNewSessionSlot.
    • isActivePane/isDetachedPane/getPaneOfHost answer by host. getHostOfSession keeps its signature.
    • Commands find their target pane by the host they were invoked from (resolveCommandOriginHost), not by a session wrapper.
    • The old session-view entry points of the grid, its part and its views are removed (visibleSessions, setActive, *SessionInDirection, resizeSession, collapseToSession, focusSession, toggleMaximizeSession, SessionView.openSession).
  • Consumers read the shown chat from the host or pane. Pickers, composers, chat windows, chat editors, Open in Editor, Sync Changes, subagent chat links and session telemetry read the chat their host or pane shows. They no longer read an activeChat from a session wrapper.
  • Persistence is unchanged. The stored grid state stays the same format, byte for byte. A binding with a chat resource is a detached pane (written from the pane's kind and chat); one without is a slot. Existing saved state restores as before; no migration is needed.
  • Docs: SESSIONS.md, LAYOUT.md, LAYOUT_CONTROLLER.md and baseSessionLayoutController.md describe the pane model.

Why

Before this change, every host of a session kept its own view of it. A grid slot and a detached pane of one of its chats were different objects, with their own tab strip and pin state. Code outside the grid had to compare sessions by resource, and had to ask the grid which pane was active or detached. scopedChatResource acted as an internal grid identity, used for detached panes, their persistence, pane identity and opener checks. With one session object per session and the presentation state on the grid's panes:

  • identity comparisons are plain object comparisons;
  • a session's data (status, chats, model, mode) has a single source;
  • per-pane questions go to the pane that owns the answer.

Behaviour

No user-visible change is intended. Layout, tabs, pinning, detached panes, chat windows, focus and the restored grid behave as on main.

Moving consumers from session wrappers to the provider session introduced the regressions below in earlier commits of this series. Each is fixed in the same series and pinned by a test:

  • Navigation from a detached pane's views stays in that pane. Opening another chat of a session from its detached pane, while the session has no slot, used to replace another session. Navigation now passes the originating host (openChat(…, { from })): the session's slot opens beside the detached pane, as on main. Without a host (for example from the sessions list), the behaviour is the same as on main.
  • Open in Editor transfers only sessions their provider created. "Created" is now read from the provider's status, so drafts and provisional sessions are not transferred.
  • Sync Changes from a composer syncs the composer's chat. The composer's toolbar passes { session, chat }, and the action no longer reads a wrapper's active chat (which threw).
  • No activation loop when a session replaces another in a pane. The active pane's listeners read the pane's chat only while the pane still shows that session. Otherwise a replaced session could reopen itself and replace its successor, in a loop.
  • Session pill fixtures render again. The session chat-input toolbar fixtures register the window's session host.
  • A pane's view keeps its chat view when another session opens in it. A pane outlives the sessions it shows, and its view was bound to the pane's own tabs and chat. When a session opened over the one a pane showed, the view briefly showed the old session with the new session's tabs: it built a new-chat composer, then a chat view again, instead of handing its chat view over. The content a view binds now follows the pane only while the pane shows that session, so the chat view is reused as on main.

Tests

All on the final head, rebased onto main:

  • Every commit typechecks and lints on its own: corepack pnpm run typecheck-client (with pipefail) and corepack pnpm run eslint <the commit's changed files> passed on each of the 38 commits.
  • Unit tests:
    • ./scripts/test.sh --reporter dot --runGlob 'vs/{sessions,workbench/contrib/sessions}/**/*.test.js': passed, 10534 passing, 27 pending, 0 failing.
    • Workbench chat-window tests: passed, 199 passing, 0 failing. Command: ./scripts/test.sh --reporter dot --run <file> for each of src/vs/workbench/contrib/chatWindow/test/**, src/vs/workbench/contrib/chat/test/browser/chatWindowNotifier.test.ts and src/vs/workbench/contrib/chat/test/browser/widget/chatWindowBlurListener.test.ts.
  • ESLint: corepack pnpm run eslint passed on all TypeScript files the branch changes, with 0 problems.
  • Layering: corepack pnpm run valid-layers-check passed.
  • Chat view reuse: a new test opens a session over the one the active slot shows and checks that no chat view is built and the existing one is handed over. Without the fix, it builds a new-chat composer and then a chat view again.
  • Persistence round-trip: a new test stores a grid state in the current format, with slots and a detached chat, and restores it into the pane model. It then clears the stored state and checks that the restored grid's own write is byte-identical to the original. The test fails when the restored grid does not write, and it also passes on the code before the model rewrite.
  • Test migration:
    • Tests fake sessions as the provider session plus the chat a pane shows, instead of session wrappers.
    • The model rewrite kept every test of the old session-view class with identical expectations, except one: the test of property forwarding from the wrapper to the session, a concept that no longer exists.
    • The structural commit that moves a pane's state onto the pane (a pane keeps the state of the session it shows) changes no tests.
  • Component fixtures:
    • The chat window title bar fixtures were rendered headless in all four themes on this branch and on its base, and compared (./node_modules/.bin/component-explorer render --project ./test/componentFixtures/component-explorer.json --fixture-id-regex '^sessions/chatWindow/titleBar/' --target <dir> [--compare --compare-target <baseline>]). All 24 are identical.
    • All fixtures in both themes were compared the same way on an earlier version of this branch (before the chat window title bar landed). 4874 fixtures rendered on each side with 0 errors; the 16 that differed also differ between renders of the same build (generated images, an animation, and a timing-dependent progress title), so none came from this branch.

Live and performance validation

  • Live A/B against main: the same seeded profile and the same scripted sequence ran on this branch and on its merge base with main, in isolated profiles without sending any chat requests. After each step, the state of every window (grid panes with their sizes, titles and chats; chat-window tabs; the sessions list and its selection; the focused element) was captured and compared.
    • Per-step state is identical on both builds. This covers 48 steps in the main sequence and 21 in two supplementary sequences. They include:
      • opening and replacing sessions, Split View, maximize, and pinning (a pinned pane isn't replaced);
      • detaching a chat into its own pane, and closing it (its chat returns to the session's pane);
      • pane navigation and focus commands;
      • opening a nested chat;
      • Open in New Window, Move to Main Window, and session links in chat windows (to a session in no window, in another chat window, in the grid, and to a session whose other chat is in a detached pane);
      • New Quick Chat;
      • Open in Editor Window;
      • restart.
    • New Chat from a detached pane whose session has no other pane (Cmd+T / Ctrl+T with the detached pane focused): on both builds, the session's pane comes back beside the detached pane with the new chat, and the other session's pane is kept. The saved state is identical.
    • Persisted state is identical. All saved layout and session keys match after quitting and again after a restart. The only differences are generated ids and a timestamp. Restoring each build's saved state on the other build gives the same result in both directions.
    • No new renderer errors. Both builds log the same kinds of errors, none from the grid, pane, session or chat-window code.
    • Not run:
      • Restore Size after maximize: the harness couldn't find the control.
      • Closing the last pane, pinning a chat, split chat groups, drag and drop into the grid, F6 and chat-group focus, the conversations dropdown, side chats, and moving or deleting chats: not scripted. Side chats need a send, and drag and drop can't be synthesized reliably.
      • Opening a subagent chat link: the seeded session showed no link.
      • Open in Editor for a draft, Sync Changes, and Open in Editor Area: not scripted. Unit tests cover the first two.
      • A remote agent host: it needs real credentials, which a test profile must not use.
      • A stress run.
  • The live A/B ran on an earlier version of this branch. Its later changes are the reuse fix above and rebases.
  • Performance against main: the same scripted scenarios ran on this branch and on its base, interleaved in several pairs on fresh builds, measuring CPU, long tasks, and the counts of view, binding, context key, toolbar and menu work.
    • No regression. Idle, typing, window round trips, pane round trips, chat tab switches, session swaps and draft graduation are equal within noise, and a cold restore is not slower.
    • Opening a session over another in a pane builds no new chat view and binds the pane's view once (main rebinds it four times). Long tasks and wall time per swap are equal to main.
    • Moving between panes is cheaper: focusing a pane no longer rebinds its view, and the grid doesn't republish its panes.
    • Saved state is still written only when it is flushed.

How to test

  1. In the Agents window, open two sessions side by side. Detach a chat of one into its own pane, and move a chat into a chat window.
  2. Switch, pin and close tabs in each pane. Check that each pane keeps its own tabs and active chat.
  3. With the session and another session side by side, detach a chat of the first session, then close the first session's own pane (not the detached one). Focus the detached pane and press Cmd+T / Ctrl+T (New Nested Session). The session's pane opens beside the detached pane with the new chat, and the other session stays.
  4. Reload the window. The grid, the detached pane and the chat window are restored as they were.
  5. Run Open in Editor on a draft session (it isn't transferred) and on a created session (it is). Run Sync Changes from a composer's repository toolbar.

Review

  • Design first. The target model was reviewed and approved before any code was written: one session object per session, pane-owned state, detached-pane persistence without a new format, and the API changes. Every deviation from it during implementation was reported and approved before it was coded.
  • Commit by commit. An independent reviewer reviewed each commit. Its findings were fixed in the series, each with a test: the Open in Editor and Sync Changes regressions, a round-trip test that couldn't fail when the restored grid didn't write, and test fakes that still used the old session views.
  • Integrated reviews. The whole series was reviewed again after each rebase onto main, including how the branch was adapted to upstream changes: chat links in chat windows, hiding a chat from the grid, the move of the Sessions code to vs/workbench/contrib/sessions, the chat window title bar and Session Activity Bar strip, and the guards on moving editors across windows. Each review approved with no findings.

`VisibleSessions.updateResourceOfSession` and its `ResourceOverrideSession`
adapter have no production caller. Remove both, and keep the metadata
forwarding test for the visible session wrapper.

First commit towards one canonical session object shared by all session
hosts (follow-up of #346171).

Co-authored-by: Copilot <[email protected]>
The model and mode pickers read `IActiveSession.modelId`/`mode`, which a
session wrapper of the Agents window overrides with its active chat's. Once
hosts share one session object, there is no such wrapper. Read the chat the
host shows instead:

- `SessionModelSelection` takes an `ISessionChatSource` (session and chat)
  and reads the chat's model, re-binding when the chat changes. A composer
  bound to another chat than its session's active one now selects that
  chat's model.
- `ScopedModePickerModelCache` is keyed by the source and reads its chat's
  mode; the agent-host agent picker reads the focused host's chat.
- The phone input context and the chat view's preparation input read the
  chat's model.

Co-authored-by: Copilot <[email protected]>
`IActiveSession.isCreated` is the session wrapper's map of `status`:
created once it is no longer untitled. Hosts will show the provider's
session, which has no such member. Add `isSessionCreated(session, reader?)`
next to the other status helpers and read it at every place that asked a
host's or a pane's session, keeping narrowing where the session was
optional.

Test fakes that set `isCreated` now set the `status` that agrees with it,
through the shared `withCreatedStatus` test helper; the layout test session
derives `isCreated` from its status.

Co-authored-by: Copilot <[email protected]>
The grid answers which of its panes is active or detached for a pane's own
session object (`isActivePane`/`isDetachedPane`), which identifies a pane only
while each pane has its own copy of the session. Add host-addressed queries
that do not depend on that identity:

- `ISessionGridPanes.isActivePaneHost`/`isDetachedPaneHost`/`isGridPaneHost`:
  the grid host stands for the grid's active pane, the host of a slot's or a
  detached pane's view for that pane, including the new-session slot; other
  hosts, such as a chat window's, for none.
- `ISessionsPartService.getSessionViewOfHost` finds the view of a host.
- `getHostOfSession` keeps its URI signature and uses them.

The session-addressed queries stay until their last caller moves.

Co-authored-by: Copilot <[email protected]>
…object

Pane commands, such as Pin, Close or Toggle Maximize, found their pane by
the identity of the session object the pane's toolbars pass. Once panes
share one session object, that names no pane. Name the pane by its host:

- The menus of a pane's header, toolbars and chat tabs append the host's
  command context to their arguments (`sessionMenuArgs`:
  `[session, chat | undefined, hostContext]`), so session-level commands
  shared with the sessions list still get the session first.
- `resolvePaneCommandTarget` resolves the pane of the host the arguments
  name: its view and session for a pane of the grid, else the opener of
  the surface that shows its chat (`getChatHostOpenerOfHost`); without a
  host, as from keybindings, the grid's active pane.
- `resolveSessionCommandTarget` no longer names a host by the identity of
  a session object; a session resolves by its resource.
- The Changes view's action bars pass the command context of their
  window's host too, so its actions, such as skill buttons, act on a chat
  window's chat.
- `ISessionsService.getPaneSessionOfHost` maps a host to the grid's view of
  its pane's session until the pane API replaces it.

Co-authored-by: Copilot <[email protected]>
Add `ISessionGridPane` (sessionGridPane.ts): a pane of the main window's
grid, a slot or a detached pane, with its kind, the session and chat it
shows, its pin and its tab strip. The grid owns it, and it lives as long
as its grid slot: its id is the slot id, which a replacement of the
session, such as a draft graduating, keeps.

- `VisibleSessions.panes`/`activePane`/`getPane` publish the panes in the
  same transaction as the wrapper arrays and the active session, so no
  reader sees a pane list and a session list that disagree.
- Until the views move to the pane, each pane shows the state of the
  current adapter (`VisibleSession`) of the session incarnation it shows.
  A replacement gives the pane a new adapter, as it gives the grid a new
  wrapper today, and keeps the pane and its id, so views that rebind on a
  new wrapper keep rebinding.
- `ISessionGridPanes.getPaneOfHost(host)`: the grid host stands for the
  active pane, including the new-session slot's; the host of a view of the
  grid for the pane of its slot (`ISessionsPartService.getPaneIdOfHost`);
  other hosts for none. The `*Host` booleans are reimplemented over it.
- Tests: panes of a slot and a detached pane share the session object and
  keep their ids; same- and different-id replacement keeps the panes and
  publishes atomically; a detached active pane writes the remembered
  active chat while closed tabs stay the slot's; a layout of only a
  detached pane saves, restores, closes and reopens.

Co-authored-by: Copilot <[email protected]>
…pers

`ISessionsService` gains the pane API: `panes`, `slotPanes`, `activePane`,
`activatePane`, `closePane`, `collapseToPane`, `detachChat(pane, chat)`, and
focus, move and resize in a direction by pane. `closeChat` takes the
session. Until the views move to panes, the pane members act through the
adapter of the session incarnation a pane shows.

- `ISessionGridPanes` takes its final shape: `getPaneOfHost(host)`, and
  `isActivePane(host)`/`isDetachedPane(host)`, renamed from the `*Host`
  queries together with their last callers. The queries by session
  wrapper, `isGridPaneHost`, `getPaneSessionOfHost`, `activePaneId` and
  `getSessionPaneId` are removed.
- The part fires `onDidFocusPane` with the slot id of the view that gains
  focus, and focuses a pane by `focusPane`.
- Pane commands act on `IPaneCommandTarget.pane`.
- Migrated to panes: the comparison grid controller (pane ids for its
  isolated judge), Back/Forward's current entry (the active pane's session
  and chat), reopen-closed focus, the window notifier, Sync Changes, the
  conversation actions, and agent feedback channels.
  Request telemetry counts the slots that show a session, as before.
- Focus moves into the active pane when the pane or the session it shows
  changes, but not into the grid's initial pane, and the active pane's
  view listeners rebind for either.
- Test fakes of the sessions service publish panes for their sessions
  (`testGridPanes`, `testGridPane`).

Co-authored-by: Copilot <[email protected]>
A host's session is the provider's `ISession`, one object for every host
that shows it; the state of the pane that shows it, its pin and tab strip,
is the pane's.

- `IHostSession` is `ISession`. `ISessionPaneTabs` and the new
  `IPaneViewState` (pin, tab strip, detached) move to the common layer.
- `setHostSessionContextKeys(session, chat, paneState, ...)` reads the pin
  and tab keys from the pane state. Without a pane, as for the Changes
  view's scoped session actions, the session is not pinned and shows no tab
  strip; only grid-window commands and the session header read those keys.
- `SessionHost` shows a session and a chat of it, observing both without
  owning them. `ActiveSessionHost`, which the chat windows, composers and
  the automation dialog still use, is a subclass that shows a session
  view's active chat.
- The grid host shows the active pane's session and chat. A view's host
  shows the provider's session of the grid's view it binds
  (`canonicalSessionOf`, until views bind their pane).
- `findSessionOfChat`, the input toolbar and its pills take `ISession`. A
  pill action activates the pane of the grid that shows its session
  (`activateSessionPane`): through `setActive` for a session view, else
  the first pane that shows the session object, the pane that showed it
  before.

Co-authored-by: Copilot <[email protected]>
The pane chrome takes the content of the pane it is a view of,
`ISessionPaneContent`: the provider's session, the chat the pane shows,
the pane's state (pin, tab strip, detached), and how to close the pane.
A view cannot close its pane by closing the session it shows any more: for
a detached pane that would close the session's slot.

- ChatGroupsView runs on the content: whether the pane is detached
  decides the carried layout, the drop target and persistence; its tabs
  come from the pane's state; closing its last group closes the pane.
- The chat group context, ChatHeader, SessionHeaderBar, ChatCompositeBar
  and SessionRemoteConnection take the provider's session; a chat drag
  and the parent context read whether the pane is detached, and closing
  the main chat's tab closes the pane.
- SessionView builds the content of the grid's view it binds, and closes
  its own pane (`closePane` of its host's pane) only while it still shows
  that content: a content kept past a rebind, such as a replacement of
  the session, or past its pane leaving the grid, closes nothing.
- A chat window's editor builds the content of its window's view of the
  session, and closes through its opener until the window shows the
  provider's session.
- Until the views bind their pane, ChatGroupsView and SessionHeader also
  take a view of a session, as their tests still give them.

Co-authored-by: Copilot <[email protected]>
The new-session composer, the composer of a new chat in a session and the
automation dialog run on the provider's `ISession`, not a view of it: the
draft a pane or the dialog shows is the provider's draft object itself.

- `IChatViewOptions.session` is the provider's session; a pane passes the
  chat it shows as `chat`. A chat window's editor passes its window's
  active chat the same way.
- NewChatWidget shows the provider's draft (`newSession`) or its pane's
  session without wrapping it; quick chat creation returns the session.
- NewChatInSessionWidget, SharedChatInputComposer, the composer input,
  the migration notice and the worktree suggestion take `ISession`; the
  composer's host is a `SessionHost` of the chat it shows.
- The automation dialog observes the provider's automation draft
  non-owningly; its host and model selection show that draft and its
  main chat.
- `shownChatOf`/`readShownChat` resolve the chat a composer shows while
  views of a session still reach it: the explicit chat, else the view's
  active chat, else the main chat.

Co-authored-by: Copilot <[email protected]>
A chat window shows the provider's `ISession` and the chat of it, which it
observes without owning, instead of a copy of the session scoped to the
chat: closing the window or moving its chat disposes no session.

- A window's chat holds the provider's session and chat; its editor's pane
  shows them as a detached pane does, its one chat. Closing the pane closes
  the chat in its window, through the window's opener, only while the
  window still shows that chat of that session: a content kept past the
  chat being replaced, or ending, closes nothing.
- The window's host and its editor's host are hosts of the provider's
  session and chat; the editor binds the keys of its pane's content.
- The grid no longer special-cases a copy that another surface shows:
  `setActive` and `closeSession` act on the grid only.
- A pill activates the pane its host is in, also from a host nested in
  it. A host of the main window outside its panes, such as the Inbox's,
  activates the pane of this grid that shows the chat it acts on: the
  detached pane of the chat, else the session's slot. A pill in a chat
  window leaves the grid as it is.

Co-authored-by: Copilot <[email protected]>
No host shows a view of a session any more: every host shows the
provider's session and the chat it shows of it. The tests and component
fixtures that built hosts of views of sessions build `SessionHost`s,
giving the chat they show explicitly.

Co-authored-by: Copilot <[email protected]>
The sessions part renders the grid's panes rather than views of sessions:
the view of each grid slot shows that slot's pane, and binds again as the
pane shows another session, such as a replacement of it, while it follows
the pane's chat and tabs. Code outside the grid's model reads its panes.

- The sessions service renders the panes (`updatePanes`), also as a
  pane's session changes, before it moves focus into the active pane.
  `SessionView.openPane(pane)` binds to the pane's session, and follows a
  replacement by the same object through the pane's tabs and chat.
- The part looks up panes by position, neighbor and view, and maximizes,
  resizes and focuses a pane; `updateVisibleSessions` and the lookups that
  returned views of sessions are removed.
- Moving, focusing and resizing in a direction act on the exact pane, a
  detached one too. The chat commands of the grid read the active pane's
  tabs and chat.
- The readers of the sessions the grid shows read its slot panes, and
  the main window's context keys its active pane.
- The sync-changes button returns focus to the view of its own host.
- Views of sessions remain only for tests, deprecated.

Co-authored-by: Copilot <[email protected]>
The host and pane test helpers take what a host or pane shows (the
provider's session and a chat of it, with a pane's pin, tab strip and
detached state), and accept the old views of sessions transitionally.
Six service suites build their hosts and panes from those.

Co-authored-by: Copilot <[email protected]>
stubSessionHostsFromSessionsService found the focused chat window by the
session it shows, so with one session in two windows it always picked
the first. It now picks the window of the active entry.

Co-authored-by: Copilot <[email protected]>
The tests read the grid through its panes (the active pane, the slots and
the detached panes, and each pane's session, chat, tabs and pin) and act
on panes, rather than through views of sessions.

Co-authored-by: Copilot <[email protected]>
The check compared two reads of the active pane's session after the
operation, which agree whenever the pane does. It now captures the pane
and its session before opening the canvas and compares those.

Co-authored-by: Copilot <[email protected]>
The views of a detached pane passed their own view of the session to
openChat and openNewChatInSession, which kept the navigation in that
pane. Since they pass the provider's session, opening another chat of a
session whose slot is closed replaced another session's slot. They now
pass their host: from a host that stands for a detached pane of the
session, the navigation stays in that pane and the session's slot goes
beside it. Without a host, as from the sessions list, nothing changes.

Co-authored-by: Copilot <[email protected]>
A mechanical rename of the IActiveSession type to ITestSessionWithChat in
the tests whose fakes are only ever seen as a session and the chat its
host shows. ITestSessionWithChat, a session fake carrying activeChat,
lives in the test utilities; new tests use ITestShownChat. The tests whose
fakes still reach members typed IActiveSession move in later commits.

Co-authored-by: Copilot <[email protected]>
…ontents

The parts tests give their views panes (SessionView.openPane) and pane
contents (ChatGroupsView and SessionHeader setSession) instead of views
of sessions, through test helpers that keep one pane and one content per
session fake, so a view given the same fake keeps what it shows. Their
fakes are sessions that carry the pane state the grid gave them.

No fallout fixes were needed in other tests or fixtures: the shared
session fake keeps lastClosedChat, so it still satisfies the members that
take IActiveSession until they are removed.

Co-authored-by: Copilot <[email protected]>
…ith the chat they show

The tests fake the sessions their hosts show as sessions carrying the
chat they show, and give UI a source of the session and chat
(testChatSourceOf), a pane (testPaneOf) or a pane content
(testPaneContentOf) instead of views of sessions. Their sessions service
stubs model the grid's panes with gridShown rather than visibleSessions.

Type-only: the openQuickChat fake in newSessionAction.test returns the
type of ISessionsService.openQuickChat.

Co-authored-by: Copilot <[email protected]>
… act on panes

The remaining contrib tests (apart from the providers) fake the sessions
their hosts show as sessions carrying the chat they show, model the
grid's panes with gridShown, and their fakes of the sessions service
and part override the pane members production calls instead of the
members kept for views of sessions.

ITestSessionWithChat now declares, as optional, the pane state legacy
fakes carry (tab strip, pin, isCreated, the chat of a detached pane).

Type-only fixes:
- sessionsActions.test: two openQuickChat fakes return the type of
  ISessionsService.openQuickChat.
- sessionsActions.test and sessionsPolicyBlocked.test: the fakes of
  focusActiveSession pass their session to the part's focusSession as its
  parameter type.
- newChatMigrationNotice.test: isCreated overrides the member it declares
  again.

Co-authored-by: Copilot <[email protected]>
getChatSessionToOpenInEditor decided that a session was created from an
isCreated member, treating its absence as created, so a provider's draft
session (status Untitled, no such member) and its chat could be handed to
another window. It now reads the provider's status (isSessionCreated).
Without a chat, Open in VS Code opens the folders of the session's main
chat rather than of an active chat the session does not have.

Co-authored-by: Copilot <[email protected]>
The composer's repository toolbar passes its session to Sync Changes,
which read the active chat of that session. Composers have shown the
provider's session, which has no active chat, so Sync Changes from a
composer threw. The toolbar now passes the chat the composer shows with
its session, and the action syncs that chat.

Changed expectation: the sessionSyncChanges test of the menu action, which
mirrors the composer's argument, now expects { session, chat } instead of
{ session }, as the composer passes.

Co-authored-by: Copilot <[email protected]>
The subagent chat lookup reads the sessions of the grid's slots from its
panes rather than from the views of sessions the grid kept for them: the
same sessions in the same order, without the new-session slot. Its tests
fake the grid with the slot panes, and a test pins the order and the
skipped new-session slot.

Co-authored-by: Copilot <[email protected]>
The provider tests fake the sessions their hosts show as sessions carrying
the chat they show, give UI a source of the session and chat
(testChatSourceOf) instead of views of sessions, and model the grid's
panes with gridShown rather than visibleSessions.

Co-authored-by: Copilot <[email protected]>
The component fixtures fake sessions as the tests do: as the provider's
session with the chat a pane shows (`ITestSessionWithChat`), with the
grid's shown sessions in `gridShown` and its slot panes built from them,
instead of the deprecated `IActiveSession` and `visibleSessions`.

- The grid fixture activates a focused pane through a fixture-local
  `activate`, and maximizes the left session through its view's pane.
- The workbench fixture utils count slot panes for the multiple-sessions
  key, and the part fake maximizes a pane.

No fixture renders differently: every `sessions/**/Light` fixture renders
the same before and after this change.

Co-authored-by: Copilot <[email protected]>
The session chat input toolbar takes the host it is shown in since chat
windows show the provider's session object, and the session pills and
chat reference fixtures failed to render without one. Their services now
provide the main window's host of the fixture session and chat, which the
input banners already used, so the toolbar and the banners share it.

Co-authored-by: Copilot <[email protected]>
…they show

The session component fixtures under the workbench fake sessions as the
other fixtures do: as the provider's session with the chat a pane shows
(`ITestSessionWithChat`), and the grid's shown sessions in `gridShown`
with its slot panes built from them, instead of `IActiveSession` and the
deprecated `visibleSessions`.

- The pills fixture's session carries no pane state, so it is an
  `ISession`.
- The header fixture gives the header its pane's content
  (`testPaneContentOf`), which the header built from the session before.
- The composite bar's fake keeps its tab strip's `shouldShowChatTabs`
  required.

No fixture renders differently: every `sessions/` fixture renders the same
before and after this change.

Co-authored-by: Copilot <[email protected]>
…and its views

The grid, its part and its views are addressed by pane only. The members
that took a view of a session in a pane (`IActiveSession`) go, with the
helpers that converted one. `IActiveSession` remains only inside the
grid's model, which the next commits rewrite.

- `ISessionsService` loses `visibleSessions`, `visibleSessionPanes`,
  `setActive`, `focusSessionInDirection`, `moveSessionInDirection`,
  `resizeSession` and `collapseToSession`. The service keeps the ones
  its model still drives as private members.
- `ISessionsPartService` loses `focusSession` and
  `toggleMaximizeSession`. `focusNewSessionSlot` replaces
  `focusSession(undefined)`, the one use left, and focuses the same view.
- `SessionView.openSession` goes. `SessionHeader.setSession` and
  `ChatGroupsView.setSession` take their pane's content only, and the
  header no longer depends on the sessions service.
- `paneContentOf`, `isSessionPaneContent`, `canonicalSessionOf`,
  `paneViewStateOfActiveSession`, `setActiveSessionContextKeys`,
  `sessionChatSourceOf` and `readShownChat` go.
- A surface given no chat shows its session's main chat: `shownChatOf`
  and the composer's bound chat no longer read the active chat of a view
  of a session. No surface relies on it: the grid's composers pass their
  pane's chat, and other composers show provider sessions.
- `openQuickChat` returns the provider's session. The github PR and
  issue actions take sessions.

Tests:
- Fakes of the service and the part override the pane members and
  `focusNewSessionSlot`, keeping their recorded labels. Service fakes
  record `focusActiveSession` themselves instead of through the part.
  Host stubs read `gridShown` only.
- `testPaneContentOf` gives the main chat when a fake has no active
  chat, as a session view gives its content.
- Tests that relied on the active-chat fallback pass their chat.
- Changed expectation: the composer test now pins the main chat
  ("binds the host's chat when it has one, otherwise the session's main
  chat"); with the old fallback it binds the fake's active chat.

Co-authored-by: Copilot <[email protected]>
The grid's model publishes its panes and the sessions of its slots, the
provider's sessions, instead of the views of sessions it keeps per pane.
The sessions service reads the grid only through its panes. The model
still keeps a view of each session inside, which the next commit
replaces.

Model:
- `gridSessions`, `activeSession`, `visibleSessions`, `getGridSession`
  and `getAdapterOfPane` are no longer public, and `isActivePane`,
  `isDetachedPane` and `isGridPane`, which nothing called, go.
- `slotSessions` publishes the sessions of the slots as `visibleSessions`
  published their views: in the same order and transactions, with
  `undefined` for the new-session slot.
- `setActive` takes a session or one of the grid's own panes, and ignores
  another grid's pane. `getChatPane` returns the detached pane.

Service:
- The chat a detached pane shows, its `chat`, replaces the scoped chat of
  its view. A pane's active chat follows its pane.
- `closePane` attaches the chat of a detached pane back to its slot;
  `closeSession` closes a slot. Closed-session history and the new-session
  discard get the provider's session.
- The reactions to the active pane read the chat it shows of their
  session only while it shows that session, as they read the chat of the
  session's view before.
- The grid state saves its bindings from the panes, as version 1 did.

Tests:
- The model's tests read panes. Two tests whose subject was the view
  are renamed for the pane, with the same expectations: "the active pane
  shows the provider's session itself, with its metadata" and "replaces
  the session of the pane even when the session id is unchanged".
- The atomic replacement test reads the slot sessions and the active
  pane's session; its four variants and expected values are unchanged.
- New: "a stored grid of slots and a detached chat restores and saves
  back byte for byte (v1)", which also passes on the previous commit.

Co-authored-by: Copilot <[email protected]>
The tests of a session's tab state drive a grid that shows the session in
a slot, instead of the view of the session the grid keeps per slot: the
grid seeds the slot from the session's persisted state, the tab
operations go through the grid, and the state is read from the slot's
pane. Their bodies and expectations are unchanged.

The test of the view forwarding every session property goes: a pane shows
the provider's session itself, which "the active pane shows the
provider's session itself, with its metadata" covers.

Co-authored-by: Copilot <[email protected]>
…ites

The test of a stored grid restoring and saving back byte for byte removes
the stored state after the restore, so it compares what the restored grid
writes with what it was restored from. Before, the stored state was still
there, and the test passed even if the restored grid wrote nothing.

Co-authored-by: Copilot <[email protected]>
The test of the shared model selection for automation drafts gives the
selection the draft and its main chat, as the composer shows them,
instead of a view of the draft that the grid keeps per slot. Its
expectations are unchanged.

Co-authored-by: Copilot <[email protected]>
…of it

The grid's model no longer wraps the sessions it shows. Each pane keeps
the state of the incarnation of the session it shows, and a replacement
of the session swaps that state in one transaction, keeping the pane:
- the state of a session's slot: its active chat, and its tab strip
  with the chats closed in it, the subagent chats shown in it and the
  chats other panes or windows show;
- the state of a detached pane: the one chat of its session it shows,
  and that chat as its tab strip.

The state is not a session: it doesn't forward the session's properties
or carry its active chat's model and mode, and `IActiveSession` goes. A
detached pane is its state's kind, not a session scoped to a chat.

Co-authored-by: Copilot <[email protected]>
…w names go

- `IHostSession`, an alias of `ISession`, goes: hosts show the provider's
  session itself (by tool, 28 files).
- The test-only fake's detached flag is `detachedChat`, not
  `scopedChatResource`, which production no longer has (by tool).
- The sessions part's `toggleMaximizeSession`, which nothing calls, goes,
  and its `focusSession` is `focusNewSessionSlot`: it was only called to
  focus the new-session slot, which it finds as before.

Co-authored-by: Copilot <[email protected]>
The session host contract and the layout documents describe the grid
after the session views went: every host shows the provider's session
object, and the grid keeps each pane's state (the chat it shows, its tab
strip, its pin), with a detached pane as a kind of pane.

Co-authored-by: Copilot <[email protected]>
…xt one

A pane outlives the sessions it shows, and a view of it bound its content to the pane's own tabs and chat. Opening a session over the one a slot shows changed those before the view was bound to the new session: for a moment the view showed the old session with the new session's tabs, so its chat group found no chat of the old session, built a new-chat composer, and then a chat view again for the new session, instead of handing its chat view over.

The content a view binds now follows the pane only while the pane shows that session, and keeps what it last was afterwards (paneShownOfSession). The view keeps its chat view and hands it to the next session, as before panes were introduced.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 15:46
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Kyle Cutler (@kycutler)

Matched files:

  • src/vs/sessions/contrib/browserView/test/browser/sessionBrowserNetwork.test.ts

Joaquín Ruales (@jruales)

Matched files:

  • src/vs/sessions/contrib/browserView/test/browser/sessionBrowserNetwork.test.ts
  • src/vs/sessions/contrib/canvases/electron-browser/sessionCanvasService.ts
  • src/vs/sessions/contrib/canvases/test/browser/pinnedCanvasService.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasRegistryService.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasService.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasWorkingSet.test.ts

Ulugbek Abdullaev (@ulugbekna)

Matched files:

  • src/vs/sessions/contrib/canvases/electron-browser/sessionCanvasService.ts
  • src/vs/sessions/contrib/canvases/test/browser/pinnedCanvasService.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasRegistryService.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasService.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasWorkingSet.test.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/sessions/services/sessions/test/browser/sessionNavigation.test.ts
  • src/vs/sessions/services/sessions/test/browser/sessionsManagementService.test.ts
  • src/vs/workbench/contrib/sessions/browser/agentHostCustomizationService.ts
  • src/vs/workbench/contrib/sessions/browser/sessionsPartService.ts
  • src/vs/workbench/contrib/sessions/browser/sessionsService.ts
  • src/vs/workbench/contrib/sessions/common/changesViewService.ts
  • src/vs/workbench/contrib/sessions/common/session.ts
  • src/vs/workbench/contrib/sessions/common/sessionContextKeys.ts
  • src/vs/workbench/contrib/sessions/common/sessionsManagement.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.

🔵 Needs a closer look

This cross-window identity and pane-lifecycle refactor needs maintainer validation of drag-and-drop, split-chat groups, and remote-host behavior, which the reported live checks did not cover and cannot be exercised here.

No open issues 🎉

What changed in this PR

Migrates Sessions consumers to the provider-owned ISession, with pane-specific presentation state accessed through grid panes and shown chats read from their hosts.

Changes:

  • Updates navigation, headers, layout, notifications, and actions to use pane and host state.
  • Centralizes created-session checks and reads chat-specific model information from IChat.
  • Adapts tests, component fixtures, and architecture documentation.

No actionable defects were identified in the supplied changes. Validation was limited to static inspection; tests and fixture rendering were not run.

File Description
src/​vs/​workbench/​test/​browser/​componentFixtures/​sessions/​chatReferences.fixture.ts Updated as part of this pull request.
src/​vs/​workbench/​test/​browser/​componentFixtures/​sessions/​blockedSessionsList.fixture.ts Updated as part of this pull request.
src/​vs/​workbench/​test/​browser/​componentFixtures/​fixtureUtils.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​worktreeSuggestion/​worktreeSuggestionTestUtils.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​worktreeSuggestion/​worktreeSuggestionController.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​sharedChatInputComposer.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​sessionBrowsersControl.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​sessionBackgroundActivitiesControl.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​sessionArchiveNudge.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​newChatVoiceTarget.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​newChatUserInteraction.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​newChatMigrationNotice.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​chat/​artifactIntegrationPresentation.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​test/​browser/​openAgentHostStateFile.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​test/​browser/​mobileChatPhoneInputTarget.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​test/​browser/​agentHostCodexApprovalsPicker.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​test/​browser/​agentHostClaudePermissionModePicker.test.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​openSubagentChat.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​mobile/​mobileChatInputConfigPicker.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​baseAgentHostSessionsProvider.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​agentHostSkillButtons.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​agentHostPermissionPickerDelegate.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​agentHostModePicker.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​common/​session.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​worktreeSuggestion/​worktreeSuggestionService.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​worktreeSuggestion/​worktreeSuggestionController.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsView.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​sessionNavigation.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​sessionCanvasesControl.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​parts/​sessionHeader.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​parts/​sessionDropTarget.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​parts/​chatView.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​parts/​chatHeader.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​parts/​chatGroupView.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​closedItemHistory.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chatPhoneInputContext.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chatHostOpener.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​sessionBrowsersControl.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​sessionBackgroundActivitiesControl.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​newSessionAction.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​newChatVoice.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​newChatUserInteraction.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​newChatMigrationNotice.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​newChatComposerInput.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​chatView.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​changes/​sessionChangesEditor.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​changes/​sessionActionsHost.ts Updated as part of this pull request.
src/​vs/​workbench/​contrib/​sessions/​browser/​changes/​sessionActionContextKeys.ts Updated as part of this pull request.
src/​vs/​sessions/​test/​common/​chatLayout.test.ts Updated as part of this pull request.
src/​vs/​sessions/​test/​browser/​workbench.test.ts Updated as part of this pull request.
src/​vs/​sessions/​test/​browser/​vscodeActions.test.ts Updated as part of this pull request.
src/​vs/​sessions/​test/​browser/​sessionWorkspace.test.ts Updated as part of this pull request.
src/​vs/​sessions/​test/​browser/​sessionsParts.test.ts Updated as part of this pull request.
src/​vs/​sessions/​test/​browser/​mainWindowSessionHost.test.ts Updated as part of this pull request.
src/​vs/​sessions/​services/​workspaceFolderLabel/​test/​browser/​workspaceFolderLabelService.test.ts Updated as part of this pull request.
src/​vs/​sessions/​LAYOUT.md Updated as part of this pull request.
src/​vs/​sessions/​LAYOUT_CONTROLLER.md Updated as part of this pull request.
src/​vs/​sessions/​electron-browser/​actions/​vscodeActions.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​workspace/​test/​browser/​workspaceFolderManagement.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsWorkspaceSelectionTelemetry.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsViewPane.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsTypedCharactersTracker.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsTitleBarWidgetRemoteHost.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsTitleBarWidget.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsListTestUtils.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsListFixtureUtils.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsListContextMenu.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​customizationsToolbar.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​blockedSessionsIndicatorModel.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​automationsView.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​automationsView.fixture.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​browser/​views/​sessionsViewActions.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessionsWorkspaceSelectionTelemetry.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessionsWindowNotifier.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessionsTypedCharactersTracker.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessionsTelemetry.contribution.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessions/​browser/​blockedSessionsIndicatorModel.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​sessionComparison/​test/​browser/​sessionComparisonViewService.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​remoteAgentHostActions.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostSessionConfigPicker.fixture.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostPolicyContinuationPresenter.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostForkActions.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostChatInputPickersScope.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​policyBlocked/​test/​browser/​sessionsPolicyBlocked.fixture.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​onboardingTours/​browser/​parallelTasksTourContribution.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​onboardingTours/​browser/​newSessionViewTourTrigger.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​onboardingTours/​browser/​newSessionViewTourContribution.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​onboardingTours/​browser/​newSessionTourContribution.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​onboardingTours/​browser/​agentsWindowInvitationOnboarding.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​layout/​test/​browser/​desktopStrategies.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​layout/​browser/​desktopLayoutController.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​layout/​browser/​desktop/​desktopLayoutStrategy.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​layout/​browser/​desktop/​desktopDraftSessionStrategy.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​layout/​browser/​desktop/​desktopDockedTabsCoordinator.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​layout/​browser/​baseSessionLayoutController.md Updated as part of this pull request.
src/​vs/​sessions/​contrib/​github/​test/​browser/​pullRequestActions.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​github/​test/​browser/​issueActions.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​github/​test/​browser/​githubContribution.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​github/​browser/​pullRequestActions.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​github/​browser/​issueActions.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​getStarted/​test/​browser/​getStartedTourRunner.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​getStarted/​browser/​getStartedTourRunner.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​codeReview/​test/​browser/​codeReviewService.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chatWindow/​browser/​openChatInWindow.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chatWindow/​browser/​chatWindowActions.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chatEditor/​test/​browser/​chatEditor.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chatEditor/​browser/​chatEditor.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionsWorkbenchFixtureUtils.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionsChatAccessibilityHelp.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​runScriptAction.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​responseSelectionSideChatController.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​artifactIntegrationPresentation.fixture.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​aiCustomizationWorkspaceService.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​agentHostDelegation.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​electron-browser/​chat.contribution.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​browser/​sideChatProvider.contribution.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​chat/​browser/​agentHostDelegation.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​changes/​test/​browser/​sessionChangesEditorInput.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​changes/​test/​browser/​checksActions.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​changes/​test/​browser/​changesActivity.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​canvases/​test/​electron-browser/​sessionCanvasWorkingSet.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​canvases/​test/​electron-browser/​sessionCanvasRegistryService.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​canvases/​test/​browser/​pinnedCanvasService.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​canvases/​electron-browser/​sessionCanvasService.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​browserView/​test/​browser/​sessionBrowserNetwork.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​agentFeedback/​test/​browser/​agentFeedbackPRReviewSeeder.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​agentFeedback/​test/​browser/​agentFeedbackEditorOverlay.test.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​agentFeedback/​browser/​agentFeedbackService.ts Updated as part of this pull request.
src/​vs/​sessions/​contrib/​agentFeedback/​browser/​agentFeedbackItemsBackend.ts Updated as part of this pull request.

Review effort: Balanced

The header's pane commands resolve their target from the host their menu
passes: the part service's view of that host, then the sessions service's
activatePane (Maximize) and closePane (Close). The grid fixtures' fakes
lacked those, so Maximize from a pane's More Actions threw before it
maximized, failing the Playwright test "sessions grid header actions
update their owning state".

Co-authored-by: Copilot <[email protected]>
@sandy081
Sandeep Somavarapu (sandy081) merged commit 29ce94a into main Nov 6, 2026
51 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the agents/canonical-session-object-design branch November 6, 2026 16:45
@vs-code-engineering vs-code-engineering Bot added this to the 1.146.0 milestone Nov 6, 2026
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