Answer page: status chips above the answer, thumb verdicts below it - #2484
Answer page: status chips above the answer, thumb verdicts below it#2484BigSimmo wants to merge 2 commits into
Conversation
Applies the approved specimen (artifact "Cited Answer Specimens") to the live answer surface, with two owner decisions taken on 2026-08-31. The header becomes one status line: the support chip the card already owned, the safety-notes chip, the evidence-gaps chip, and the cited count. Every chip carries an icon and words, so none of them relies on colour — they read the same in forced-colors and in greyscale print. The action row becomes Copy with sources on the left and the two verdicts on the right. The thumb down is the way in to "report a problem": it opens the list of problem types, which now omits the affirmative option, because offering "Verified" inside a list opened to report a fault records the opposite of what the reader meant. The thumb up records that one verdict in a single tap. Evidence gaps left this row for the header, which is what keeps the row to one line at 390px. The governed verification sentence moves below the answer (owner decision). `AnswerCard` still owns the wording and still refuses to render an answer without it; `verificationPlacement="content"` is the same contract `retrievalStatePlacement` already used, and the surface honours it. The support card goes with it. Its safety row was the only route to the safety-critical findings sheet, so that route moved to the header chip, which is a real button with the repo's `before:-inset-y-*` hit expansion: drawn small, tapped at full size. Removing the card left its `priority` derivation, and `answerGrounded`, `safeAnswerSections`, `sourceLookup` and two imports in ClinicalDashboard, with no consumers; those go too. "Also in your library" is kept, deliberately against the specimen: that specimen is one answer with no library matches to show, and the line is the only route from an answer to the Medication and Differentials records. Also: "Sources" becomes "Cited documents", "Ask next" becomes "Follow up", and the generated design-system adoption and design-sync manifests are regenerated for the new AnswerCard props. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NkKHznd5E5KLnKbowRTLd8
…smoke suite `verify:ui` found seven failures on the answer surface. All seven are fixed here rather than accommodated. The safety chip was a 24px target. It used the repo's `before:-inset-y-*` hit expansion, which a thumb finds and `boundingBox()` does not — and this chip is the only route to the safety-critical findings sheet, which is the last control on this surface that should rest on a target no gate can measure. It is now a 48px button with the pill drawn inside it, carrying `-my-3` so the line keeps the pill's own height instead of becoming 96px of chrome above a clinical answer. Measured: safety 133x48, evidence gaps 138x48, both verdicts 48x48. Six assertions pinned `answer-support-card`, removed with the owner's decision. They are repointed at what carries the same guarantees now — the chip states the support level, a degraded answer reads "limited"/"unassessed" rather than looking fully supported, and the safety sheet still opens at full tap size — not deleted. The document-order check gains the caution's new position below the utilities, so the placement decision is pinned rather than assumed. One failure was a latent defect this change exposed rather than caused. With the support card gone the answer is shorter, so the phone runway test took its `else` branch for the first time, and that branch measured a listitem inside the library panel it had just collapsed — `display:none`, so nothing to measure, so a 60s timeout. It now measures the last follow-up row, which is what "the last content clears the dock" means on this surface. 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_ae38cac6-45ec-4625-a2ce-f74e441fb0a2) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f5aeac27a
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // `-my-3` keeps the 48px box a real box — `boundingBox()` still measures 48 — | ||
| // while contributing only the pill's own 24px to the line, so the status line | ||
| // does not become 96px of chrome above a clinical answer on a phone. | ||
| "inline-flex min-h-12 shrink-0 items-center -my-3 focus-visible:outline-none"; |
There was a problem hiding this comment.
Keep wrapped status buttons out of the answer body
When the safety/evidence chips wrap on a narrow answer surface, -my-3 removes 24px from each button's layout footprint while leaving its 48px hitbox in place. In the compiled app at a 320px viewport (288px content width), the evidence-gaps button overlapped the first 12px of the answer body, so clicking text or a citation beneath that region can activate the chip instead. Keep the full hitbox in layout or add equivalent separation; a focused geometry check asserting that each chip rectangle does not intersect the prose rectangle would catch this.
Useful? React with 👍 / 👎.
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. |
|
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. The only repository destination is BigSimmo/Database, and the only branch destination is the pull request head branch claude/answer-page-handover-c2qlwy at starting commit 1f5aeac; never publish fixes to a detached or synthetic work branch and never create a stacked pull request. Use the authenticated GitHub connector to commit each approved fix to BigSimmo/Database:claude/answer-page-handover-c2qlwy, then verify that the pull request head contains the published commit before reporting success. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. For a fixed thread, reply with as the first line and as the second line. For a no-code disposition, use followed by . These result markers authorize the workflow to close that exact thread only after it verifies a fixed commit is the pull request head; a local-only commit is not a fix. If publication or verification fails, do not use either result marker, do not claim success, and leave the thread open with the blocker. If human input or new authorization is required, do the same. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Applies the approved specimen (artifact "Cited Answer Specimens") to the live answer surface, with two owner decisions taken 2026-08-31.
AnswerCardalready owned, a safety-notes chip, an evidence-gaps chip, and the cited count. Every chip carries an icon and words, so none of them relies on colour — they read the same in forced-colors and greyscale print.AnswerCardstill owns the wording and still refuses to render an answer without it;verificationPlacement="content"is the same contractretrievalStatePlacementalready used, and the surface honours it. The words are unchanged.priorityderivation, plusanswerGrounded,safeAnswerSections,sourceLookupand three imports inClinicalDashboard, with no consumers; those go too.AnswerCardprops.Two deliberate deviations from the specimen, both flagged to the owner:
ANSWER_SUPPORT_WORDINGprecisely so a call site cannot soften it.Verification
npm run verify:pr-local— superseded by the individual gates below, all run directly on this content.npm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changedverify:ui, second full run, after the fixes in1f5aeac27:That one failure is not this PR's: it passed in the first full run on this branch, it passes in isolation on this exact content (
1 passed (4.1s)), and the diff touches nothing in the mode menu it waits on —ClinicalDashboard.tsxchanges are dead-code removal plus a prop reorder. One re-run was spent confirming it, per the flake policy.The first full run found seven real failures on the answer surface, all fixed in
1f5aeac27rather than accommodated, and all seven now pass:Also run, all green on this content:
npm run lint,npm run typechecknpm run test— 11,770 passing (the three generated design-system manifests were regenerated, not excused)npm run check:design-system-contract:133x48, evidence gaps138x48, both verdicts48x48.npm run check:production-readinessnot run: it fails on pre-existing privacy debt unrelated to this change, tracked as#HVTYAT.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes against those items, since this change moves two safety-relevant elements:
ui-smoke, which asserts it exists and sits below the utilities, so a future call site takingverificationPlacement="content"and forgetting to render it fails the suite rather than shipping silently.@criticalsmoke test still asserts the trigger mounts unconditionally for the clozapine fixture, so a regression that drops safety findings fails loudly.#227over#207is the standing decision that the duplicate is the dangerous outcome.Notes
One defect of mine that this repo's own rules caught, recorded because the trap generalises: the safety chip was first built at 24px using the
before:-inset-y-*hit-expansion idiom. A thumb finds that region;boundingBox()does not, and neither does any tap-target check in the suite. On the only route to the safety findings, a target no gate can measure is the wrong trade. It is now a 48px button with the pill drawn inside it, carrying-my-3so the status line keeps the pill's own height instead of becoming 96px of chrome above a clinical answer.Generated by Claude Code
Note
Medium Risk
Presentation-only for retrieval/RAG, but it moves safety-findings and governed-verification UI with new tap targets and placement contracts—regressions would affect clinical review workflows rather than data paths.
Overview
Reorganizes the clinical answer surface to match the approved specimen: one status line above the prose, a slimmer action row, and the governed verification sentence below the answer instead of in the card header.
AnswerCard gains
metaChips,metaTrailing, andverificationPlacement(header vs content). On the live bare frame, evidence support is shown as a pill chip with icon; optional chips carry safety notes (48px button → findings sheet), evidence gaps (expandable warnings), and a trailing cited count.The inline AnswerSupportSummaryCard and related dashboard plumbing (
answerGrounded,safeAnswerSections,answerSupportPriorityon this path) are removed; safety access moves to the header chip. Answer utilities are now Copy with sources plus thumb up (recordsverified) and thumb down (opens a problems-only feedback panel). Evidence gaps leave the utility row for the header chips.VerificationNotice is rendered by the surface when
verificationPlacement="content"; wording is unchanged. Minor copy: source rail “Cited documents”, follow-ups “Follow up”. Design-sync manifests and smoke/DOM tests are updated to pin document order and the verification obligation.Reviewed by Cursor Bugbot for commit 1f5aeac. Configure here.