fix(agent-chat): keep footer geometry through turn settle

Merged
TE
12d ago
+161-10

Leo, 2026-10-24, reported the regression in #24765 verbatim: “also i just noticed this jump like i think we're mildly optimistically giving the response a gap... but then after you wrote stuff and finished, it ended and then it snapped back after it realized it didnt need that much space...”

Fix

The live activity line under a plan now carries the same 48px footer slot as the settled turnSummary: a 24px metadata line plus the normal 24px turn gap. The row is marked below, rendered with an explicit fixed-height slot, and the DOM swaps the activity content for the finished footer in place. The existing live thinking/working rows use the same slot.

Proof

  • src/agent-session/acpmux/rowEstimates.test.ts: short and long replies plus a tool-ending turn all compare live and settled heights at 48px.
  • test/agent-pane-stream-jitter.test.ts: frame strip captures the last streaming and first settled frames and asserts the reply markdown bottom and composer top differ by at most 1px for short, long, and tool-ending replies.
  • bun test src/agent-session/acpmux/rowEstimates.test.ts (19 passed, 58 expects).
  • bunx vp fmt --check and bunx vp check --no-fmt --no-lint pass; git diff --check is clean.
  • Browser lane was attempted locally; it is gated to CI/Freestyle and no local engines are installed, so the frame test remains a fleet/CI receipt.

The permanent gap remains absent: only the live footer slot is reserved, and it is exchanged for the same settled geometry without an end-of-turn collapse.

Before/after capture

Gallery before/after (merge-base versus this head, agent-pane entries): https://cmux-lawrences-mac-mini.tail137216.ts.net:18796/compare/codex-composer-settle/?entry=agent-pane

The gallery compare page returned HTTP 200 when checked through the supported reach cmux-lawrences-mac-mini route (2026-10-24). A native capture-mini attempt was not applicable to these webview-only paths; the Linux capture job failed in rust_compile: tui-fetch and the explicit Mac capture queue had no admission.

Agent-Session: big-red