webviews: fix the react-apps-check (1) base red (six tests from #28537, #28176, #28113, 08e13568)

TE
6d ago
+36-53

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 testIntroduced byCauseFix
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 timerthe 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 …"#28537samesame
effect-interval-cleanup.test.ts "removing the existing cleanup from real direct and nested interval effects fails"#28537SubagentGroup.tsx no longer has a clearInterval( to mutatemutates 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 itnew 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 scalebox-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__linethe 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 -S and 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-check shards are the green evidence.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
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 stubbing setInterval, since useNow moved to ui/pageClock.
  • The interval-cleanup lint test now mutates RunBoard.tsx's poll interval instead of the one removed from SubagentGroup.tsx.
  • The harnesses sign-in test dispatches new window.Event("focus") instead of the runtime's global Event, 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.