cmux NEXT agent pane: opening another chat plays the stagger motion by default

Closed
TE
3d ago
+9-7

Leo, 2026-11-03, sharing a game menu animation clip: "i thought was cute and cool and i wanted to have more... nice stuff? around the app..." (and 2026-11-01: "honestly i just want to be able to be able to eventually play full-on animations like this").

Leo-ask: ask-1ec99cec90

What

The chat-switch-motion experiment (cmux#30602) now defaults to its picked arm, stagger: opening another chat moves the title, then the visible rows bottom-up (6 px rise, 16 ms apart, one spring) with Session Info's body following from the right, all settled within 240 ms. Off, Fade and Depth stay one cmux.experiments override away, and the gallery's compare arms are unchanged.

Spec: leo-workspace design/motion-and-polish.md (Choreography) carried the open question of whether a switch performance on by default outranks rule 14 ("instant if cached"). Leo's ask answers it. The switch itself stays instant: the new chat is in the DOM on the frame it lands, and the motion plays over it.

Risk

Small: a one-line default change plus comments. Already covered by what #30602 shipped:

  • Reduce Motion: fades only, no travel; data-cmux-motion=off, a zero --agent-motion-in or a hidden page plays nothing.
  • No timer or loop: finite Web Animations with fill: backwards, cancelled when the transcript unmounts; the next switch starts from the drawn value.
  • Frame cost (latency harness chat.switch.<arm>, Linux pool, 10 runs, from #30602):
metricbefore (off)after (stagger)deltaharness
frame p5016.9 ms16.7 ms-0.2 mschat.switch.off / chat.switch.stagger
frame p9536.7 ms30.1 ms-6.6 mssame
dropped frames1011+1same
long tasks000same

Agent session: agent session

๐Ÿค– Generated with Claude Code


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


Summary by cubic

Makes the stagger motion the default when opening another chat in the NEXT agent pane. The switch stays instant โ€” the new chat is in the DOM on the frame it lands โ€” and the motion plays over it; off and the other arms remain available via a cmux.experiments override ({"chat-switch-motion":"off"}).

  • Motion still respects Reduce Motion, data-cmux-motion=off, a zero --agent-motion-in, or a hidden page.
  • Frame cost is flat (p95 improves 6.6 ms; no new long tasks).