Make the Highest urgency card follow the active filter - #2719
Conversation
The rail previously read two lists: Check next followed the applied filter while Highest urgency deliberately read the whole result set, so a lens could never hide an emergent differential from the safety net. On review the owner wants one rule instead, so the rail always describes the list on screen rather than a wider one the clinician cannot see. Both cards now read the filtered results. A lens that excludes every emergent differential empties the urgency card, and the applied-filter chips above the results say why it is gone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FnUcNddudVxqJQbcxP1Vn8
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_bc8b3320-291d-47d5-a80e-03fb8c9b210b) |
Summary
Check nextfollowed the applied filter, whileHighest urgencydeliberately read the whole result set so a lens could never hide an emergent differential from the safety net. That split was flagged for review when the rail shipped in Fix clipped Emergent badge in the differentials interpretation rail, add a Check next card #2658, and the owner has chosen the single rule instead.relevanceResults, the filtered set. The rail always describes the list on screen rather than a wider one the clinician cannot see.The whole change is the prop the rail is given, plus the removal of the second prop that existed only to carry the two lists:
Behavioural consequence, stated plainly: a lens that excludes every emergent differential now empties the
Highest urgencycard, where it previously kept showing emergent rows the filtered results no longer contained. The card already hides itself rather than rendering an empty bordered box, and the applied-filter chips above the results say why it is gone. Filtering toPresentationsor to a non-emergent priority is the case this affects.Verification
npm run test:focused -- --files src/components/clinical-dashboard/differentials-home.tsx tests/differentials-interpretation-rail.dom.test.tsx— 3 files, 18 tests passednpm run lintandnpm run typecheck— both greennpm run verify:pr-local— not run. The two heavy checks it adds over the above for this scope are the full offline unit suite andbuild, both of which CI runs on this PR. Note that in this cloud session two unit tests (privacy-readiness-contract,rag-plan-package-parity) fail regardless of the diff because the clone is shallow and the commits their manifests reference are absent locally.npm run verify:ui— UI verification not run: deferred to CI, which re-runs the browser suite on every change touching a browser surface. This changes which array one already-covered component reads; the DOM test below pins the resulting behaviour at both filter states.npm run formatwas run whole-tree before commit (no files changed by it).The existing rail test that asserted the old split is rewritten rather than deleted, so the new contract is pinned at the same point:
Highdrops the emergent row fromHighest urgencyand drops the investigation only the emergent differential named fromCheck next, while the urgent differential's own investigation staysRisk and rollout
Clinical Governance Preflight
Applies here only in that the rail renders clinical content.
Clinical KB Database(sjrfecxgysukkwxsowpy) — untouchedNotes
This is not bundled with another PR. The repo's bundling rule covers independently low-risk append-only chores, and a change to which results a clinical urgency card reads is neither append-only nor free of behavioural consequence, so it travels alone with its own test.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FnUcNddudVxqJQbcxP1Vn8
Generated by Claude Code
Note
Low Risk
Single client-component presentation change with no API, auth, or data changes; it only changes which in-memory result array the rail cards read.
Overview
The differentials interpretation rail no longer mixes two result lists: Highest urgency and Check next both read the same filtered set (
relevanceResults) as the main result list, instead of urgency reading the full catalogue matches while check next followed the lens.InterpretationRaildrops thefilteredResultsprop; the parent passes onlyrelevanceResultsasresults. When a clinical-urgency or result-type filter hides every emergent differential, the Highest urgency card disappears (same as when the filtered set has no emergent rows), with filter chips explaining the narrowed view.DOM tests are updated to pin the new contract: narrowing to High removes the emergent row from Highest urgency and drops investigations that only the filtered-out emergent differential named.
Reviewed by Cursor Bugbot for commit ee2aef2. Configure here.