debug(next): the subagents fixture can start more than two subagents (agents), plus capture states

Merged
TE
6d ago
+454-13

Leo, 2026-10-28 (leo-workspace design/pane-placement.md):

"I mean the right top pane, and then you split to the bottom once so that you get the three items. But you want four items. I don't know what the fourth item should go."

Test tooling for #27789 and #28044. To show where the 3rd and 4th subagent land, a capture needs more than the two subagents the subagents fixture starts today.

What changes

  • debug.agent_pane seed_rows with fixture: "subagents" takes agents (2 by default, clamped to 2-8). Beyond the reviewer and the auditor, it adds helpers that stay running through every step, each with a tray line a capture can click.
  • With agents unset the fixture is exactly as before. It's debug-only (debug.agent_pane, DEBUG builds), so users get nothing new.
  • Two capture states, both driving the tray by CSS selector rather than label text. The last capture was refused because its label-text clicks matched nothing.
    • scripts/cmux-next/media/states/subagents-four-panes.json: four subagents opened from the chat's tray (#27789).
    • scripts/cmux-next/media/states/subagents-beside-right-pane.json: a terminal on the chat's right, then two subagents (#28044).

Test

webviews/test/agent-pane-subagents-fixture.test.ts gains a case:

  • agents: 4 starts four running subagents, and the two helpers are still running at step 4.
  • Unset equals 2.
  • Values below 2 or above the max are clamped.

No capture: this changes no UI anyone sees, only a debug fixture (debug.agent_pane, DEBUG builds) and two capture state files. With agents unset the fixture is unchanged.

Agent session: agent session

šŸ¤– Generated with Claude Code