base red: transcript gap and column-edge tests read the layout grid

Merged
TE
4d ago
+136-34

What is red on base

feat-cmux-next's webview suite fails in several transcript gap and column-edge tests. #27580 (044769ae, transcript columns and block spacing) is the culprit and the intended design: every vertical gap now belongs to the transcript's stack (leo-workspace design/grid.md Rule 5, "A gap belongs to its container"; 5.5 Vertical rhythm: inner 12, block 24, turn 32), and the column's minimum edge is 16 (grid.md 5.5 Columns, "the minimum edge is 16 (today's 18 moves to it)"). These tests still encoded the pre-grid values. Test-only PR: no product code changes.

Per assertion (all are stale references; the tests now read the token or constant)

TestBase failureNow
src/agent-session/acpmux/plainUserHeight.test.ts:46estimates 36 too large (117 vs 81, 97.5 vs 61.5)row height is content only; the prompt's 4 + 24 + 8 = 36 of meta gap, meta row and message gap moved to the stack's turn gap. Expectations: 61.5/267.5/84.25... (font 14), 81/365/113.5... (font 20). grid.md Rule 5
plainUserHeight.test.ts:92 (thematic break)54 vs 1818, same reason
test/agent-pane-long-prompt.test.ts:183gap under the long prompt 32, expected < 1gap equals --grid-gap-turn read from the pane (32). grid.md Rule 5, 5.5
test/transcript-long-chat-updates.test.tsx:159every adjacent pair 24/32 apart, expected 0each pair sits transcriptGap(rowMark(a), rowMark(b)) below the one above (24 block, 32 next to a prompt). The check also asserts the fixture has no two consecutive one-line rows, so it never holds a one-line pair (#29965 pitch) to a stack gap. grid.md Rule 5, 5.5
test/agent-pane-chat-column.test.ts:399edges [16,16], expected [18,18]expected edge read from the pane's --cv-edge and checked to be 16. grid.md 5.5 Columns
test/thread-rail-narrow-gutter.test.tsx:173rail width 12 at 320, expected 14MIN_EDGE - 4 (12), MIN_EDGE from the grid's icon-box (what transcriptColumn and --cv-edge read). grid.md 5.5 Columns
test/transcript-spacing-reference.test.ts:202 paragraph -> prompt45.75 ink to ink, expected 49.75moved out of the 2026-10-30 assertion into its own case: the two rows' boxes are one --grid-gap-turn (32) apart, which is 45.75 ink to ink. grid.md 5.5 Vertical rhythm

Still red on base, left alone on purpose

  • transcript-spacing-reference.test.ts "a reply keeps its 2026-10-30 room": reply -> notice is 32.75px, the reference says 43.75px. This is still red on base and at this PR's head. It was left as is on purpose: changing it may undo #29124's centred status row, and the grid work is checking it against #29124. The green run below excludes that case: the spacing-reference file ran with -t "turn gap from the next prompt" only.
  • queued-user-footer.test.ts, agent-pane-recap-card.test.ts and transcript-gutter-select-browser.test.ts ("No exposed row gap after m1") are product regressions from the grid change; the grid work fixes them in product code, so this PR does not touch them.

Checks

Fast checks at the head: plainUserHeight, agent-pane-long-prompt, agent-pane-chat-column, transcript-long-chat-updates, thread-rail-narrow-gutter (whole files), and transcript-spacing-reference -t "turn gap from the next prompt".

šŸ¤– Generated with Claude Code

Agent session: agent session