Skip to content

test: fix Firefox/WebKit release-browser-matrix races (client-only rendering) - #178

Merged
BigSimmo merged 2 commits into
mainfrom
claude/fix-cross-browser-matrix
Jul 2, 2026
Merged

test: fix Firefox/WebKit release-browser-matrix races (client-only rendering)#178
BigSimmo merged 2 commits into
mainfrom
claude/fix-cross-browser-matrix

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What

Fixes the three Playwright specs that fail in the gated release-browser-matrix job (Firefox + WebKit) while Chromium passes. No product code changes — these are test-timing fixes only.

Why

Making the dashboard and document viewer client-only via dynamic(..., { ssr: false }) (#144/#147) means "page loaded" no longer implies "app mounted". Firefox/WebKit paint the client chunk later than Chromium (and reserve classic scrollbars), so three specs raced. Each failure was verified to be a timing artifact, not a product regression — the app renders and works correctly in all three browsers.

Spec Failure Root cause Fix
ui-overlap header#search not found (count 0), never a real overlap; deterministic in FF gotoHome waited on networkidle then measured a not-yet-mounted header Wait for header#search to be visible before measuring
ui-tools:264 Fill wiped / submit dropped → button disabled or URL never routes (FF+WebKit) Shell re-syncs query from URL on mount via requestAnimationFrame, landing just after the programmatic fill Drive fill→submit→route as one toPass unit until it navigates
ui-stress:233 Desktop evidence-support-panel never visible (WebKit CI only; passes locally) <summary> Enter-to-open fired before focus landed, so the <details> never toggled Assert toBeFocused() before pressing Enter

Validation

Ran locally in Firefox + WebKit:

  • ui-overlap — all 8 widths, both browsers ✅
  • ui-stress:233 — both viewports, both browsers ✅
  • ui-tools:264 — repeated ×2 per browser, all green ✅

The reproduced failures (ui-overlap, ui-tools) were confirmed against the failing state first, then fixed. ui-stress only fails in CI WebKit (scrollbar/focus-timing environment difference); the fix is a safe hardening with no double-toggle risk.

Clinical governance preflight

No ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output changes — Playwright test robustness and process docs only.

🤖 Generated with Claude Code

The dashboard/viewer became client-only via dynamic(ssr:false) (#144/#147),
so "page loaded" no longer implies "app mounted". Firefox/WebKit paint the
client chunk later than Chromium, so three release-browser-matrix specs raced
and failed on main while Chromium stayed green. All three are test-timing
gaps, not product regressions.

- ui-overlap: wait for the mounted header#search instead of networkidle;
  every failure was "header#search not found" (count 0), never a real overlap.
- ui-tools (forms detail search): the shell re-syncs query from the URL on
  mount via requestAnimationFrame, which on FF/WebKit lands just after a
  programmatic fill and wipes it / drops the submit. Drive fill->submit->route
  as one toPass unit until the search navigates.
- ui-stress (desktop evidence panel): assert the <summary> is focused before
  pressing Enter so the <details> reliably toggles open in WebKit.

Validated locally in Firefox + WebKit (ui-overlap all widths, ui-stress both
viewports, ui-tools:264 repeated x2 per browser). No product code changed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 299af3a988

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/ui-tools.spec.ts
Address Codex P2: if the click navigates just after the inner 2s URL wait
times out, the toPass retry would re-run on the results page where the
detail-page input no longer exists and fail a genuinely-successful nav.
Short-circuit the retry to success once the URL has already routed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 2, 2026 13:20
@BigSimmo
BigSimmo merged commit be55a34 into main Jul 2, 2026
5 checks passed
@BigSimmo
BigSimmo deleted the claude/fix-cross-browser-matrix branch July 2, 2026 16:31
BigSimmo pushed a commit that referenced this pull request Aug 18, 2026
Synced origin/main into the branch (behind-but-clean, no conflicts).
PR policy check genuinely fails and is left for a human: the diff
touches the RAG-ranking-protected src/lib/rag/rag-row-contracts.ts
without a required `RAG impact:` line or Clinical Governance
Preflight section. Trust/integrity spot-check: the PR body claims 15
delivered resolutions but only 14 outstanding-issues-inbox tickets
exist in the diff -- #178 is described in prose but was never
actually queued.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to 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.

1 participant