Skip to content

fix(ci): restore document-viewer Production UI smoke tests - #1368

Merged
BigSimmo merged 1 commit into
claude/navigation-pane-mockups-0600affrom
copilot/fix
Jul 28, 2026
Merged

fix(ci): restore document-viewer Production UI smoke tests#1368
BigSimmo merged 1 commit into
claude/navigation-pane-mockups-0600affrom
copilot/fix

Conversation

CopilotAI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Four Playwright smoke tests in the document viewer were failing in CI. Two distinct root causes.

Root causes and fixes

1. Duplicate document-overview DOM ID

DocumentClinicalSummary had id="document-overview" on its outer <article>, duplicating the same anchor already set on the wrapping <div> in DocumentViewer.tsx. The expectDomIntegrity() helper caught this as a duplicate-ID violation.

Fix: Removed id="document-overview" and the now-redundant scroll-mt-24 from document-clinical-summary.tsx. The scroll anchor is provided by the parent wrapper in DocumentViewer.

2. Tests targeting a retired navigation pattern

Tests were asserting on <nav aria-label="Document viewer sections"> with <a> link elements (Evidence, PDF, Text). That nav was replaced by a title-trigger + sheet pattern.

Fix: Updated tests to drive navigation via data-testid="document-section-trigger"document-section-sheetgetByRole("button", { name: /.../ }).

3. Demo doc Images not in section sheet

Demo documents have no extracted visuals, so Tables and diagrams is omitted from the sheet index. The test was trying to navigate to it via the sheet.

Fix: Test now opens the #source-images<details> directly via its <summary> element.

Verification

  • npm run verify:pr-local

During development, use npm run verify:cheap as the faster iteration gate before the final PR-local preflight.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims

For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes, verify:pr-local runs eval:rag:offline automatically. Run the offline command directly during iteration before spending a live eval.

  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.
  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

npm run verify:ui not run: changes are test-alignment fixes with no UI behavior change; the duplicate-ID removal does not alter rendered output.

Risk and rollout

  • Risk: None — removes a duplicate ID attribute and updates test selectors to match current implementation
  • Rollback: Not required
  • Provider or production effects: None

Clinical Governance Preflight

Not applicable — no ingestion, answer generation, ranking, source rendering, document access, privacy, or clinical output changes.

Notes

@supabase

supabaseBot commented Jul 28, 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 ↗︎.

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: 96a6a75d-264b-41dc-b5bf-51e06b13b7f6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@BigSimmo
BigSimmo marked this pull request as ready for review July 28, 2026 13:51
CopilotAI changed the title [WIP] Fix issue with Copilot in database actionsfix(ci): restore document-viewer Production UI smoke testsJul 28, 2026
CopilotAI requested a review from BigSimmoJuly 28, 2026 13:56
@BigSimmo
BigSimmo merged commit 493055c into claude/navigation-pane-mockups-0600afJul 28, 2026
3 checks passed
@BigSimmo
BigSimmo deleted the copilot/fix branch July 28, 2026 13:57
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