Skip to content

Differentials search: safety banner up top, plus a Clinical urgency filter - #2047

Merged
BigSimmo merged 4 commits into
mainfrom
claude/search-results-differentials-prs-o7z531
Aug 17, 2026
Merged

Differentials search: safety banner up top, plus a Clinical urgency filter#2047
BigSimmo merged 4 commits into
mainfrom
claude/search-results-differentials-prs-o7z531

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Promote the emergent-lead safety banner (e.g. delirium's "Inattention plus altered awareness/arousal…" warning) from a desktop-only sidebar card and a separate mobile-only inline strip into one full-width banner rendered above the results grid — now visible at the top of the differentials search results on every breakpoint as soon as results render.
  • Add a second filter dimension to the differentials search page: Clinical urgency (All priorities / Emergent / High / Investigations), alongside the existing result-type filter (Show: All / Presentations / Diagnoses). This mirrors the identical "Clinical urgency" lens already shipped on the differentials stream/browse pages (differential-stream-workspace.tsx), so the two differentials surfaces now agree on this dimension instead of only one of them exposing it.
  • Both filters now AND together: each option's count holds the other dimension at its current value (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).
  • For the follow-up Clinical urgency filter commit: npx tsc --noEmit clean, npx eslint clean on both changed files, and npm run test (full offline suite) — 642 test files passed, 6872 tests passed, 4 skipped, 0 failed.
  • Added DOM coverage in tests/differentials-compare-selection.dom.test.tsx for the new urgency filter: narrowing by urgency, the combined result-type + urgency empty-state heading, and clearing both filters together via "Show all results".
  • Manual browser QA (Playwright/Chromium, desktop 1440px and phone 390px viewports): confirmed the safety banner renders at the top on both breakpoints with the exact expected delirium copy; confirmed the urgency filter narrows results, the applied-filter chip removes it, and the filter-trigger badge count updates correctly.
  • npm run verify:ui not 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:release not run — not requested; no release/handoff confidence claim being made here.

Risk and rollout

  • Risk: Low. Both changes are additive UI/UX changes scoped to 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 shared resultFilterGroup/ResultFilterSheet primitives already used by 7 other modes, so no new UI pattern was introduced.
  • Rollback: Revert this PR's commits; no migrations, data, or provider config involved.
  • Provider or production effects: None.

Notes

  • Considered marking zero-count filter options as disabled "dead ends" (as the differentials stream/browse pages do for their chapter facet), but reverted that after confirming it broke an existing, intentional test (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 Preflight section omitted: neither changed file matches this repo's clinical-risk path classification (scripts/pr-policy.mjs's clinicalRiskPatterns) — src/components/clinical-dashboard/differentials-home.tsx is a presentation-layer component with no auth/privacy/upload/download logic, and no src/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 generated data/differentials-snapshot.json snapshot rather than any new hardcoded copy.

Generated by Claude Code

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

supabaseBot commented Aug 17, 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 ↗︎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo merged commit 26f2459 into mainAug 17, 2026
43 of 45 checks passed
@BigSimmo
BigSimmo deleted the claude/search-results-differentials-prs-o7z531 branch August 17, 2026 15:43
Sign up for freeto 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

@BigSimmo@claude