gallery: sent-row plays click the stacked first line; minimal received-row shift rows follow #33249

Merged
TE
3d ago
+41-13

Base red: gallery health on feat-cmux-next (run 41683705075 at 2e9aa60ffa). These states were green at 38fa1fd5c4 (run 41663855780) and are red in both renders now:

StateRedCulprit
agent-pane.agent-message-row#sent-opened, #sent-opened-longplay: waitFor did not hold within 5000 ms#33249
agent-pane.sent-message-rows#with-previewplay: no element for button "/net-retries: done/"#33249
agent-pane.incoming-message#minimal-fade-count, #minimal-inline-nameshift 0.0318 vs baseline 0.0175 (click the inbox "Received N messages" toggle)#33249
agent-pane.incoming-message#minimal-openshift 0.0816 vs baseline 0.0624 (the same inbox toggle, then the Landing report line)#33249

Cause. #33249 made message rows stacked by default, a deliberate design: "A sent message, another agent's received line, an inbox thread and a folded group's head draw their verb, chip, count and chevron on the row and the message's first line (a group's senders) on its own line under it, at the text column, cut there (messageLineLook.ts, default stacked)". Leo agreed to that split on 2026-11-02 (messageLineLook.ts quotes him). So:

  • A send's first line is now a separate .cv-sent__below line, outside the row's role="button", so the row's accessible name no longer contains "net-retries: done".
  • A shut AgentMessageRow's toggle holds no words. #33249 gives it a negative inline margin so the chevron sits right after the chip. A click at its centre lands on the recipient's chip, and in sends()/long() that chip is a known subagent's button, which opens the subagent and stops the click before it reaches the line. both-directions-opened's recipient has no chat, so its click still toggles, and it stays green.
  • Each opened Minimal Mode received line is now 40px (22px row plus 18px first line) instead of 22px. Opening "Received N messages" therefore pushes the rows under it further: 0.0175 to 0.0318, the same ratio as 66px to 120px.

Fix.

  • Code (foldAnchor.ts): #33249's first line toggles its row, but it is not a fold toggle. A click on it held nothing; the first line goes away as the row opens, and the transcript then followed the bottom and moved the opened row up 116px. The first round of this PR found that in sent-opened-long (shift 0.1171). foldToggleAt now maps a click on a .cv-msgline__preview first line to the row line it stands for (a sent line, an agent message line, a received line, a folded group's head), so the row stays where it was clicked, just as when the line itself is clicked. Unit tests are in foldAnchor.test.ts.
  • Gallery:
  • with-preview clicks the send's first line (text: /^net-retries: done$/), which toggles the row as before.
  • sent-opened and sent-opened-long click .cv-agentmsg__below, the first line under the row, which a person clicks and which toggles the row.
  • The two shift rows follow #33249's taller opened lines (0.0175 to 0.0318), which #33752 measured before the stacked look. minimal-open opens the same row and then the Landing report line, so its row follows too (0.0624 to 0.0817). #33752 set 0.0624 as 0.0175 (inbox toggle) plus about 0.045 (Landing report). Now the inbox toggle scores 0.0318, and the Landing report click scores 0.0411 or 0.0498, depending on whether the step's settle catches one more frame of the fold (8 or 10 shift frames). So the state scores 0.0729 or 0.0816. The PR's foldAnchor.ts change adds none of it: the play clicks the line's toggle itself, not a first line. A fleet render of this entry with foldAnchor.ts reverted to the base scored the same two values (0.0816 in 3 of 3 light renders, against 1 of 6 at this head). The base replay's 0.0728 was the low mode. The row is the worst measured, 0.0817; its limit adds its usual 25%.
  • invariant-baseline.json: minimal-open's center-line rows (user-8, user-9, user-10) are dropped. The health run lists them as "Mended; drop from invariant-baseline.json" at the head and on the base. The old rows were correct for the one-line look and are wrong for the deliberate stacked one; that is the only reason they are widened. #33987's disclosure rows are untouched.

Risk. Low. The one code change widens which clicks hold a disclosure line, adding the first line under a stacked message row; the other changes are gallery plays, three shift-baseline rows and one mended invariant row. Verification is this PR's own gallery health run.

Agent session: agent session

šŸ¤– Generated with Claude Code