feat(cmux-next): add Labs workflow summary seam

Merged
TE
13d ago
+596-4

What changed

Adds a Labs-only workflow summary/detail seam to the cmux NEXT agent chat. The summary row shows progress, elapsed time, and token totals; expanding it shows phases on the left and the selected phase's agents on the right, with transcript links and optional pause, stop, and save callbacks. A strict optional wire adapter keeps the surface absent until acpmux supplies both phase and agent arrays, so existing chats and the default summary are unchanged.

The gallery includes an explicit workflow-labs fixture for review. Runtime actions are intentionally callback-driven because acpmux does not emit workflow events yet.

Leo: “If acpmux has no workflow events, prefer the smallest typed contract/adapter seam and keep the UI hidden until data is available.”

Changelog

  • Labs preview: add an opt-in workflow summary/detail fixture and typed adapter seam for future acpmux workflow events.

Validation

  • python3 scripts/cmux-next/prepush-gate.py — passed.
  • bun run check:catalog-keys — passed.
  • bun run acpmux-protocol:check — passed.
  • git diff --check — passed.
  • Web lint reached inherited/base design-token, text-focus, and lint warnings; no new workflow-file design-token findings. Local bun run typecheck was unavailable because vp is not installed in the checkout; fleet validation is required.

Agent session: big-red


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


Summary by cubic

Adds a Labs-only workflow summary/detail view to the cmux NEXT agent chat, hidden until acpmux supplies a typed workflow payload. The summary row shows progress, elapsed time, and token totals; expanding it shows phases on the left and selected agents on the right, with localized state labels and headings, a large-workflow warning, transcript links, and pause, stop, and save actions that render disabled when the host provides no callbacks.

  • Keeps the surface absent unless the adapter receives a complete payload with non-empty phase and agent arrays; malformed payloads (bad states, duplicate IDs, dangling references, unknown selections, agents not covered by phases) are ignored, with new adapter tests.
  • Gates the workflow behind a dedicated workflowLabs state and host event so the host can opt the surface in without changing preview semantics.
  • Transcript links reveal and scroll to the agent's row, opening the enclosing fold first when needed.
  • Adds a workflow-labs gallery fixture and a host-event test.