cmux-next: Changes, Terminal, Browser and a chat menu in the agent header

Merged
TE
1mo ago
+4616-1126

Summary

The agent chat header's top right now carries the Codex desktop app's set. Every control renders from the first frame at its final size; data fills in place.

  • Changes with the last edit turn's live +N -M. Opens the existing changes view (file tree, unified/split, hunk review, j/k/n/p) beside the transcript once the pane is 1160px or wider (44/56), over it when narrower. Disabled with +0 -0 before any edit, so nothing pops in.
  • Terminal and Browser: split the chat's pane right, a terminal in the chat's folder or a browser (splitRight, splitBrowserRight; tooltips show ⌘D and ⌥⌘D from the action catalog).
  • Summary (Outputs, Subagents, Sources) stays in the cluster.
  • "..." chat menu on the shared src/ui Menu: Rename, Pin/Unpin, Fork, Continue in >, Create checkpoint, Copy link, Move to right pane, Move to new workspace, Close, each with its catalog shortcut. Fork, Continue in, checkpoint and Copy link appear only when this chat supports them. The palette's Continue in opens the menu on the harness list, and automation opens it by label like the composer menus.

The standalone Copy chat link button, the checkpoint text button and the Continue in button folded into the menu.

Native side: a pane.action page request runs one of AgentPaneModel.headerActions on the chat's own tab (never the New Tab page), with an absolute cwd for the split; pane.tabState reads the pin for the menu label. Submenu in src/ui/Menu.tsx takes a popupClassName.

Not in this PR (no backend for an agent chat yet): Open in new window, Archive, Add scheduled task, New side chat. Inventory: manaflow-ai/cmuxterm-hq#1417. #17346 is the tab-strip half of the same design (it leaves only + on chat tabs); no overlap.

Captures

Fleet builds of this branch and of its feat-cmux-next base, --showcase with the worked-turn fixture, on a capture mini.

BeforeAfter
before headerafter header
before changesafter changes split

Chat menu, next to the Codex desktop app:

cmuxCodex desktop app
after chat menuref codex chat menu
after changes 880ref codex outputs changes

The lower-left still is an earlier build at the 880px split threshold (before the 1160px change) and shows the old serif menu; the menu is open in the Changes stills because the capture opened it first.

Testing

  • bun test in webviews: all pass except the local-only chromium editor-page tests (no Playwright browsers on this host; CI skips them). New header/ChatHeaderTools.test.tsx: first-frame controls, Changes counts and toggle, menu rows and keys, disabled rows, palette Continue in, automation opener.
  • bun run check: types and lint pass; the remaining format findings are in upstream files this PR does not touch.
  • test/ui-rules.test.ts passes (ContinueMenu left the pending list).
  • All committed web bundles regenerated; --check current.
  • Swift: AgentPaneHeaderActionTests and AgentPaneShortcutsTests.readsTheHeaderActionBindings run on CI; no local Swift builds. Swift god-file check passes.
  • Fleet builds parity-surface-1..3 succeeded; captures above.

Changelog

  • Added: The agent chat header shows Changes with the last turn's counts, Terminal and Browser splits, and a chat actions menu.

🤖 Generated with Claude Code