webviews: fix the react-apps-check (1) base red (six tests from #28537, #28176, #28113, 08e13568)
Summary
Fixes the react-apps-check (1) base red on feat-cmux-next (both cmux-next web and CI / web). It hides signal: it fails the job, so the webview verdict for every PR in these surfaces is red. Since 22:16Z, shard 1 fails six tests from four landings. This PR fixes all four causes. Each change is to a test, or it brings the source back in line with a rule a test already checks.
| Failing test | Introduced by | Cause | Fix |
|---|---|---|---|
MessageGroupRow.test.tsx "a run with a message going out … ticks only while it goes" | #28537 (fe16df3f, page clock) | useNow moved onto ui/pageClock (setTimeout), so the test's setInterval spy saw no timer | the test reads pageClocks() for a running elapsed clock: 1 while a message goes out, 0 once it is sent |
workflow-tasks.test.tsx "a running workflow keeps its elapsed clock live …" | #28537 | same | same |
effect-interval-cleanup.test.ts "removing the existing cleanup from real direct and nested interval effects fails" | #28537 | SubagentGroup.tsx no longer has a clearInterval( to mutate | mutates RunBoard.tsx's conditional poll interval, which is cleared inside a block cleanup |
harnesses-page.test.tsx "a failed sign-in retries its saved login after health refresh …" | #28176 (cf0d63bf) | window.dispatchEvent(new Event("focus")) passed Bun's global Event to jsdom, which refuses it | new window.Event("focus") |
subtle-elevation.test.ts (2 tests) | 08e13568 (refined Settings, direct push) | the switch knob's literal box-shadow: 0 1px 2px rgb(0 0 0 / 0.2) is outside the elevation scale | box-shadow: var(--elevation-1) (the same 0 1px 2px, at 7% light / 12% dark) |
gallery-control-surfaces.test.ts (agent-message-row/unicode-boundary) | #28113 (1d2cb8f6, waiting messages) | hovering the sender's name (.cv-received__from--open) lit the whole .cv-disclosure__line | the line's hover plate skips while the name is hovered (:not(:has(.cv-received__from--open:hover))). The name keeps its own pill, per the rule that a hover highlight covers only its control |
Base evidence: run 41141683158 (fe16df3f), job web / react-apps-check (1) 124359769174 failed exactly these six files, first run and retry alone.
UI effect: two small changes. The Settings switch knob's shadow is lighter: same offset and blur, 20% alpha becomes 7% (light) or 12% (dark). And pointing at a received message's sender name no longer puts the 6% plate under the whole line. Pointing anywhere else on the line still does. Gallery before/after: this PR's gallery advisory run.
Changelog
none
Observed / Not run
- Observed: the six failures and their messages in the base run above. Each cause was traced to its commit with
git log -Sand the runs' per-shard failures (cf0d63bf: harnesses only; 1d2cb8f6: + gallery; 08e13568: + subtle-elevation; fe16df3f: + the three clock tests). - Not run yet when this was opened: the suite at this head. This PR's own
react-apps-checkshards are the green evidence.
Agent session: agent session
🤖 Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the react-apps-check (1) base red on feat-cmux-next: six failing tests from four recent landings now pass.
- Two clock tests read
pageClocks()for a running elapsed clock instead of stubbingsetInterval, sinceuseNowmoved toui/pageClock. - The interval-cleanup lint test now mutates
RunBoard.tsx's poll interval instead of the one removed fromSubagentGroup.tsx. - The harnesses sign-in test dispatches
new window.Event("focus")instead of the runtime's globalEvent, which jsdom rejects. - The Settings switch knob uses
var(--elevation-1)instead of a literal shadow outside the elevation scale; the shadow is lighter (same offset and blur, 7% light / 12% dark alpha instead of 20%). - Hovering a received message's sender name no longer lights the whole disclosure line; the name keeps its own pill, and hovering anywhere else on the line still does.