feat(differentials): make result cards open on tap and lift their design - #2464
Conversation
The differential result cards gave no visible answer to "where do I click to open this?". Only the title text was a link, the rest of the card was dead space, and the compare checkbox was the most prominent control on the card — so the one thing that looked tappable was not the thing that opens the record. - The whole card now opens the differential. The existing title link stretches a pseudo-element across the card rather than adding a second overlay anchor, so assistive technology still hears one link named by the title. The focus ring deliberately stays on the title: the shared `:focus-visible` rule in globals.css is unlayered and wins over any `outline-none` utility here, so ringing the pseudo-element too would stack two rings and break the "focus is singular" assertion in ui-smoke. - Every card carries an explicit "Open differential" / "Open presentation" affordance with a chevron, as visible text for that hit area. - The compare checkbox becomes a labelled Compare/Added pill on phone cards and moves into a footer action row opposite the open affordance, so the two actions read as two actions. Desktop rows keep the compact box in their trailing column. - A left urgency rail (emergent/urgent/investigations) makes triage legible before any text is read, and the cards pick up rounded-xl, a hover lift, and a wider trailing column so the open affordance fits on one line. Verified: the card body opens the record and the compare control toggles without navigating, at both phone and desktop widths. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QSV1pJvt6QnprenaWFyza
|
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: Pro Plus 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_a419de5a-aee8-4136-9a25-d4de9d663231) |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
CI triageCI failed on this PR. Automated classification of the 3 failed job(s):
Compared with main CI run #14502 (failure). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
…rd link `check:design-system-contract` ratchets raw radius literals per file and CI caught this one going from 0 to 1: `after:rounded-[inherit]` is an arbitrary value, not a token. The pseudo-element paints nothing — it only widens the card's hit area, and it already sits inside the card's own `overflow-hidden` rounded clip — so it needs no radius of its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QSV1pJvt6QnprenaWFyza
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_1c56667e-8d9e-41b6-b93d-04c972ae3397) |
Sync the behind-but-clean head so auto-merge can proceed; no conflicts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QSV1pJvt6QnprenaWFyza
Summary
Open differential/Open presentationaffordance with a chevron on every card, as visible text naming that hit area.Compare/Addedpill sitting in a footer action row opposite the open affordance; desktop rows keep the compact box in their trailing column. Both remain a real checkbox input with the samedata-testidhooks and the same accessible name.rounded-xl, a hover elevation and background shift on desktop rows, a press state on phone cards, and a wider trailing column so the open affordance fits on one line.:focus-visiblerule inglobals.cssis unlayered and wins over anoutline-noneutility. The focus ring now stays singular on the title, as thefocus is singularassertion inui-smokerequires.Behaviour verified in a real browser at 390px and 1440px: clicking the card body navigates to the differential, and clicking the compare control toggles selection without navigating.
Verification
npm run verify:pr-local—check:runtime,check:installed-lock-parity,format:changed,lint,typecheckall completed. The unit suite reported 3 failures on the first run; all 3 reproduce on a clean tree at this base and 2 were shallow-clone artefacts that cleared aftergit fetch --deepen=2000.Test Files 1 failed | 931 passed (932)/Tests 1 failed | 11714 passed | 4 skipped. The single failure istests/caring-contacts-contact-time-adjustment.dom.test.tsx, which fails identically with this change stashed — it is a time-of-day dependent test in an unrelated module, not a regression from this diff.tests/differentials-compare-selection.dom.test.tsx—Test Files 1 passed (1)/Tests 10 passed (10).tests/ui-tools.spec.ts+tests/ui-smoke.spec.tsfiltered todifferential|focus is singular—16 passed (32.1s).ui-accessibility,ui-smoke,ui-phone-scroll,ui-phone-scroll-page-owned,ui-chrome-scroll—195 passed (9.2m). Note this run predates the focus-ring fix; the focused re-run above covers the final code.npm run verify:ui— not run in full. UI verification partially run: the changed owner's journeys and the adjacent phone/chrome/accessibility specs were proven directly (above); the complete Chromium gate was not run because this change is scoped to one mode's result cards and touches no shared chrome foundation.npm run eval:retrieval:quality— not applicable, no retrieval, ranking, selection, chunking or scoring behaviour changed.npm run check:production-readiness— not applicable, no clinical workflow, privacy, environment, Supabase, source governance or deployment behaviour changed.Risk and rollout
src/components/clinical-dashboard/differentials-home.tsx. No data, routing, ranking or clinical logic is touched; the hrefs, the selection state, and the accessible names are all unchanged. The realistic risk is layout: a wider trailing column on desktop rows and a footer action row on phone cards. Both were checked against the narrow-viewport overflow and badge single-line guards, which pass.Notes
scripts/pr-policy.mjsclassifies this diff asclinicalRisk: false,operationalRisk: false,ragRanking: false,ui: true, so the Clinical Governance Preflight section does not apply.🤖 Generated with Claude Code
https://claude.ai/code/session_017QSV1pJvt6QnprenaWFyza
Generated by Claude Code
Note
Low Risk
Presentational UI in a single file; hrefs, selection state, and accessible names are unchanged—main risk is layout on narrow viewports or mis-taps between open and compare.
Overview
Differential search result cards (desktop rows, mobile cards, and best-match sections) now behave like one primary tap target to open the record, with clearer separation from compare.
The existing title
Linkgains a stretched::afterhit area (stretchedOpenLinkClass) so tapping anywhere on the card navigates, while screen readers still get a single link named by the title—no duplicate overlay anchor.OpenAffordanceadds visible “Open differential” / “Open presentation” (or compact “Open”) plus a chevron so users know where to tap. Focus stays on the title link only, avoiding stacked focus rings that would break the focus is singular UI smoke assertion.Compare is reworked so it does not read as “open”:
SelectionCheckboxcan show a Compare / Added pill (showLabel,z-10above the stretched link). Mobile cards move compare into a footer row opposite the open affordance; desktop keeps the compact checkbox in the trailing column (showLabel={false}).Visual triage cues get a left
StatusRail(emergent / urgent / investigations) aligned with existing status semantics. Cards pick uprounded-xl, hover/press feedback, a wider trailing column for the open label, and the urgency rail onDesktopResultRow,MobileResultCard, andBestAnswerCard(including compact mobile best-match layout tweaks).Reviewed by Cursor Bugbot for commit d44ac43. Configure here.