Skip to content

Answer page: status chips above the answer, thumb verdicts below it - #2484

Open
BigSimmo wants to merge 2 commits into
mainfrom
claude/answer-page-handover-c2qlwy
Open

Answer page: status chips above the answer, thumb verdicts below it#2484
BigSimmo wants to merge 2 commits into
mainfrom
claude/answer-page-handover-c2qlwy

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Applies the approved specimen (artifact "Cited Answer Specimens") to the live answer surface, with two owner decisions taken 2026-08-31.

  • The header becomes one status line: the support chip AnswerCard already 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.
  • The action row becomes Copy with sources plus the two verdicts. 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 words are unchanged.
  • The support card goes. Its safety row was the only route to the safety-critical findings sheet, so that route moved to the header chip — a real button, measured at 133×48. Removing the card left its priority derivation, plus answerGrounded, safeAnswerSections, sourceLookup and three imports in ClinicalDashboard, with no consumers; those go too.
  • "Sources" becomes "Cited documents"; "Ask next" becomes "Follow up".
  • Generated design-system adoption and design-sync manifests regenerated for the new AnswerCard props.

Two deliberate deviations from the specimen, both flagged to the owner:

  • "Also in your library" is kept. 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. Removing chrome a picture omits is one thing; removing a navigation route on the same evidence is another.
  • The support chip still reads "Strong support", not "Verified". Those are different claims — evidence strength versus someone having checked — and the wording is owned in ANSWER_SUPPORT_WORDING precisely 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:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed

verify:ui, second full run, after the fixes in 1f5aeac27:

1 failed
  [chromium] › tests/ui-accessibility.spec.ts:278:7 › shared-home mode changes keep the document title aligned with visible copy
632 passed (26.4m)

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.tsx changes 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 1f5aeac27 rather than accommodated, and all seven now pass:

7 passed (27.2s)

Also run, all green on this content:

  • npm run lint, npm run typecheck
  • npm run test — 11,770 passing (the three generated design-system manifests were regenerated, not excused)
  • 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).
Status-colour boundary: colour-only status indicators 0; status-coloured numerals 0; image inversions 0.
  • Tap targets measured in Chromium at 390px: safety chip 133x48, evidence gaps 138x48, both verdicts 48x48.
  • The page was driven at 390px in light, dark and forced-colors, exercising the thumb-down → report list and the safety chip → findings sheet.

npm run check:production-readiness not run: it fails on pre-existing privacy debt unrelated to this change, tracked as #HVTYAT.

Risk and rollout

  • Risk: presentation-only on the answer surface. No retrieval, ranking, generation, ingestion or data path is touched. The two clinical signals that moved — the safety-findings route and the governed caution — are both still on screen and both now pinned by assertions that did not exist before.
  • Rollback: revert the two commits; nothing outside the answer surface and its tests depends on them.
  • Provider or production effects: None.
  • RAG impact: none

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes against those items, since this change moves two safety-relevant elements:

  • The governed caution is not weakened, shortened or reworded — only placed. It is now pinned in document order by ui-smoke, which asserts it exists and sits below the utilities, so a future call site taking verificationPlacement="content" and forgetting to render it fails the suite rather than shipping silently.
  • The safety-findings sheet keeps exactly one route, and that route is now a 48px button rather than a card row. The @critical smoke test still asserts the trigger mounts unconditionally for the clozapine fixture, so a regression that drops safety findings fails loudly.
  • The degraded-answer caution the removed card restated ("Review source match / Verify cited passages") was a second copy: the source-only disclosure carries the governed wording, and the chip now states the degraded support level. #227 over #207 is 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-3 so 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, and verificationPlacement (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, answerSupportPriority on this path) are removed; safety access moves to the header chip. Answer utilities are now Copy with sources plus thumb up (records verified) 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.

claude added 2 commits August 31, 2026 13:57
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
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 27e5aa2f-489e-4566-9381-ca43a6895ffe


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.

❤️ Share

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

@supabase

supabase Bot commented Aug 31, 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 ↗︎.

@cursor

cursor Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T14:14:38.929879Z 1f5aeac Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BigSimmo

Copy link
Copy Markdown
Owner Author

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

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".

Sign up for free to 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