Fix(differentials): route "Compare selected" directly to resolved presentation workflow#883
Fix(differentials): route "Compare selected" directly to resolved presentation workflow#883BigSimmo wants to merge 5 commits into
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughDifferentials navigation now uses shared client-safe URL helpers, while the presentations route returns relative 307 redirects. Dashboard links, compare actions, query parameters, selected IDs, and regression tests were updated accordingly. ChangesDifferentials navigation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant DifferentialsHome
participant differentials-navigation
participant Browser
participant presentationsRoute
DifferentialsHome->>differentials-navigation: Build differential href with query and selected IDs
differentials-navigation-->>DifferentialsHome: Return relative href
Browser->>presentationsRoute: GET /differentials/presentations with query parameters
presentationsRoute->>presentationsRoute: Compute presentationsRedirectLocation
presentationsRoute-->>Browser: Return 307 Location with relative pathname and query
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0545bc86e
ℹ️ 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0545bc86e
ℹ️ 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".
…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>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@tests/differentials-navigation.test.ts`:
- Around line 39-44: Update the redirect assertion in the differential
navigation test to parse the relative location URL and inspect its query
parameters. Assert that the decoded ids parameter exactly equals both expected
selected IDs, while retaining the existing status, path, query, and host
assertions.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f80b75ee-4412-49b2-a55c-a3876e5f5ab8
📒 Files selected for processing (5)
src/app/differentials/presentations/route.tssrc/components/clinical-dashboard/differentials-home.tsxsrc/lib/differentials-navigation.tstests/audit-navigation-auth-regressions.test.tstests/differentials-navigation.test.ts
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Pull request was closed
Capture the reviewed screenshot-queue outcomes, supersessions, and hosted/local checks used for the safe merge pass. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Motivation
0.0.0.0) and produced a restricted viewport; the goal is to route selected comparisons directly to the resolved presentation workflow URL and preserve selected IDs.Description
src/lib/differentials-navigation.tswithdifferentialRouteWithQuery()anddifferentialSelectedCompareHref()to build same-origin relative route hrefs and resolve the presentation workflow for chosen diagnosis IDs.routeWithQueryusage insrc/components/clinical-dashboard/differentials-home.tsxwith the new helpers for mobile and desktop "Compare selected" CTAs and other catalogue navigation links.routeWithQueryhelper and wire CTAs to the presentation page directly so the app no longer relies on the redirect endpoint that could embed a bad origin.tests/differentials-navigation.test.tswhich asserts that the new hrefs target a presentation page, include the query and IDs, and do not contain0.0.0.0.Testing
npm cito populate node modules and it completed successfully.npm run test -- tests/differentials-navigation.test.tsand the new test suite passed (2 tests, 0 failures).npm run typecheckand it passed with no errors.npm run lintand it completed without errors.npm run ensureto verify the dev UI, but the local Next/Turbopack dev server did not become ready due to font-module resolution / Google font fetch failures in this environment, so end-to-end browser verification was not completed; no persistent dev server was left running.Codex Task
Summary by CodeRabbit
Bug Fixes
Tests