cmux NEXT: coalesce Session Info and preview chat shift

Closed
TE
9d ago
+124-1

Problem

With Session Info open, clicking a chat link opens the right preview pane. The transcript moved once for the Session Info room shift and then moved again for the preview pane's flex resize.

Leo's words:

"The session real thing, like the fact that it, you know, when you open up a rate, just you click a link and you open up the right pane, and then it gets pushed, like, twice. It gets pushed once because of the session rails situation. It gets pushed another time because of the fundamental right pane opening up."

Root cause and fix

ChatInspector recomputed --acpmux-chat-shift from the side panel's changing room while the preview sibling was entering, so the existing translate transition started from stale Session Info geometry after the flex resize had already begun. The fix holds the floating Session Info shift at zero while beside is opening; the preview pane's own entry motion then carries the transcript once to the settled layout.

Chromium proof

The new real-Chromium test records .acpmux-scroll's left edge on every window.cmuxAfterPaint frame from the click until both the artifact and web animations settle. The bounded MutationObserver disconnects after the artifact is inserted, and the recorder stops on settled animations after four frames or at 240 frames.

Before (base feat-cmux-next, failing):

[-111, -111, -111, -111, -111, -111, -111, -119.92, -102, -70.07, -55.75, -30.91, -20.58, -11.98, -5.3, -1.14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

After (PR head 86ced6354888cb18855ec174bc387d2da649ac9b):

[-111, -111, -111, -111, -111, -111, -111, -94.41, -79.15, -51.68, -28.61, -19.1, -11.09, -1.07, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

The assertion passes because every non-trivial delta has the same sign and the transcript reaches its final x once, without a reversal or second start.

Cleanup

  • No native build was run on huge-blue; native pane behavior is unchanged.
  • No changes to inspector.css or header.css lines touched by PR #25641.
  • The test uses bounded animation waits, a disconnecting observer, and a 240-frame cap.

Risk

The beside opening now suppresses the floating Session Info shift until the preview room is present. Session Info remains a floating panel over the agent pane, and its normal shift logic is unchanged for non-preview rooms.

Checks

Passed: focused Chromium regression, check:fixed-waits, check:design-tokens, vp lint/format on changed files, tsc, and prepush-gate.py.

check:layers remains red on an unchanged baseline violation in webviews/src/pages/keybindings/styles.css (backdrop-filter lacks a reduced-transparency fallback). The aggregate web lint also reports two unrelated pre-existing format issues in src/agent-session/acpmux/agentAvatar.test.ts and src/agent-session/acpmux/header/ChatHeaderTools.gallery.tsx; the web browser-lane gate and changed-file format checks pass.

Agent session: agent session