fix(ui/answer): keep answer-surface counts neutral and the safety tile amber - #2481
Conversation
…e amber
Three colour defects found by opening the answer page at 390px in light, dark
and forced colours, all the same mistake — a status colour landing on a count
instead of on the icon that already carries the state.
- The `Evidence gaps` count was painted `--warning-soft`. §12.7 of the answer
page handover settled this ("the evidence-gaps count is neutral, not amber. A
count painted with a status colour is a status-coloured numeral, which the
contract holds at zero, and the icon beside it already says what state it is
in") and the approved specimen in answer-chat-perfected-v2-mockups.tsx draws
it neutral, but the correction never reached production. It now matches the
neutral count the safety row directly above it already used.
- The safety-findings sheet opened with an amber shield sitting in a *blue*
tile. The call site passed `text-[color:var(--warning)]` on top of
`iconTilePremium`, which recoloured only the glyph — the recipe's
clinical-accent border and background stayed. The tile is now written out with
the warning tones, identical to `AnswerSupportSummaryCard`'s tile, so the
colour the design assigns to the icon tile is the same on both sides of the
tap. `iconTilePremium` is no longer imported there.
- That sheet's header count was amber too, while the count on the card that
opens it is neutral — the same number in two treatments. Now neutral, geometry
unchanged.
Display only. No behaviour, no retrieval, no clinical wording changes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkKHznd5E5KLnKbowRTLd8
|
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 |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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_102980e6-24bb-45b0-b3e1-6e243c7d6c7f) |
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. |
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #14585 (failure). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
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_802006cf-df00-49f8-9e3b-dd54a7fdb374) |
Resolve conflicts: keep answer UI colour fixes from this PR; take main's ui-smoke.spec.ts (containment asserts from #2471).
An agent push on PR #2481 rewrote tests/ui-smoke.spec.ts from 6,019 lines to 1,081, dropping 74 of its 82 journey tests, under a commit message that described a narrow comparison change. Squash auto-merge was armed at the time and a gutted suite goes green trivially, so only an unrelated merge conflict kept the deletion off main; the later merge of main restored the file and the squash landed the intended two-file change. No gate would have caught it: nothing asserts a floor on Playwright test count or fails on a large test deletion, and the "never skip, disable, or quarantine a test to get green" rule is agent policy rather than an enforced check. The queued request proposes a per-path ratchet on test counts, in the spirit of the bundle-budget baselines. Claude-Session: https://claude.ai/code/session_01NkKHznd5E5KLnKbowRTLd8 Co-authored-by: Claude <noreply@anthropic.com>
Summary
Evidence gapscount is neutral instead of amber. It was painted--warning-soft. §12.7 ofdocs/answer-page-redesign-handover.mdsettled this — "the evidence-gaps count is neutral, not amber. A count painted with a status colour is a status-coloured numeral, which the same contract holds at zero, and the icon beside it already says what state it is in" — and the approved specimen inanswer-chat-perfected-v2-mockups.tsx("Seven — What sits under the answer") draws it neutral, but the correction never reached production. It now matches the neutral count the safety row directly above it already used, so the two counts on one screen read as one treatment.text-[color:var(--warning)]ontoiconTilePremium, which recoloured only the glyph; the recipe's clinical-accent border and background stayed. Measured at 390px: card tilergb(254,247,236)/rgb(245,217,168), sheet tilergb(242,248,254)/rgb(207,226,246)— the same control drawn in two colours either side of one tap. The tile is now written out with the warning tones, identical toAnswerSupportSummaryCard's tile, which is what owner decision 3 means by colour living in the icon tile.iconTilePremiumis no longer imported in that file.Display only. No behaviour, no retrieval, no clinical wording, no copy changes. Two files, colour tokens and comments.
Verification
npm run verify:pr-localAlso run directly, before the gate above:
npm run test:focused -- --files src/components/clinical-dashboard/evidence-panels.tsx,src/components/clinical-dashboard/answer-result-surface.tsx—Test Files 6 passed (6) / Tests 62 passed (62).npm run check:design-system-contract—Design-system contract passed (1084 production files; raw colors 0; literal shadows 0; legacy tap classes 0; sub-floor interactive min-heights 2; edge conflicts 5; 1px shadow spreads 0).andStatus-colour boundary: colour-only status indicators 0; status-coloured numerals 0; image inversions 0.UI verification not run:
npm run verify:uiwas not run because no shared answer-surface foundation changed — this is three colour classes on two components, with no geometry, layout, routing, motion or chrome change. In its place the changed surface itself was proved in Chromium at 390px: the answer page and the safety-findings sheet were rendered in light, dark and forced colours before and after, and the fix was confirmed by reading computed styles rather than by eye. After the change the sheet's icon tile resolves to exactly the card tile'srgb(254,247,236)/rgb(245,217,168)/rgb(138,77,5)in light andrgb(61,47,20)/rgb(114,94,35)/rgb(242,196,90)in dark, and both counts resolve to--surface-wash/--border/--text-mutedin both themes.npm run check:production-readinesswas not run: no clinical workflow, privacy, environment, Supabase, source-governance or deployment behaviour is touched by a colour change. It is separately known to fail on pre-existing privacy debt tracked as#HVTYAT, which is unrelated to this branch and not chased here.A note on the first gate run, for anyone reading the branch history:
tests/privacy-readiness-contract.test.tsandtests/clinical-hazard-controls.test.tsfailed withreviewedCommit is not an ancestor of HEAD. That was the container's shallow clone, not this change — aftergit fetch --deepen=2000both pass, and the fullverify:pr-localabove is green on complete history.Risk and rollout
src/lib/rag/, clinical-search, retrieval-selection, ranking-config, answer-ranking, the retrieval RPCs, the eval harness or the golden fixture is touched.classifyPullRequestFilesreturnsragRanking: falsefor both changed paths.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)On the sixth item specifically, because it is the one a colour change could plausibly weaken: no status signal is removed. The safety row keeps its amber icon tile and its
RED FLAG-style severity chip, the sheet header now carries the warning colour it was already trying to carry, and theEvidence gapscontrol keeps its amberCircleAlerticon and its word. Only the numerals stop being painted, which is what the design decision asked for. On the last item, no clinical decision-support behaviour changed — this alters rendering only.Notes
classifyPullRequestFilesreportsclinicalRisk: false, ui: truefor these two paths, so the preflight above is not machine-required for this diff. It is completed in full anyway, because the answer surface is where clinical output is read.source_onlystate was not inspected at phone width: the local demo server does not honour the response override the smoke suite uses to force it, so it could not be rendered here. Nothing in this diff is specific to that state, but it is an unverified surface and worth a look in a session that can drive it.Generated by Claude Code
Note
Low Risk
Cosmetic styling only on answer-surface badges and sheet chrome; no auth, data, or clinical logic changes.
Overview
Aligns the clinical answer surface with the design contract: status lives in icons and labels, not in count numerals.
The Evidence gaps utility badge and the safety-findings sheet header count now use neutral
--surface-wash/--border/--text-mutedstyling, matching the safety summary row and approved mockups instead of amber warning backgrounds on the numbers.The safety sheet header icon tile no longer stacks warning text color on
iconTilePremium(which left a blue clinical-accent tile with an amber glyph). It uses the same explicit warning border, background, and icon color asAnswerSupportSummaryCard, so the tile matches the card that opens the sheet.Display-only token and class changes in two components; no behaviour, copy, or retrieval changes.
Reviewed by Cursor Bugbot for commit d1485d6. Configure here.