fix: complete design and accessibility audit remediation#871
Conversation
…nal-pr-20260718 # Conflicts: # docs/branch-review-ledger.md
…nal-pr-20260718 # Conflicts: # tests/ui-tools.spec.ts
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR records a design audit and updates redirects, accessibility semantics, favourites/search behavior, tool and differential interactions, error recovery, Therapy Compass responsiveness, and automated route and UI coverage. ChangesDesign audit and verification
Application behavior and accessibility
Therapy Compass and browser coverage
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/reference/colour-coding/page.tsx`:
- Line 34: Update the main element identified by id main-content to preserve a
visible focus indicator for skip-link focus: remove the outline-none class or
replace it with an appropriate focus-visible outline utility. Use outline-hidden
only if preserving forced-colors behavior is explicitly intended.
In `@src/components/clinical-dashboard/favourites-hub.tsx`:
- Around line 308-324: Update the disabled “Recent” and add-favourites controls
in the dashboard component to remain keyboard-focusable while exposing their
“coming soon” explanations via aria-disabled="true" and aria-describedby. Add
uniquely identified adjacent description elements and apply the same
accessibility treatment to the corresponding control around the second
referenced location, removing reliance on title text.
In `@src/components/clinical-dashboard/global-search-shell.tsx`:
- Around line 317-318: Gate the unconfigured-auth fallback in
global-search-shell.tsx so clientDemoMode only enables it outside production,
while preserving explicit NEXT_PUBLIC_DEMO_MODE opt-in and forwarding the
corrected recentQueriesOwnerId at the existing call site
(global-search-shell.tsx:512-512). Add behavior-level tests in
tests/favourites-demo-boundary.test.ts:25-39 covering unconfigured production
auth and explicit production demo opt-in.
In `@tests/favourites-demo-boundary.test.ts`:
- Around line 25-39: Extend the tests in the existing favourites demo boundary
coverage to exercise the production configuration path, proving that missing or
unconfigured production auth keeps demo mode disabled and does not expose demo
favourites. Also cover the explicit opt-in case so production demo data is
enabled only when the supported opt-in setting is present, rather than relying
solely on the existing source-string assertions.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 72fd2597-3774-47f3-8c55-1a0afb3df446
📒 Files selected for processing (53)
design-qa.mddocs/branch-review-ledger.mddocs/design-audit-2026-07-17.mdplaywright.config.tssrc/app/applications/route.tssrc/app/differentials/presentations/route.tssrc/app/favourites/page.tsxsrc/app/global-error.tsxsrc/app/globals.csssrc/app/medications/route.tssrc/app/reference/colour-coding/page.tsxsrc/components/ClinicalDashboard.tsxsrc/components/applications-launcher-page.tsxsrc/components/clinical-dashboard/answer-result-surface.tsxsrc/components/clinical-dashboard/evidence-panels.tsxsrc/components/clinical-dashboard/favourites-command-library-page.tsxsrc/components/clinical-dashboard/favourites-hub.tsxsrc/components/clinical-dashboard/global-search-shell.tsxsrc/components/clinical-dashboard/master-search-header.tsxsrc/components/clinical-dashboard/universal-search-command-surface.tsxsrc/components/clinical-dashboard/visual-evidence.tsxsrc/components/differentials/differential-presentation-workflow-page.tsxsrc/components/differentials/differential-stream-page.tsxsrc/components/forms/form-detail-page.tsxsrc/components/route-error-boundary.tsxsrc/components/services/services-navigator-page.tsxsrc/components/therapy-compass/bindings.tsxsrc/components/therapy-compass/nav.tsxsrc/components/therapy-compass/screens/brief-screen.tsxsrc/components/therapy-compass/screens/compare-screen.tsxsrc/components/therapy-compass/screens/detail-screen.tsxsrc/components/therapy-compass/screens/home-screen.tsxsrc/components/therapy-compass/screens/pathways-screen.tsxsrc/components/therapy-compass/screens/recommend-screen.tsxsrc/components/therapy-compass/screens/sheets-screen.tsxsrc/components/therapy-compass/styles.tsxsrc/components/therapy-compass/therapy-card.tsxtests/audit-navigation-auth-regressions.test.tstests/favourites-demo-boundary.test.tstests/forms-back-navigation.dom.test.tsxtests/playwright-app-mode.tstests/playwright-project-isolation.test.tstests/route-error-boundary-focus.dom.test.tsxtests/route-error-boundary.test.tstests/therapy-compass-data-recovery.dom.test.tsxtests/therapy-compass-responsive-contract.test.tstests/ui-accessibility.spec.tstests/ui-overlay-css-contract.test.tstests/ui-route-coverage.spec.tstests/ui-smoke.spec.tstests/ui-tools.spec.tstests/ui-universal-search.spec.tstests/visual-evidence-tabs.dom.test.tsx
💤 Files with no reviewable changes (4)
- src/components/forms/form-detail-page.tsx
- src/components/therapy-compass/bindings.tsx
- src/app/globals.css
- src/components/clinical-dashboard/answer-result-surface.tsx
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #3454 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/design-audit-2026-07-17.md (1)
46-59: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winQualify the document-source route proof
Line 46 describes both document-source aliases as interaction proof, but Line 59 says the valid
/documents/sourcebrowser case exceeded the polling window and was not retried. Distinguish route coverage/request issuance from fully completed browser verification so the audit does not overstate its evidence.Suggested wording
-The new provider-free route matrix covers ... both document-source aliases ... and route-specific behavior. +The new provider-free route matrix includes ... both document-source aliases. The valid document-source case issued the expected destination request, but full browser completion was not proven within the polling window.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/design-audit-2026-07-17.md` around lines 46 - 59, Update the audit wording in the route-matrix summary to distinguish document-source alias coverage and correct destination-request issuance from completed browser interaction verification. Explicitly qualify `/documents/source` as incomplete because its cold compile exceeded the polling window and the case was not retried, while preserving the verified status of any other alias.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@docs/design-audit-2026-07-17.md`:
- Around line 46-59: Update the audit wording in the route-matrix summary to
distinguish document-source alias coverage and correct destination-request
issuance from completed browser interaction verification. Explicitly qualify
`/documents/source` as incomplete because its cold compile exceeded the polling
window and the case was not retried, while preserving the verified status of any
other alias.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 9f418dc4-f5b8-4f6d-b739-0885012282b5
📒 Files selected for processing (10)
docs/branch-review-ledger.mddocs/design-audit-2026-07-17.mdsrc/app/reference/colour-coding/page.tsxsrc/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/favourites-hub.tsxsrc/components/clinical-dashboard/global-search-shell.tsxsrc/lib/client-env.tstests/favourites-demo-boundary.test.tstests/favourites-hub-unavailable-controls.dom.test.tsxtests/ui-route-coverage.spec.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- tests/favourites-demo-boundary.test.ts
- docs/branch-review-ledger.md
- src/components/clinical-dashboard/favourites-hub.tsx
- tests/ui-route-coverage.spec.ts
- src/components/ClinicalDashboard.tsx
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77142188d5
ℹ️ 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".
|
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…0718' into codex/design-audit-final-pr-20260718
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0df416295a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 524fab59c0
ℹ️ 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".
Gate Therapy Compass home on an empty loading catalogue so it never advertises “0 records”, and resolve upload read-only without treating local no-auth as demo lockout. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
@copilot resolve the merge conflicts on this branch. |
…nal-pr-20260718 # Conflicts: # src/components/therapy-compass/nav.tsx # src/components/therapy-compass/screens/home-screen.tsx
…0718' into codex/design-audit-final-pr-20260718 # Conflicts: # src/components/therapy-compass/screens/home-screen.tsx
Head branch was pushed to by a user without write access
Resolved in |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d44043328
ℹ️ 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".
|
@copilot resolve the merge conflicts on this branch. |
Resolved in |
…0718' into codex/design-audit-final-pr-20260718
…0718' into codex/design-audit-final-pr-20260718
…0718' into codex/design-audit-final-pr-20260718
Summary
0.0.0.0cannot emit an invalid browser destination. Full evidence is recorded indocs/design-audit-2026-07-17.md.Verification
npm run verify:pr-localplan completed locally: Node 24/npm 11 runtime, changed-file formatting, full ESLint, TypeScript, 309 Vitest files / 2,797 tests, webpack production build with 1,674 generated pages, client-bundle secret scan, and 36 offline RAG fixtures across 21 suites. The aggregate command's first build inherited an emptyNEXT_PUBLIC_DEMO_MODE; removing that shell-only value made the failed build stage pass without a source change.npm run verify:ui— the exact-branch run passed 230/237. Focused production recovery passed Therapy and all three redirect journeys; focused branch-server recovery passed Services and Tools. The production guest-upload journey reached the correct Source Library and exact admin-only notice before a strict locator was narrowed to exclude Next's empty route announcer. A third duplicate production build was not launched under the recovery retry limit; exact-head hosted Production UI is required below.git diff --checkpassed.npm run verify:release— not run because it includes provider-backed production-readiness/governance/evaluation commands that were not authorized. Hosted local/offline required checks remain the merge gate.npm run check:production-readiness— not run; no production environment, Supabase, ingestion, retrieval, privacy policy, or clinical-output logic changed, and the command is provider-confirmation-gated.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
origin/mainthrough PR docs: record PR 861 review closure #869 and contains no dependency, API-contract, database-schema, environment, or production-data changes.Summary by CodeRabbit
Summary by CodeRabbit