Skip to content

Add back navigation to information and settings pages#1121

Closed
BigSimmo wants to merge 16 commits into
mainfrom
codex/add-back-arrows-to-all-information-pages
Closed

Add back navigation to information and settings pages#1121
BigSimmo wants to merge 16 commits into
mainfrom
codex/add-back-arrows-to-all-information-pages

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a reusable NavigationBackButton (IconButton + floatingControl) that uses history back when available and falls back to a safe home href.
  • Wire the back affordance onto Privacy, Colour-coding reference, Safety Plan header, and Settings surface header.
  • Navigation-only UI change; no retrieval, ranking, generation, source selection, or RAG fixture content changed.

RAG impact: no retrieval behaviour change — UI navigation chrome only.

Verification

  • npm run check:design-system-contract — passed (legacy tap classes 0)
  • node scripts/run-vitest.mjs run --reporter=dot tests/patient-safety-plan-privacy.dom.test.tsx tests/privacy-ui.test.ts — 5/5 passed
  • Verification not run: full npm run verify:pr-local — not required for this scoped CI babysit; focused contract + previously failing unit files were re-run after the fix
  • UI verification not run: environmental/local browser gate not repeated in this babysit; change is shared IconButton chrome only

Risk and rollout

  • Risk: low; adds client-side back navigation chrome on information/settings surfaces without changing clinical logic, data handling, or APIs.
  • Rollback: revert the implementation commits; no schema, stored data, provider state, or migration rollback involved.
  • Provider or production effects: none until merge and normal main deployment.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • CI babysit: replaced literal sm:h-11/sm:w-11 tap classes with IconButton (size-tap), and mocked next/navigation in privacy/safety-plan unit tests that render without App Router.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@cursor[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a88a1269-ce88-49d5-9a71-b6f6e2449b95

📥 Commits

Reviewing files that changed from the base of the PR and between 5a32164 and bafb1fd.

📒 Files selected for processing (12)
  • docs/branch-review-ledger.md
  • src/app/privacy/page.tsx
  • src/app/reference/colour-coding/page.tsx
  • src/components/clinical-dashboard/settings-dialog.tsx
  • src/components/navigation-back-button.tsx
  • src/components/patient-safety-plan.tsx
  • src/components/ui/sheet.tsx
  • tests/document-viewer-shell.dom.test.tsx
  • tests/navigation-back-button.dom.test.tsx
  • tests/patient-safety-plan-privacy.dom.test.tsx
  • tests/privacy-ui.test.ts
  • tests/sheet.dom.test.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/add-back-arrows-to-all-information-pages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@supabase

supabase Bot commented Jul 24, 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 ↗︎.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 5 failed job(s):

  • Production UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Buildneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Advisory UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #4671 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo marked this pull request as ready for review July 24, 2026 03:46
Replace legacy sm:h-11/sm:w-11 classes with IconButton size-tap, and mock next/navigation in privacy/safety-plan tests that render without App Router.

Co-authored-by: Cursor <cursoragent@cursor.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: 0abd6b3082

ℹ️ 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 src/components/navigation-back-button.tsx Outdated
@BigSimmo

Copy link
Copy Markdown
Owner Author

@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.

@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: 0abd6b3082

ℹ️ 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 src/components/clinical-dashboard/settings-dialog.tsx Outdated
@BigSimmo
BigSimmo enabled auto-merge July 24, 2026 04:44
cursoragent and others added 2 commits July 24, 2026 04:45
Always push fallbackHref instead of history.back() so external referrers
cannot eject users from Clinical KB. Settings back uses IconButton/size-tap.
Addresses Codex review on PR #1121.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…ormation-pages' into codex/add-back-arrows-to-all-information-pages

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.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: 424977d9f4

ℹ️ 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 src/components/patient-safety-plan.tsx Outdated
cursoragent and others added 2 commits July 24, 2026 05:04
Guard the header back control when entries, reasons, or a plan date
have been edited so in-progress browser-only content is not discarded
without confirmation.
@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent fix failing CI testing please

@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixed the Unit coverage CI failure.

Cause: All 3268 tests passed, but Vitest still exited 1 on an unhandled ReferenceError: document is not defined. Opening the document-actions sheet scheduled a 50ms focus-restore timeout in sheet.tsx; under the coverage worker pool that timer fired after jsdom teardown.

Fix (5adf2bd5):

  • Cancel pending focus-restore rAF/timeouts on Sheet unmount
  • Guard document access in the restore retry
  • Close the actions sheet in the document-viewer shell test before teardown
  • Add a regression test in tests/sheet.dom.test.tsx

Focused Vitest: 7/7 passed. Pushed to PR #1121.

Open in Web Open in Cursor 

@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: c21272f0cb

ℹ️ 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 src/components/patient-safety-plan.tsx Outdated
cursoragent and others added 6 commits July 24, 2026 05:36
Cancel pending focus-restore rAF/timeouts on Sheet unmount and guard
document access so Vitest coverage workers cannot fail the suite with an
unhandled ReferenceError after document-viewer shell tests open a sheet.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
GraphQL review-thread reply returned 403; resolved the fixed thread directly after validation.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo disabled auto-merge July 24, 2026 06:50
@BigSimmo
BigSimmo enabled auto-merge (squash) July 24, 2026 07:04
@BigSimmo

Copy link
Copy Markdown
Owner Author

docs/branch-review-ledger.md

@codex resolve this merge conflict please

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • git diff --check
  • git status --short --branch final check showed branch work with no uncommitted changes.

View task →

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • git diff --check
  • git diff --cached --check
  • rg -n '<<<<<<<|=======|>>>>>>>' docs/branch-review-ledger.md || true

View task →

@BigSimmo
BigSimmo disabled auto-merge July 24, 2026 07:14
# Conflicts:
#	docs/branch-review-ledger.md

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
# Conflicts:
#	src/components/ui/sheet.tsx

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo

Copy link
Copy Markdown
Owner Author

Superseded by #1161, which rebuilt the intended navigation work on fresh origin/main, excluded the contaminated archive ancestry, fixed all actionable review findings, passed the focused 22-test navigation/privacy/sheet suite plus route reachability and settings follow-ups, and merged as 7a81cfaa9064d7e1c4d50488e2dfa0926887a0e9 with all hosted checks green and zero unresolved threads. The original branch remains preserved in the reconciliation bundle; no unique source content is being discarded by closing this PR.

@BigSimmo BigSimmo closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants