Differentials search: safety banner up top, plus a Clinical urgency filter - #2047
Merged
Merged
Conversation
…h results Promote the emergent-lead safety banner (e.g. delirium's inattention/altered awareness warning) from a desktop-only sidebar card and a mobile-only inline strip into one full-width banner above the results grid, visible on every breakpoint as soon as results render.
Search results only exposed one filter dimension (result type). Add a second lens — Clinical urgency (All priorities/Emergent/High/ Investigations) — mirroring the same field's existing filter on the differentials stream/browse pages, so the two differentials surfaces agree. Counts on each option now cross-account both dimensions (AND across groups), applied-filter chips and the filter trigger badge cover both, and the zero-match empty state reports which dimension (or combination) produced it. Adds DOM coverage for the new filter and its combined-empty-state copy.
This pull request has been ignored for the connected project Preview Branches by Supabase. |
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Caution Review failedAn error occurred during the review process. Please try again later. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
differential-stream-workspace.tsx), so the two differentials surfaces now agree on this dimension instead of only one of them exposing it.docs/filter-contract.md§3's "how many would I have if I ticked this as well" rule), applied-filter chips and the filter-trigger badge cover both dimensions, and the zero-match empty state names which dimension (or combination) produced it instead of only ever blaming result type.Verification
npm run verify:pr-local— ran in full for the safety-banner commit (check:runtime,check:installed-lock-parity,format:changed,lint,typecheck,test,build,check:rag:fixtures,check:medication-interactions,check:medication-lexicon-report) — summary:completed: ... failed: (none) not reached: (none).npx tsc --noEmitclean,npx eslintclean on both changed files, andnpm run test(full offline suite) — 642 test files passed, 6872 tests passed, 4 skipped, 0 failed.tests/differentials-compare-selection.dom.test.tsxfor the new urgency filter: narrowing by urgency, the combined result-type + urgency empty-state heading, and clearing both filters together via "Show all results".npm run verify:uinot run — this is a Chromium-hosted CI gate; I instead did direct Playwright/Chromium manual QA against the running dev server at both breakpoints, screenshotting each interaction (banner placement, filter sheet, narrowed results, empty state, chip removal, clear-all).npm run verify:releasenot run — not requested; no release/handoff confidence claim being made here.Risk and rollout
src/components/clinical-dashboard/differentials-home.tsx(the differentials search results page only) — no shared component (result-filter-control.tsx), API route, or data file was touched. The new filter dimension reuses the same sharedresultFilterGroup/ResultFilterSheetprimitives already used by 7 other modes, so no new UI pattern was introduced.Notes
shows a filter-specific empty state and restores all results) — this search page deliberately lets a reader select into a zero-result filter combination and recover via the "Show all results" button, which is a different (and here, pre-existing/tested) UX choice from the stream pages' dead-end guard. Kept that established behavior and generalized its copy to name both dimensions instead of changing the interaction model.Clinical Governance Preflightsection omitted: neither changed file matches this repo's clinical-risk path classification (scripts/pr-policy.mjs'sclinicalRiskPatterns) —src/components/clinical-dashboard/differentials-home.tsxis a presentation-layer component with no auth/privacy/upload/download logic, and nosrc/lib/**,supabase/**, or clinical dataset file was touched. The safety-banner text itself is unchanged; only its position moved, and it is still sourced from the existing generateddata/differentials-snapshot.jsonsnapshot rather than any new hardcoded copy.Generated by Claude Code