Agent chat: incoming messages, notices and waiting steers are estimated as drawn

Merged
TE
17d ago
+37-8

Follow-up to #22754: three transcript rows whose height estimate (model.ts measuredRowHeight) differs from what the CSS draws, so they jump when they first draw:

RowDrawnEstimated before
Another agent's message (.cv-received)2px margin + 26px line + 2px margin + 8px row padding = 38px30px
A task notice (.cv-tools 2px top margin)2 + 26 + 8 = 36px34px
A steer the agent hasn't read (PendingSteer, .cv-user__pending)an extra 4px + 16px linenot counted

App.tsx also marks a reply as sitting right above its footer using the next row that draws (nextDrawnRow), the same rule the estimate uses. Before, it used the next row, so a hidden bookkeeping row between them broke the match.

The branch starts from #22754's pre-squash head 537c356. Its content matches feat-cmux-next's squash 0ed75af, so the diff against feat-cmux-next is only this follow-up.

Changelog

none

Observed / Not run

The test is webviews/src/agent-session/acpmux/rowEstimates.test.ts (no browser). Fleet runs of cmux-ci run --class light --script scripts/ci/run-webviews-tests.sh on the full suite:

  • Red, 42f13db (step c6858283326ff27d07adbc42): FAIL rowEstimates.test.ts: Expected: 38 / Received: 30 (incoming message), Expected: 36 / Received: 34 (notice), Expected: 20 / Received: 0 (waiting steer). 609 files, 15 failed.
  • Green, c5b0cde (step 0dd3384e7667a81cb4b192a6): PASS rowEstimates.test.ts. 609 files, 14 failed.
  • After merging feat-cmux-next 63bd306 (head 02ee756, step a40fc798e979a1cb7c4b7db8): PASS rowEstimates.test.ts. 617 files, 17 failed: 12 can't launch a browser on these workers; 5 are base reds (composer-suggested-prompt, gallery-coverage, queue-row-actions, tooltip-rules, stats-page German date format). The diff against base is unchanged from the reviewed commits.

The other 14 files fail the same way in both runs and on #22754's merged head, in code this PR doesn't touch:

  • 10 can't launch a browser on these fleet workers.
  • 4 are base reds: composer-suggested-prompt, gallery-coverage (CloudFeature), queue-row-actions, and tooltip-rules (PromptDelivery, PendingSteer).

Not run: the App.tsx beforeFooter change has no browser test of its own. It uses the same nextDrawnRow rule the unit-tested estimate uses.

Agent session: cosmic-gray

🤖 Generated with Claude Code