Skip to content

Make the Highest urgency card follow the active filter - #2719

Open
BigSimmo wants to merge 1 commit into
mainfrom
claude/eager-euler-38s1yu
Open

Make the Highest urgency card follow the active filter#2719
BigSimmo wants to merge 1 commit into
mainfrom
claude/eager-euler-38s1yu

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • The differentials interpretation rail read two different 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. 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.
  • Both cards now read 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:

-<InterpretationRail best={best} results={results} filteredResults={relevanceResults} />
+<InterpretationRail best={best} results={relevanceResults} />

Behavioural consequence, stated plainly: a lens that excludes every emergent differential now empties the Highest urgency card, 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 to Presentations or 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 passed
 Test Files  3 passed (3)
      Tests  18 passed (18)
[gate-receipts] recorded a pass for "vitest related --run src/components/clinical-dashboard/differentials-home.tsx tests/differentials-interpretation-rail.dom.test.tsx"
  • npm run lint and npm run typecheck — both green
[gate-receipts] recorded a pass for "lint:internal" (7425 input files).
[gate-receipts] recorded a pass for "typecheck:internal" (7425 input files).
  • npm run verify:pr-localnot run. The two heavy checks it adds over the above for this scope are the full offline unit suite and build, 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:uiUI 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 format was 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:

  • was: check next follows the lens while highest urgency keeps its safety-net rows
  • now: both rail cards follow the urgency lens — narrowing to High drops the emergent row from Highest urgency and drops the investigation only the emergent differential named from Check next, while the urgent differential's own investigation stays

Risk and rollout

  • Risk: low. Presentation-only change in one client component. No data, schema, retrieval, auth, or provider surface is touched.
  • Rollback: revert this commit; the rail returns to the two-list split.
  • Provider or production effects: None.
  • RAG impact: none.

Clinical Governance Preflight

Applies here only in that the rail renders clinical content.

  • Source-backed claims still require linked source verification before clinical use — no change to what either card can say, only to which result set it reads
  • No patient-identifiable document workflow was introduced or expanded
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy) — untouched
  • Service-role keys and private document access remain server-only — untouched
  • Demo/synthetic content remains clearly separated from real clinical sources — untouched
  • Source metadata, review status, and outdated/unknown-source behaviour remain conservative — the urgency card hides itself when the filtered set holds nothing emergent rather than showing a stale wider list
  • Deployment classification/TGA SaMD impact checked — no change to decision-support behaviour; both cards continue to surface existing catalogue content already visible on the result cards

Notes

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.

InterpretationRail drops the filteredResults prop; the parent passes only relevanceResults as results. 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.

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

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

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 105348a5-8826-4a73-9f56-5594aaa265cd


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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T09:56:42.267396Z ee2aef2 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

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