Skip to content

Answer mockup: take the symbol off the turn, drop the safety rail, and make the two panels one - #2386

Merged
BigSimmo merged 7 commits into
mainfrom
claude/answer-page-redesign-review-4ufdl5
Aug 26, 2026
Merged

Answer mockup: take the symbol off the turn, drop the safety rail, and make the two panels one#2386
BigSimmo merged 7 commits into
mainfrom
claude/answer-page-redesign-review-4ufdl5

Conversation

@claude

@claudeclaudeBot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Design scratch only. Nothing under src/components/clinical-dashboard/ or src/app/globals.css changes, and no production route renders any of it. classifyPullRequestFiles on this diff returns clinicalRisk: false, operationalRisk: false, ragRanking: false.

  • The assistant avatar comes off the chat turn, and the answer prose runs the full column width. On a 390px phone that column cost about 2.75rem of every line of a clinical answer — the exact measurement --answer-message-gutter exists to hold — and bought nothing: there are two speakers, the person's turn is already a right-aligned bubble, and the answer is the one element on this surface that wants the full measure. What identifies the turn instead is the provenance line, which is information rather than decoration, and which now sets as two deliberate lines (what wrote the answer, then what the reader owes it) instead of one sentence breaking mid-phrase. Its wording is unchanged.
  • A hairline and a quiet CITED DOCUMENTS / SOURCES READ eyebrow above the card row. With no gutter organising the column, the answer needed a clean end before its evidence.
  • The card row fades at its right edge, so it reads as scrollable without a scrollbar — the mechanism .answer-suggestion-chips-scroll already ships in globals.css. Written as an inline style because the arbitrary Tailwind property did not generate a rule here; checked in the browser, not assumed.
  • Copy became Copy with sources. On this product an answer copied without its citations is the actual hazard, so the control names what it puts on the clipboard.
  • The safety card is drawn without its coloured rail.AnswerSupportSummaryCard runs border-t-2 border-t-[color:var(--warning)] across the top of a card that also holds Evidence gaps and Report a problem, so the rule colours two controls carrying no state. Colour moves into the icon tile plus a short RED FLAG chip — the direction also-matches-accent-mockups.tsx already records for the sibling surface. The signal does not weaken: the design-system contract holds colour-only status indicators at zero either way. The evidence-gaps count is drawn neutral rather than amber, because a status-coloured numeral is what that same contract holds at zero.
  • "Also in your library" and "Also matches" become one list. They stack directly on top of each other under an answer and read as one panel repeated; they answer one question, so each row names what it is (Medication, Factsheet, Mode) instead of leaving that to be inferred from which panel it landed in. "4 related modes" goes — "mode" is internal vocabulary. Two directions are drawn so the owner picks rather than approving the only option on the page.
  • Found while drawing it:answer-result-surface.tsx wraps AnswerFollowUpSuggestions in hidden sm:block, so the most likely next tap on the answer surface has been desktop-only. Both directions restore it, above the matches. That fix belongs to the production PR, not this one.

