agent pane: a chat opened in a split starts with Session Info closed

Merged
TE
3d ago
+126-8

Leo, 2026-11-03: "i also dont like how the session info overlay is when it goes to a right split honestly it's often fine to just not have it open by default on the right like it doesn't need to inherit that..."

Leo, 2026-11-03: "like if they want it open they can just do it on the right split one but otherwise it really doesn't have that much space pretty often"

Follow-up to #32677, which made an opened subagent go to the right split.

What changes

  • A chat opened in a split starts with Session Info closed. That covers a subagent's pane, and a chat its agent started (startedBy/spawnedBy, the task and sub-session chips) when it opens beside its parent.
    • Session Info's state for such a pane is kept under a key of its own (sessionInfoPaneKey, split:<session>). With no saved state, that key starts closed instead of taking the parent's state or the last choice made.
    • If the person opens Session Info there, the choice sticks for that pane and never reaches the parent's.
    • A subagent's pane shows its chat's own session. Before this change it read and wrote the chat's own Session Info state, so the parent's open state carried over into the split.
  • Review follow-up from #32677: the comment above showSubagent in App.tsx no longer says panes open only while the switch is on.

Logic is in shared web only (sessionInfoState.ts, SessionInfo.tsx, App.tsx). The native Session Info layout is untouched.

Tests

test/session-info-split-starts-closed.test.ts:

  • A split pane's first frame and its bind read closed while the parent stays open, including after a relaunch.
  • A started chat opened beside its parent starts closed.
  • Opening Session Info in the split pane sticks there and leaves the parent's state alone.

Observed / Not run

  • Observed: bun test on the new test, session-info-per-pane-state and subagent-click-opens-right-split (23 pass); vp fmt/vp lint on the changed files; prepush gate.
  • Not run:
    • A native capture of a split chat.
    • The "split" signal for a chat opened beside an unrelated chat (for example, a "Sent to" sender chip opening another root chat). The page has no signal for that case today, and the app does not tell the page that a chat tab was opened as a split. Those panes keep the old default.

Agent session: agent session

๐Ÿค– Generated with Claude Code


Autofix with [code]smith
Open in [code]smith ยท Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Chats opened in a split โ€” a subagent's pane, or a chat its agent started โ€” now start with Session Info closed instead of inheriting the parent's open state.

  • The split pane keeps its own Session Info state under a separate key (split:<session>); opening it there sticks and never reaches the parent's.
  • A subagent's pane reads and writes its own state now that it shows its chat's session, instead of the chat's own.
  • Fixes a stale comment above showSubagent (follow-up to #32677).

Not covered: a chat opened beside an unrelated chat (a "Sent to" sender chip) and a native capture of a split chat; those panes keep the old default.