Skip to content

test(ui-tools): fix the diagnosis-map hydration race, and capture the bistable mobile-/ CLS finding - #2214

Merged
BigSimmo merged 6 commits into
mainfrom
claude/pr-review-comments-yegd3q
Aug 21, 2026
Merged

test(ui-tools): fix the diagnosis-map hydration race, and capture the bistable mobile-/ CLS finding#2214
BigSimmo merged 6 commits into
mainfrom
claude/pr-review-comments-yegd3q

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

Follow-up to #2209, working the outstanding items from that session. Two commits.

  • 646123a — fixed the ui-tools diagnosis-map failure. It failed on CI run 32460303619 with expect(getByTestId('diagnosis-map-dialog')).toBeVisible()element(s) not found after the full 10s wait: the click landed but nothing opened. gotoLauncher waits only for #main-content, so the trigger is present and clickable before React attaches its onClick, and a click inside that window is swallowed. The file already carries waitForReactEventHandler with an onClick default and uses it before fifteen other clicks — this call site simply predates the pattern. No assertion weakened, nothing skipped or quarantined.

    It is a race and not a regression, and the runs prove it: Production UI (3)passed on head 8506db3 and failed on c56d12d, whose only delta was 26 ledger JSON files. Quarantine would not have been permitted anyway on a single observation, under the three-reproductions-on-one-SHA rule.

  • 8607102 — four inbox requests, none of which edit the canonical ledger.

Verification

  • npm run verify:pr-local
PR-local verification summary:
- completed: check:runtime, check:installed-lock-parity, format:changed, sitemap:check,
docs:check-index, docs:check-inventory, docs:check-scripts, docs:check-links,
check:branch-review-ledger, check:outstanding-issues, check:ledger-write-discipline,
lint, typecheck, test, check:rag:fixtures, check:medication-interactions,
check:medication-lexicon-report
- failed: (none)
- not reached: (none)
  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed

UI verification not run: no product surface changes — one Playwright spec and four ledger inbox files. The changed spec cannot be executed here (#255: Playwright pins chromium 1234, this image ships 1194, and forcing a mismatched binary is disallowed), so its proof is delegated to CI Production UI shard 3.

  • npm run verify:release — not run: release confidence was not requested.

Risk and rollout

  • Risk: Low. One added wait in a test's setup step, and four additive JSON files. No product code is touched.
  • Rollback: Revert either commit independently — 646123a (test wait), 8607102 (ledger requests).
  • Provider or production effects: None.
  • RAG impact: none; no RAG, retrieval, ranking, scoring, fixture, or answer-generation code is touched.

Notes

On the mobile-/ CLS item — not fixed here, and deliberately so. I could not attribute it, and a blind fix would be worse than none. What is now established:

  • It is bistable, not a regression: 8506db3 passed clean while c56d12d breached at 0.223, and the only delta between those heads was ledger JSON.
  • It is not PR Make document search on demand #2199's: that diff touches only DocumentViewer.tsx and document-overview-landing.tsx, and DocumentViewer is imported solely by documents/[id]/{page,loading}.tsx, so neither is in the client bundle for /.
  • It does not reproduce locally, on two independent harnesses: scripts/measure-cls-attribution.mjs reported CLS=0.000 shifts=0, and a full local verify:lighthouse -- --keep — which applies Lighthouse's own mobile emulation and throttling — reported mobile-root cls 0.000 (ungraded, evidence incomplete — browser drift, HeadlessChrome/141 vs the baseline's /151). So it depends on something CI-specific.
  • It is probably not #JVYQEM: that row's phone remedy already landed (--spacing-mode-home-composer-phone reads 10.125rem, not the 6.625rem it records) and its scale (~0.035) is an order of magnitude below 0.223. The queued update marks that row partially stale and says what genuinely remains — the wide reserve, which needs a mechanism rather than a bigger constant.

The recorded next step needs no reproduction: every failing run uploads a lighthouse-budget-<runid> artifact containing the full report; reading the mobile-rootcumulative-layout-shift debugdata names the shifting node directly.

Also still blocked: the document-viewer Linux visual baseline re-adoption cannot be done until #2199 merges — adopting now would commit a golden for a state main does not have. Queued as its own P3 rather than guessed at.


Generated by Claude Code

…fore clicking
The dialog assertion failed on CI run 32460303619 with "element(s) not found"
after a full 10s wait — the click had landed but nothing opened. `gotoLauncher`
waits only for `#main-content`, so the trigger is present and clickable before
React attaches its `onClick`, and a click inside that window is swallowed.
This is a race, not a regression, and the runs prove it: `Production UI (3)`
passed on head 8506db3 and failed on c56d12d, whose only delta was 26 ledger
JSON files. Same code, different outcome.
The file already carries `waitForReactEventHandler` with an `onClick` default and
uses it before fifteen other clicks; this one call site simply predates that
pattern. No assertion is weakened and nothing is skipped or quarantined — which
would not have been permitted anyway on a single observation, under the
three-reproductions-on-one-SHA rule in `tests/flake-ledger.json`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HoyoNN7nCUVDLaE84k6e6c
…and the concurrency follow-up
Four inbox requests, none of which edit the canonical ledger:
- P2 issue — mobile-/ Lighthouse CLS is bistable at 0.016 or 0.223 and fires only
in CI. Records the five-run evidence, why PR #2199 cannot be the cause, and two
negative local results: the attribution harness reports zero shifts, and a full
local Lighthouse run with the same mobile emulation reports 0.000. Names the
next step that needs no reproduction — read the mobile-root layout-shift
debugdata out of a failing run's uploaded report artifact.
- P3 task — re-adopt the document-viewer Linux visual baseline once PR #2199
lands. Blocked until then: adopting earlier would commit a golden for a state
main does not have.
- P3 task — watch runner usage now that every main push gets its own concurrency
group (PR #2209). The in-file comment accepts the cost as a prediction; nobody
has measured it.
- update to #JVYQEM — marks it partially stale. Its phone remedy already landed
(the token reads 10.125rem, not the 6.625rem the row records); the wide reserve
is what remains, and it needs a mechanism rather than a bigger constant. Also
warns against reading it as the cause of the 0.223 breach.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HoyoNN7nCUVDLaE84k6e6c
@coderabbitai

coderabbitaiBot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in:52 minutes

Limit details: You’ve used the included review currently available. Your 88 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e7489d3a-160d-4b69-a8e9-f96a95ef6c24

📥 Commits

Reviewing files that changed from the base of the PR and between 02d1bca and 937a1be.

📒 Files selected for processing (5)
  • docs/outstanding-issues-inbox/02a39fa5-f889-4098-96a7-d5b9e5352b8f.json
  • docs/outstanding-issues-inbox/3b9a4858-2665-4fe7-9ff4-ada3e650c644.json
  • docs/outstanding-issues-inbox/5f472de7-797f-49ba-8ba5-b5b6d4a7ad7a.json
  • docs/outstanding-issues-inbox/dceb6940-445e-4dc4-93b1-3fd9aa51f3fe.json
  • tests/ui-tools.spec.ts

Comment @coderabbitai help to get the list of available commands.

@supabase

supabaseBot commented Aug 21, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review August 21, 2026 09:19
@BigSimmo
BigSimmo enabled auto-merge August 21, 2026 09:20
@BigSimmo
BigSimmo merged commit 10fd5fa into mainAug 21, 2026
27 checks passed
@BigSimmo
BigSimmo deleted the claude/pr-review-comments-yegd3q branch August 21, 2026 09:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@claude