Verification

  • npx tsc --noEmit — no diagnostics.
  • npx eslint on both changed component files — exit 0, no findings.
  • npm run check:design-system-contractpassed (1012 production files); no ratchet moved. Status-colour boundary: colour-only status indicators 0; status-coloured numerals 0; image inversions 0.Scale ratchets: raw padding literals 42; raw radius literals 20; raw gap literals 20; raw margin literals 52; raw line-height literals 3.
  • npm run format then repo-wide npx prettier --check ."All matched files use Prettier code style!"
  • Browser proof on /mockups/answer-chat-perfected-v2 at 390px and 1280px, in light, dark, and Chromium forcedColors: "active". Alignment measured with text ranges rather than element boxes, because the prose box bleeds 8px for its highlight wash: notice, prose, eyebrow and card row all start at x = 59.
  • npm run verify:ui — not run, by risk. No production route renders these components; the Chromium journeys do not reach /mockups/**, which 404s in production. It runs before the production PR, where shared answer-surface foundations actually change.
  • npm run test — not run. No test references any symbol in this diff (searched tests/ for the changed component and token names).

Risk and rollout

  • Risk: low and contained. These routes are design scratch, blocked in production by src/proxy.ts, and exempt from the wiring and reachability gates — but not from typecheck, lint, the design-system contract, or check:bundle-budget, all of which ran or apply. The one thing a reviewer should weigh is whether the safety card reads as a warning without its rail; the before-and-after is drawn side by side in section Seven for exactly that judgement.
  • Rollback: git revert either commit independently. They share no hunks.
  • Provider or production effects: none. No provider-backed gate was run and no live service was called.
  • RAG impact: none — no file under src/lib/rag/**, no retrieval RPC, no ranking surface, no eval harness, no golden fixture. classifyPullRequestFiles returns ragRanking: false.

Notes

  • The production change is deliberately a separate pull request, after the owner picks a direction: removing the shield and --answer-message-gutter from answer-content.tsx / answer-card.tsx / globals.css, restyling the real safety card, capping in-text marks at one number plus +N, and restoring the follow-up suggestions on phones. That one is clinical-risk and carries the full governance preflight.
  • Both decisions are written into docs/answer-page-redesign-handover.md (§12.6, §12.7), which is what the production change will be built from.

Generated by Claude Code

The perfected answer mockup opened every assistant turn with a shield tile in
its own grid column, and indented the answer prose to clear it. On a 390px
phone that column costs about 2.75rem of every line of a clinical answer and
buys nothing a reader needs: there are only two speakers, the person's turn is
already a right-aligned bubble, and the answer is the one element on this
surface that wants the full measure.
Both screens in the v2 mockup now render a single full-width stack. What
identifies the turn instead is the provenance line, which is information rather
than decoration, and which now sets as two deliberate lines — what wrote the
answer, then what the reader owes it — instead of one sentence left to wrap
wherever the column ends. Its wording is unchanged.
Travelling with it:
- A hairline and a quiet Cited documents / Sources read eyebrow above the card
row, so the answer has a clean end before its evidence.
- The card row fades at its right edge, the same mechanism
.answer-suggestion-chips-scroll already ships. Written as an inline style
because the arbitrary Tailwind property did not generate a rule here — the
class landed and the computed value stayed none, checked in the browser.
- Copy became Copy with sources. An answer copied without its citations is the
hazard this product exists to prevent, so the control names what it puts on
the clipboard.
- The question bubble drops its semi-bold weight.
Design scratch only. No production surface changes: answer-content.tsx still
renders the shield and globals.css still declares --answer-message-gutter.
Removing those is the follow-up, after the owner approves the look.
Verified: tsc --noEmit clean; eslint clean on both files; prettier clean;
check:design-system-contract passed (1012 production files, no ratchet moved,
--text-soft consumers 0); Chromium proof at phone and desktop widths in light,
dark and forced-colors; answer column text measured aligned at x=59 across the
provenance line, the prose, the eyebrow and the card row.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AP3MXGx1bGeEBmFKYkeLA8
…instead of two
Two corrections the owner photographed on a live phone, drawn as before-and-after
in /mockups/answer-chat-perfected-v2 section Seven. No production surface changes.
The safety card's warning-coloured top rule spans a card that also holds Evidence
gaps and Report a problem, so it colours two controls carrying no state at all.
Colour moves into the icon tile plus a short RED FLAG severity chip — the
direction already recorded for the sibling surface in
also-matches-accent-mockups.tsx ("no top rail; colour lives in the icon tile and
the short code chip"). The signal is unchanged: the design-system contract holds
colour-only status indicators at zero either way, so the icon and the words were
always carrying it. The evidence-gaps count is drawn neutral rather than amber,
because a status-coloured numeral is the thing that same contract holds at zero.
Under it, "Also in your library" and "Also matches" stack on top of each other and
read as one panel repeated. They answer one question — where else does this appear
— so they are one list, each row naming what it is (Medication, Factsheet, Mode)
rather than leaving that to be inferred from which panel it landed in. "4 related
modes" goes; "mode" is internal vocabulary.
Found while drawing it: answer-result-surface.tsx wraps AnswerFollowUpSuggestions
in `hidden sm:block`, so the most likely next tap on the surface has been
desktop-only. Both directions restore it, above the matches.
Two directions are drawn so the owner picks rather than approving the only option
on the page: A keeps the horizontal card row the answer already uses; B trades it
for full-width questions and folds the matches onto one expandable line.
Verified: typecheck, lint, check:design-system-contract (no ratchet moved;
colour-only status indicators 0, status-coloured numerals 0), repo-wide prettier,
and browser proof at 390px and 1280px in light, dark and forced colours.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AP3MXGx1bGeEBmFKYkeLA8
@claude
claudeBot requested a review from BigSimmo as a code ownerAugust 26, 2026 03:14
@supabase

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

BigSimmo
BigSimmo previously approved these changes Aug 26, 2026
@BigSimmo
BigSimmo enabled auto-merge (squash) August 26, 2026 04:54
…design-review-4ufdl5
# Conflicts:
#	docs/answer-page-redesign-handover.md
cursor[bot]
cursorBot previously approved these changes Aug 26, 2026

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale comment

Approved. Cursor Bugbot was not present after the first check poll, so that signal was skipped; no approval policy required human review and there is no current approval from this automation. No reviewers were assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@github-actions

github-actionsBot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Buildneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #14008 (failure).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

BigSimmoand others added 2 commits August 26, 2026 21:40
…r specimen
CI Build failed at mockups +25.2% gzip vs a 25% hygiene ceiling. Production stayed within tolerance. Record the CI-measured scratch size so the design-only specimen can land without raising the user-facing budget.
Co-authored-by: Cursor <cursoragent@cursor.com>
cursor[bot]
cursorBot previously approved these changes Aug 26, 2026

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale comment

Approved. Cursor Bugbot was not present after the first check poll, so that signal was skipped; no approval policy required human review and this automation has no current approval. No reviewers were assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@BigSimmo

Copy link
Copy Markdown
Owner

Build was red on mockups scratch weight: 610.6 KiB gzip vs 487.6 KiB baseline (+25.2%, ceiling 25%). Production stayed within tolerance. There were no unresolved review threads.

501dfe7d6 refreshes only bundle-budget.jsonmockups.gzipBytes to the CI-measured scratch size. Production and route budgets are unchanged. This is the documented hygiene-ceiling path for design-scratch growth, not a production-budget raise.

Keep main's mockups gzip baseline from #2390 (627814). The PR-local 625306 refresh was only needed against the older 499284 ceiling.
Co-authored-by: Cursor <cursoragent@cursor.com>
cursor[bot]
cursorBot approved these changes Aug 26, 2026

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved. Cursor Bugbot was not present after the first check poll, so that signal was skipped; no approval policy required human review and this automation has no current approval. No reviewers were assigned.

Open in WebView Automation

Sent by Cursor Approval Agent: Pull Request Router and Approver

@BigSimmo
BigSimmo merged commit e126394 into mainAug 26, 2026
33 checks passed
@BigSimmo
BigSimmo deleted the claude/answer-page-redesign-review-4ufdl5 branch August 26, 2026 14:52
BigSimmo pushed a commit that referenced this pull request Aug 27, 2026
… panel
Direction B from /mockups/answer-loading-redesign, applied to the live surface
after the clinical owner chose it (2026-08-27).
`AnswerProgressStepper` is gone. It was a filled accent panel carrying a 36px
icon tile, a five-circle stepper with connecting rails, a scrolling ECG trace, a
per-second elapsed counter and a Processing details disclosure — roughly 210px
of the loudest chrome in the product, occupying the answer's own position for
the four to twelve seconds before every answer, on a surface that PRs #2386 and
#2388 had just spent their whole argument quietening. It narrated the
orchestrator's five stages, which the reader is not operating, and it never
showed a single source.
`AnswerProgress` replaces it with one status line plus the arriving source rail.
The rail is the substantive half. The evidence preview already crossed the
stream boundary before the prose — trimmed, owner-scoped, governed, consumed by
the client — and was being rendered as a SECOND full panel below the stepper,
with its own icon tile, heading and three-column card grid. Two loud blocks in
the answer's position, both removed when the answer arrived. It is now a
horizontal rail of small cards drawn to look like the source rail the arrived
answer renders, mounted inside AnswerProgress rather than beside it, so nothing
is removed and nothing jumps when the answer lands.
Cards carry a dot, not a number. The preview is the top slice of retrieval in
retrieval order; the final list is rebuilt from what the answer cites and
re-capped by trust. A number assigned during the wait can point at a different
document once the answer lands, which is the precise failure the citation design
exists to prevent. Pinned by a DOM test, and stated in the rail's accessible
name for a reader who never sees the dot.
Checked while building, not assumed: `isDeliverableVerifiedUnit` pins
evidence_preview to sequence 0 and rejects a repeat, so the preview crosses once,
complete — it cannot accrue card by card. And it is gated behind
NEXT_PUBLIC_RAG_INCREMENTAL_EVIDENCE_PREVIEW_RENDER (#100 Phase 1), off by
default, so today the line carries the accrual alone via resultCount and the rail
is simply absent rather than a placeholder.
Improvements beyond the mockup:
- Retrieval counts passages and selection counts sources, never one noun for
both. Collapsing them is how a reader believes two dozen documents are behind
an answer that cites three. Pinned in tests/answer-progress.test.ts.
- `fallback` says "Assembling the answer from the sources directly" while it is
happening. Twenty of thirty answers in the 2026-08-18 blinded read were
source_only; the wait is the honest place to set that expectation.
- Processing details became "How this answer was built", shown only after a
retrying/fallback/cached run. The old disclosure held the same five stages for
every question, which is why nobody opened it.
- The elapsed counter is gone. In its place one threshold at 10s appends
"taking longer than usual" and does not tick. Nothing can be done with the
number while the search is healthy; re-drawing it every second in the position
the eye rests on is what made the wait the subject.
- SearchProgressBanner (library/document modes) loses its filled accent band and
spinning Loader2 for the same line. Fill is how this app marks a hazard.
- AnswerSkeleton drops its own status line. Found in the browser, not in a test:
it renders in the answer's body slot directly under AnswerProgress, so the
screen showed "Writing the answer…" above "Reading your question…". There is
now exactly one place that says what is happening.
- The completion dot is not green. A status hue that nothing else on the element
repeats is a colour-only signal, and it was redundant beside a line already
reading "Answer ready in 3s". Caught by check:design-system-contract.
Motion. The ECG trace, its two animation tokens, its keyframes and its
compositor rules are deleted; the indicator is a 5px dot breathing on opacity.
That choice is what holds the contract ui-phone-motion.spec.ts exists for, after
Reduce Motion set the trace to opacity 0 and left a dead panel on a physical
iPhone: a stopped dot is a complete, correct bullet, where a stopped spinner is a
fragment of a circle. The animation stays in globals.css rather than a
motion-safe: utility because html[data-motion="full"] must be able to opt back in
over the OS, which a Tailwind media variant cannot express.
tests/answer-activity-trace-css.test.ts pinned the deleted component, so it is
replaced by tests/answer-progress-indicator-css.test.ts carrying the same
regression forward against the dot — including an assertion that the trace stays
deleted, since a partial revival is how the original defect shipped.
docs/search-chrome-behaviour.md's physical-iPhone rubric named the ECG strip by
class and would have sent a tester hunting for markup that no longer exists;
docs/design-system/COMPONENTS.md named the component in its live-region adoption
note. Both updated — the second found by check:dead-code-candidate, which is the
gate doing its job.
Verified: verify:cheap exit 0 — 37 gates enforced, design-system contract passed
(1021 production files, no ratchet moved), 886 test files / 10733 tests passed;
Playwright chromium answer-progress-ui-smoke + ui-phone-motion 9 passed,
ui-universal-search 20 passed; driven in a real browser at 390px through
scoping → retrieving → retrieved(24) → ranking(4 AU, 2 WA) → generating and past
the 10s threshold, and again with the preview flag on to confirm six real cards
render, link to /documents/<id>?page=&chunk=, and carry no numbers.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012kHT2YKCNnUrVckTaJW6ga
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