Skip to content

Fix(differentials): route Compare selected to resolved presentation workflow#885

Merged
cursor[bot] merged 8 commits into
mainfrom
cursor/differentials-compare-href-1ae0
Jul 18, 2026
Merged

Fix(differentials): route Compare selected to resolved presentation workflow#885
cursor[bot] merged 8 commits into
mainfrom
cursor/differentials-compare-href-1ae0

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

Verification

  • npm run test -- --run tests/differentials-navigation.test.ts (4 passed)
  • npx prettier --check on touched navigation/test files
  • UI verification not run: local ensure/Playwright blocked here by Google font fetch failures; CI Production UI covers differentials journeys.

Risk and rollout

  • Risk: medium; changes compare CTA href construction and presentations redirect Location handling for selected diagnosis IDs.
  • Rollback: revert the merge commit; Compare selected falls back to prior redirect-based flow on the previous revision.
  • Provider or production effects: None.

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
Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features

    • Added consistent navigation for differential searches, presentations, diagnoses, and selected comparisons.
    • Preserved search terms and selected items when moving between differential views.
  • Bug Fixes

    • Redirects now use same-origin relative paths, improving navigation reliability across environments.
    • Fixed routing for comparison and catalogue links across mobile and desktop views.
  • Tests

    • Added coverage for query handling, selected-item preservation, and redirect behavior.

BigSimmo and others added 4 commits July 18, 2026 23:38
…re-hk5lur

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Resolve presentation workflow on the server redirect with a relative
Location header so Compare selected keeps IDs without pulling the
differentials snapshot into the client bundle.

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

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c886259-194f-473f-873a-b43006ee448a

📥 Commits

Reviewing files that changed from the base of the PR and between 45ed28a and 9145f18.

📒 Files selected for processing (5)
  • src/app/differentials/presentations/route.ts
  • src/components/clinical-dashboard/differentials-home.tsx
  • src/lib/differentials-navigation.ts
  • tests/audit-navigation-auth-regressions.test.ts
  • tests/differentials-navigation.test.ts

📝 Walkthrough

Walkthrough

The PR centralizes differential navigation URL construction, updates dashboard links to preserve query and selection state, and changes the presentations route to return a relative 307 redirect. Tests cover URL encoding, client-safe imports, bind-address handling, and redirect expectations.

Changes

Differentials navigation

Layer / File(s) Summary
Shared client navigation helpers and dashboard integration
src/lib/differentials-navigation.ts, src/components/clinical-dashboard/differentials-home.tsx
Adds shared builders for trimmed q and ids parameters, then uses them for presentation, diagnosis, compare, and fallback navigation links.
Relative presentations redirect and validation
src/app/differentials/presentations/route.ts, tests/audit-navigation-auth-regressions.test.ts, tests/differentials-navigation.test.ts
Builds a relative redirect location and returns it with HTTP 307; tests verify preserved parameters, relative URLs, and client-safe helper behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: codex

Suggested reviewers: cursoragent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: rerouting Compare selected to the presentations workflow.
Description check ✅ Passed The description covers Summary, Verification, Risk and rollout, and Clinical Governance; only Notes is left blank.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/differentials-compare-href-1ae0

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

@supabase

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

@cursor
cursor Bot enabled auto-merge (squash) July 18, 2026 16:05
cursoragent and others added 2 commits July 18, 2026 16:07
…compare-href-1ae0

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…compare-href-1ae0

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor
cursor Bot merged commit cd0967b into main Jul 18, 2026
16 checks passed
@cursor
cursor Bot deleted the cursor/differentials-compare-href-1ae0 branch July 18, 2026 16:42
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.

2 participants