cmux-next agent pane: chat summary docks beside a wide chat; popover only when narrow

Closed
TE
20d ago
+31983-31225

Leo (10-14, via the coordinator) on the first version: the summary is always a card pinned under its toolbar button, never a separate pane. Clicks elsewhere leave it open. In a wide window the chat moves aside for it; in a narrow one it lies over the transcript. Lawrence's 10-14 call asked for it to persist rather than close like a popover, and the coordinator added the chat ⋯ menu, modelled on ChatGPT's. This builds on d77476fd's summary card (feat-cmux-next-sap-subagent-panes) and keeps its lists, subagent rows and subagent panes.

This is phase 1: the pinned card, New terminal and New browser, and the ⋯ menu. Two follow-up PRs:

  • cx-x62ev: the Subagents detail tab. It will use op-next-launch's shared SubagentRow once that lands.
  • cx-thur3: Sources "+": Use tools and Attach files.

The card

  • A rounded card with a soft shadow, under the header's summary button at the pane's right edge. It is as tall as its content and scrolls past the window's height.
  • Open by default. Only its × , the summary button or Escape closes it. A click in the transcript, the composer or anywhere else leaves it open.
  • Closing is one choice for every chat. It persists, and other panes follow it, until the summary button opens the card again.
  • It steps aside while an open artifact, the Inspector, diff review, replay or the Harnesses screen covers the chat, and comes back after.

Wide pane: beside the chat

  • When the pane fits a 660px chat column plus the card's 322px, the chat column moves left by that much. The card then sits beside the transcript and the composer, covering neither.
  • The header stays full width, so its buttons don't move.

Narrow pane: over the chat

  • The same card, in the same place, lies over the transcript's right side. The chat keeps its full width.
  • A pane that starts narrow (a split, a small window) starts with it closed, so it doesn't cover a prompt's Edit or an agent's offer. Its button opens it there. Closing is still one choice for every chat.

Resizing

  • Crossing the width switches between the two without closing the card. The chat column eases over 160 ms while the card stays put.
  • Reduced motion makes the switch instant.

New terminal / New browser

  • They lead the panel as two filled, labelled buttons.
  • They also appear in the ⋯ menu.
  • Each opens a new one beside the chat every time, even where the header's Terminal and Browser buttons toggle.

⋯ menu, in ChatGPT's order

  • Rename, Pin.
  • New side chat, New terminal, New browser, Fork, Continue in.
    • Fork: for harnesses that fork at any turn (Claude, Codex), it is a submenu: From here, then earlier prompts, newest first. Otherwise it is one row.
  • Copy: adds Copy session ID.
  • Move to right pane, Move to new workspace, Open in new window.
  • Tools.
  • Mark as Unread, Archive, Close.

Review fixes (correctness and UI reviewers, first version)

  • Escape moves focus back to the summary button only when focus was in the card. Typing in the composer keeps it.
  • The summary button is disabled while replay, the Inspector, diff review or the Harnesses screen covers the card. Clicking it there used to close the card in every chat with no visible change.
  • The summary button reports aria-expanded and aria-controls.
  • Fork's submenu names each turn by the prompt that began it. A steer doesn't rename it, and an image-only turn is left out rather than shown under the previous prompt.
  • New terminal and New browser are 28px rows.
  • The room check measures the page, not the chat's element. The earlier ref set state as the chat mounted, and a relaunched new chat lost its kept draft. agent-pane-unsent-draft failed on every run until this change; it passes with it.

Menu height

  • The menu now takes the window's height before it scrolls, instead of a 540px cap.
  • With the cap, the two new rows pushed Mark as Unread, Archive and Close out of view on a 900pt window. Close was already cut off on base.

Left out:

  • Add scheduled task: there is no feature to wire it to.
  • ChatGPT's Share: no equivalent.
  • No dead items.

Shortcuts

  • Only existing shortcuts are shown. No new defaults ship.
  • Proposed for a call, matching ChatGPT (not shipped): New side chat ⌥⌘S and Rename ⌥⌘R (ours is ⌘R today); neither has a default binding now. ChatGPT's Archive ⇧⌘A is taken here (Search Tabs…, and Simulator: Toggle Appearance), so Archive needs another key. op-next-call-keys lists all three in the menu audit (cmuxterm-hq#2015, C3/C9).
  • op-next-call-keys owns the menu-wide audit. They know this menu uses sentence case.

Removed: the fold, and the first version's flat docked column and outside-click popover.

Showcase

Tagged DEV builds on cosmic-gray: base c528244e (this PR's merge base) vs head ad207000, the agent pane's mock session, light and dark. The head of this PR differs from ad207000 only in starting a narrow pane closed; every capture below begins wide, where the card is open. Host names are blurred.

Wide pane. Before, the summary starts closed and its button opens a popover that any click elsewhere closes. After, the card is pinned under its button and the chat column moves aside.

summary wide light

summary wide dark

Narrow pane. Before, the popover. After, the same pinned card lies over the chat, which keeps its width.

summary narrow light

summary narrow dark

Resize, wide → narrow → wide, recorded and watched. The card stays open at the pane's right edge. Narrowing moves it from beside the chat to over it; widening eases the chat column back aside.

summary resize light

Full quality:

summary resize dark

Full quality:

Chat ⋯ menu, before and after.

chat menu light

chat menu dark

A ChatGPT reference capture of its summary, next to the first version, is in the private screenshots archive (team only): manaflow-ai/cmux-app-screenshots references/chat-summary-2026-10-14/chatgpt-vs-cmux-summary.png.

Testing

All browser tests below run with CMUX_BROWSER_TESTS=1, one file at a time.

  • webviews/test/agent-pane-summary-panel.test.ts, rewritten for the pinned card:
    • Red at 4c57b5f8 (the tests on the first version): the wide, narrow and resize tests fail on their checks (the wide card is not under its button, Expected: >= 35, Received: 0; no card in a narrow pane). The three kept tests pass.
    • Red at 2d66a0ce (the narrow-start test before its fix): Expected: 0, Received: 1, the card already open in a pane that starts narrow.
    • Green at 76d261d4: all 6 pass.
  • The first CI run of the rework (ad207000) showed what a card open in every narrow pane breaks. It covered a prompt's Edit and Next version (agent-pane-branches), View changes (agent-pane-edited-side) and an agent's session offer (agent-pane-session-offer). Hence the narrow-start rule. Locally at 76d261d4 these pass, along with agent-pane-background-tasks and sources-changes.
  • agent-pane-chat-column measures the column with the card closed now: an open card moves it aside in a wide pane, by design. Its "the transcript and the composer share one column" test passes locally. On big-red, "a prompt is a solid bubble" is off by 1px (3 vs ≤ 2) both with and without this change; it passed in CI on 4262e2ab.
  • subtle-elevation and popup-surface: 43 pass. vp fmt --check and gen-strings --check pass; vp check has no type errors.
  • cmux-next checks is red on base (chief_brains.rs literal state root, IdleOwnerRestart.swift spin loop); #20767 fixes both. This PR has no Swift or Rust changes.

Changelog

  • Changed: The agent chat's summary is a card pinned under its button that stays open until you close it. On wide panes the chat moves aside for it; on narrow panes it lies over the chat.
  • Added: New terminal and New browser in the chat summary and the chat's ⋯ menu, a Fork submenu for earlier prompts, and Copy session ID.

🤖 Generated with Claude Code