base red: the message-row chevron test measures the gap after the preview, not the sender
incoming-message-disclosure-browser.test.ts > a delivered message and a waiting one draw the same line: chevron after the words, actions on hover has been red on every feat-cmux-next push since #34464 (13 of 13 push runs in the last day, Expected: <= 8.5 / Received: 265.7 at line 477).
Cause
#34464 puts the sender and the message's first line on one row again, so the line holds both .cv-received__from and .cv-received__preview. querySelector(".cv-received__preview, .cv-received__from") returns whichever node comes first in the document, which is the sender. The test then measured the gap from the sender's name to the chevron (233-275 px) instead of from the message's words. The UI is right: the chevron sits right after the preview.
Change
The test now measures from the preview and falls back to the sender only in the stacked gallery look. This is a test-only change.
Verification
cd webviews && CMUX_BROWSER_TESTS=1 bun test ./test/incoming-message-disclosure-browser.test.ts -t "a delivered message and a waiting one": red on the base (0 pass, 1 fail), green here (1 pass).
Observed / Not run
- Observed: the red/green run above, in Chromium and WebKit.
- Not fixed here: the same file's other base red,
the chat's last row, opened with the view at its end, ...; closed, stays on its pixel. It started with #34780: after the bottom fold, a programmatic scroll (scrollIntoViewIfNeeded, or settingscrollTop) is pulled back to the end within 300 ms, so the line stays at -922 px. That is a change in the transcript's follow behaviour, not a test bug, and it goes to #34780's owner.
Changelog
none
Agent session: agent session
š¤ Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith Ā· Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the message-row chevron test, which has been red on every feat-cmux-next push since #34464.
#34464 put the sender and the message's first line back on one row, so the test's list selector returned the sender (the earlier node in the document) and measured the gap from the sender's name to the chevron (233ā275 px) instead of from the words. The test now queries the preview first and falls back to the sender only in the stacked gallery look. Test-only change.
The file's other red test (the chat's last row, opened with the view at its end, ...) is not fixed here: it started with #34780 and is a change in the transcript's follow behaviour, not a test bug.