test(transcript): Claude cohesion variant measures its turn's Worked for

Merged
TE
2d ago
+42-49

Fixes the base red in webviews/test/transcript-cohesion.test.ts on feat-cmux-next (web / react-apps-base-check (2) reported "webview test red step (base): test/transcript-cohesion.test.ts", which then charged unrelated PRs such as #34881 with "claude keeps the activity rhythm (light)").

Regressing PR: #34774 ("a finished Claude turn folds under one Worked for, its runs inside"). It gave a finished Claude turn the same Worked for header Codex has, per Leo: "ofc claude code doesn't actually have the worked for... but i think we should be able to do that replacing the top level thingy maybe". #34607 had written the cohesion test while Claude still drew no header, so its claude variant asserted headers.count() === 0. The two landed about an hour apart and neither ran against the other, which left both claude keeps the activity rhythm tests failing on base (2 of 48 failed, reproduced at 6e9fc2cbd40).

Fix: the test is stale against the settled design, so the test changes and the product code doesn't. The claude variant now goes through the same checks as codex-closed: a 22px header, a 16px gap to the reply, and 38.375 centre to centre (step-to-prose in design/transcript-spacing.md). The gallery note and header comment drop "no whole-turn Worked for". No spacing value changes.

Fleet run at this head: 48 pass, 0 fail (claude light/dark measured headerHeight 22, replyGap 16, replyCenterGap 38).

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the stale transcript-cohesion test so the claude variant measures its turn's Worked for header instead of asserting none exists. PR #34774 folded finished Claude turns under the same header Codex has, which left this test red on feat-cmux-next.

  • Updates the claude variant to check the same 22px header and 16px reply gap as closed Codex.
  • Updates the gallery note to drop the "no whole-turn Worked for" wording. No product code or spacing values change.