feat(differentials): four-page Search / Diagnoses / Presentations / Compare nav - #1774
Conversation
…Compare nav Make Presentations and Compare equal-level destinations, restore Search with q+run=1, show kind labels on unified results, and land Compare on a queue page before launching the presentation or ad-hoc workspace. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
🚧 Files skipped from review as they are similar to previous changes (7)
📝 WalkthroughWalkthroughThe compare route now shows a diagnosis queue by default and supports presentation or ad-hoc workspace launches. Differential results display type badges. Navigation state and route documentation cover the updated workflows. ChangesDifferential comparison workflow
Review documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CompareRoute
participant QueuePage
participant LaunchHelper
User->>CompareRoute: Open compare route
CompareRoute->>QueuePage: Render selected diagnosis queue
QueuePage->>LaunchHelper: Request launch URL
LaunchHelper-->>QueuePage: Return presentation or workspace URL
QueuePage-->>User: Display queue and launch action
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
CI triageCI failed on this PR. Automated classification of the 4 failed job(s):
Compared with main CI run #9463 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdb121d533
ℹ️ 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".
…ve GitHub DIRTY/staleness) Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@docs/branch-review-ledger.md`:
- Around line 826-835: Restore the original ordering and contents of the
existing rows in the branch-review ledger; do not move or rewrite historical
records. Preserve the merge=ledger driver, then append any new review records
using npm run ledger:append rather than hand-editing the ledger.
In `@src/lib/mode-secondary-navigation.ts`:
- Around line 145-147: Update isModeSecondaryNavigationRoute() to recognize
/differentials/presentations detail paths, including nested slug routes without
a submitted search, so secondary navigation renders with Presentations active.
Add a route-gate test covering the presentation detail prefix.
🪄 Autofix
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
Run ID: 379de132-7bbf-4b05-bf23-240765abcfe8
📒 Files selected for processing (10)
docs/branch-review-ledger.mddocs/site-map.mdscripts/generate-site-map.tssrc/app/(search-app)/differentials/compare/page.tsxsrc/components/clinical-dashboard/differentials-home.tsxsrc/components/differentials/differential-compare-queue-page.tsxsrc/lib/differentials.tssrc/lib/mode-secondary-navigation.tstests/differentials-navigation.test.tstests/mode-secondary-navigation.test.ts
|
@cursoragent Work the current open PR end-to-end. Confirm the PR number and GitHub head first from context. If more than one open PR could apply, stop and say which one you would use and why. Fetch and start from the remote tip that matches that GitHub head. If the named branch ref is missing or stale, use the PR head ref. Preserve unrelated local WIP, including any local-only ledger commits; do not discard dirty work, and do not treat a local-ahead commit as the reviewed tip. Do not merge the PR, force-push, rebase, or arm auto-merge unless I explicitly ask. No provider-backed gates without separate approval. If you cannot push or resolve threads, diagnose and comment only; if inline replies fail, resolve when possible and put dispositions in the summary comment. If auto-merge is already armed, push only for a real blocker, and avoid pushes that would cancel in-flight required CI unless the push itself clears that blocker. If the PR is already merged or closed: confirm the head and merge commit, note required-CI outcome, post one summary, and stop. Goal: deep review plus Bugbot, fix actionable issues with the smallest correct changes, clear merge / required-CI / thread blockers, run strong local offline verification, push fixes, append the review ledger, and post one PR summary. Prefer thoroughness over speed. Regenerate large assets only when a fix requires it; then run the asset check and keep compatibility aliases byte-identical where the repo uses them. Snapshot the GitHub head SHA: tip, base, behind/ahead, mergeable state, merge-tree versus origin/main (real conflict versus behind-but-clean), required checks on that tip including Production UI when selected, advisory separately, unresolved actionable threads. Missing checks while dirty are not green. If the tip moves mid-work, re-snapshot and continue from the new head. Ledger-lookup against that GitHub head under the heavy review-and-fix scope for this PR. Already reviewed at this head with clean merge-tree, green required checks, and no new actionable threads → summarize, comment, stop unless I asked for a fresh superseding pass. Follow the repo review protocol. Unblock once: real conflict → merge origin/main (prefer main’s shared queues; keep this PR’s notes); behind-but-clean → one sync, late if required CI is in flight; clean → leave. Labels like skip-branch-sync do not block a manual sync needed to clear a real blocker. No sync thrash. After any sync or push, re-snapshot tip, merge-tree, and required checks before declaring done. Dedupe the ledger if a merge touched it. Review high-confidence delta risks only. Separate PR-introduced defects from pre-existing re-emitted debt. For generated assets, review contracts, aliases, cache, and manifests—not every generated line. If protected RAG or ranking surfaces are touched, say so before editing; fix PR-body policy text only when wrong or missing. Ignore bot noise. No nit spam or broad rewrites. Escalate verification by touched risk: clinical / RAG / privacy / migrations / auth → domain check plus production-readiness when warranted; UI / phone-chrome / routing / styling → ensure plus phone-chrome or UI gates when warranted; generated assets or docs inventory/links → asset or docs checks when warranted. Fix P0/P1 always; clear scoped P2 when locally provable; else disposition and resolve. Required-check failures on this tip only; ignore advisory. Prefer reverting a bad autofix commit. After fixes: format and commit before push; smallest targeted proof; repo cheap gate; repo PR-local gate. No release, lighthouse, live eval, or live provider gates without approval. Push only this PR’s fix commits. Append ledger for the final GitHub head under the heavy scope. Never push a ledger-only tip—include ledger in a real fix push, or leave a no-change ledger append local and unpushed. One PR comment: tip, sync/merge-tree, fixed versus dispositioned, threads, required CI, decisive local gate lines, residual risks; merge left to me. Inline only for remaining human-needed P0/P1. Stop when merge-tree is clean on the current GitHub tip, actionable threads are clear, required checks are green or clearly in progress, heavy gates for scope passed, summary posted, merge left to me. |
|
PR #1774 · tip Fixed
Dispositioned
Threads / commentAll 5 review threads resolved (GraphQL). Inline replies 403 — dispositions are in the PR summary comment. Local proof
Required CI restarted on this tip (policy/mergeability already green; Static/Build/UI re-queuing). Final-tip ledger supersede for |
There was a problem hiding this comment.
Pull request overview
Adds a four-page Differentials navigation model and a URL-backed comparison queue.
Changes:
- Restores Search queries and corrects active navigation states.
- Adds comparison queue and workspace launch behavior.
- Labels search results as presentations or diagnoses.
Verification: No commands run during this review; author-reported unit, lint, typecheck, and formatting checks were considered.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/mode-secondary-navigation.test.ts |
Tests query restoration and active tabs. |
tests/differentials-navigation.test.ts |
Tests queue and comparison handoffs. |
src/lib/mode-secondary-navigation.ts |
Updates navigation state and query handling. |
src/lib/differentials.ts |
Adds queue and launch helpers. |
src/components/differentials/differential-compare-queue-page.tsx |
Implements the comparison queue UI. |
src/components/clinical-dashboard/differentials-home.tsx |
Adds result-kind labels. |
src/app/(search-app)/differentials/compare/page.tsx |
Routes between queue and workspace. |
scripts/generate-site-map.ts |
Updates route description generation. |
docs/site-map.md |
Documents comparison queue behavior. |
docs/branch-review-ledger.md |
Records review and verification history. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Preserve Search ids from the compare queue, show ModeNav route gates for presentation detail paths, convert the queue page to an RSC to stay within bundle budget, and update the Playwright compare journey for the queue CTA. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append the heavy review-and-fix ledger row for the fix tip and document that Compare→Search edit links preserve selected diagnosis ids. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
PR #1774 babysit summaryTip: Fixed
Dispositioned (no code change)
ThreadsAll 5 actionable review threads resolved via GraphQL. Inline reply API returned 403 for this token — dispositions are in this summary (and markers would have been on the replies). Local verification (decisive lines)
Required CIPush restarted checks on Residual risks
Merge left to you. |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>


Summary
qwithrun=1so returning to Search reopens results./differentials/compare.workspace=1when selections span presentations.ids(existing sync), so Compare stays wired to Search ticks. Queue → Search / Edit selection links preserve thoseids.Verification
tests/mode-secondary-navigation.test.ts,tests/differentials-navigation.test.ts(47 passed)npm run typechecknpm run lintnpm run test—Test Files 547 passed (547)/Tests 5897 passed | 4 skipped (5901)npm run check:design-system-contractnpm run build+check:bundle-budget— within tolerance (1546.6 KiB gzip vs 1406.4 baseline)differentials compare queue launches presentation comparison(1 passed)npm run format/sitemap:update(compare blurb note)npm run verify:pr-localafter the late remote main-sync merge (lint + typecheck + full unit suite + build/bundle already re-proven for the fix set)verify:ui/verify:phone-chromeleft to CI Production UIRisk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
mainfrom recent PRs; this change finishes the equal-level IA, queue surface, Search restore, kind labels, and active-tab resolver symmetry.idspreserve, ModeNav route gate, Playwright queue journey; Copilot shell-ModeNav-on-detail dispositioned as information-page ownership.Summary by CodeRabbit
New Features
Bug Fixes