cmux NEXT agent pane: a click on a subagent stays in the chat unless panes are on
Clicking a subagent in cmux NEXT now shows it in the chat's own pane unless Open subagents in panes is enabled. The switch is off by default and governs clicks on group lines, card rows, workflow agents, and the agents pill, as well as background discovery.
The shared navigation helper preserves workflow identity, the base's subagent tab titles, and transcript-tail handoff before a pane request. An existing subagent pane keeps navigation inline; a refused pane request falls back inline for a user click. The switch label is updated in all 21 locales, the release highlight is updated, and pane-opening gallery fixtures explicitly enable the switch.
Takes back #28235: moves its direct pane-opening callback into the preference-aware helper while preserving transcript handoff before every pane request; its wiring test follows that delegation.
Takes back #28497: routes pane opening through the shared helper while preserving the subagent's own tab title and the base's shown-subagent title synchronization.
Testing
Verification ran on Freestyle VM vm-4ec92ccff4b54681bce159846c1b630d, paused after use:
cd webviews && bun test test/subagent-click-stays-in-chat.test.ts: 5 pass / 1 fail at regression commit0cb868a3067a1e3b4bd2580aa6517f16195f87d8when the helper drops the base title; all 6 pass with title forwarding at4ebd389705ddf6e617f718fe9ff0d6d77864b6da.cd webviews && bun test test/subagent-click-stays-in-chat.test.ts test/subagent-panes-default-off.test.ts test/subagent-panes-auto-open.test.tsx test/agent-pane-new-tab-cached-chat.test.ts test/subagent-pane-tab-title.test.ts: 26 pass / 0 fail. Before the fixture repair, cached-chat wiring ran 12 pass / 1 fail because it searched for the replaced direct call.scripts/web-lint.sh --base <exact-base-content-snapshot> --new-only: passes with zero PR findings against base8e604c7e594defc4e13e7c72f57c6737760d5614. Full checks have four inherited failure classes: design tokens and layers in unchanged Settings CSS, formatting in unchanged Settings files, and two lint warnings in unchangedContextMenusCard.tsx. Type checking passes.CMUX_GALLERY_IN_VM=1 bun health.ts --manifest /tmp/pr24017-merged-manifest.json --gallery-dir /tmp/pr24017-gallery --output-dir /work/artifacts/merged-navigation-health: all six affected light/dark cases render with zero broken states. The old workflow fixture failed waiting for a pane request; the repaired fixture checks inline workflow identity and absence of that request. Health excludes advisory layout-shift and long-frame findings.
Observed / Not run
- Observed: exact-head static pre-push gate passes with no new violations. XCStrings structure passes; the changed switch label has all 21 translations, zero outstanding translation rows, and no localization human-attention items. Full native catalog validation reports inherited debt in untouched catalogs.
- Observed: the published branch is preserved with merge commits and plain pushes. The remote branch and PR heads were checked immediately before each push. Formatting, web lint, tests, and gallery builds ran on Freestyle.
- Not run: native compilation, tagged-app dogfood, native pane placement, or live workflow transcript loading. The workflow fixture has no transcript response, so it verifies navigation rather than retrieval. This repair adds no native source.
- Known gap: a subagent pane can fall back to the whole parent chat with its composer; this PR does not fix that. The schema-backed preference migration is tracked separately in stacked #25201.
Changelog
- Changed: In cmux NEXT, clicking a subagent shows it in the chat instead of opening a split, unless Open subagents in panes is on.
🤖 Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Clicking a subagent in cmux NEXT now shows it in the chat unless Open subagents in panes is on, instead of always opening a split. The switch (off by default) governs clicks on group lines, card rows, workflow agents, and the agents pill, as well as background discovery, through the showSubagent helper in subagents/subagentPanes.ts, which also forwards the subagent's own name as its pane tab title.
Bug Fixes
- Adds unit tests covering the switch off and on, a host that opens no pane, a subagent's own pane, background discovery, and pane title forwarding.
- Renames the switch label across all 21 locales, updates the What's New highlight, and makes the two pane-opening gallery states turn the switch on first while the workflow-agent state checks inline navigation.
- Clears the switch after the gallery variants that turn it on, so it no longer leaks into later variants in the same browser.