Skip to content

Add three ChatGPT-style Answer result mockups - #2321

Closed
BigSimmo wants to merge 2 commits into
mainfrom
cursor/answer-chat-mockups-025d
Closed

Add three ChatGPT-style Answer result mockups#2321
BigSimmo wants to merge 2 commits into
mainfrom
cursor/answer-chat-mockups-025d

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

The live Answer page is still a verified document card: AnswerResultSurface stages an AnswerCard with query echo, verification notice, support strength, prose, a sources capsule, and evidence sheets. Chat pieces already exist (UserQuestionBubble, prior-turn collapse), but the current result keeps card chrome, so the centrepiece does not read as a conversation.

This PR adds a design-scratch study at /mockups/answer-chat-redesign with three directions, all using the same clozapine-monitoring question and three sources. Shared mockup chrome is suppressed so each frame’s own composer is the only search bar.

  • Simple — A message, not a card. Right-aligned question, left-aligned prose, numbered pills in the sentence, quiet source chips, in-thread quote preview.
  • Sophisticated — The sentence lights the source. Superscript citations highlight the supporting claim. Desktop keeps a sources rail; phone uses an in-frame sheet. Hover/tap work both ways.
  • Perfected — The source comes to the paragraph. A follow-up turn is already on screen. Footnotes expand an inline source card (desktop) or a compact in-frame sheet (phone). A Sources strip mirrors the marks. Copy/retry stay ghosted under the assistant turn.

Retrieval, ranking, and the production Answer surface are unchanged.

Verification

  • Focused Vitest: tests/answer-chat-redesign-mockups.test.ts and tests/answer-chat-redesign-mockups.dom.test.tsx — 7 passed
  • npm run verify:pr-local

Verification not run: verify:pr-local — mockup-only route, 404 in production; smallest gate that can fail is the focused mockup contract and citation-interaction tests above.

UI verification not run: verify:ui — no production UI, routing, or browser journey changed. Walkthrough screenshots/video of the mockup route follow in this session.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims
  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed
  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

Risk and rollout

  • Risk: Low. Design-scratch mockups under /mockups/** (404 in production unless mockups are explicitly enabled). No production Answer, retrieval, or citation-rendering code changed.
  • Rollback: Revert the PR. No data or schema migration.
  • Provider or production effects: None
  • RAG impact: no retrieval behaviour change — mockups only; no files under src/lib/rag/, retrieval RPCs, golden fixtures, or ranking tests

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

These frames are synthetic design scratch. They do not change production answer generation, source rendering, or document access. Currency chips (current / review due) stay clinical, not decorative. The privacy line is the production obligation: “Do not enter patient-identifiable information.” plus the Privacy and data processing link.

Notes

Open /mockups/answer-chat-redesign (mockups enabled) to compare the three directions at phone 390 and desktop 1280. Citations are interactive.

Open in WebOpen in Cursor

The live Answer page still reads as a verified document card. These design-scratch frames keep the same clozapine-monitoring question and sources, and try three citation treatments: inline pills, a claim-to-source rail, and inline source cards that never leave the thread.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@supabase

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

@coderabbitai

coderabbitaiBot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
auto_review:
drafts: true

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

BigSimmo added a commit that referenced this pull request Aug 24, 2026
Records the Run PR maintenance sweep across three open draft/ready PRs:
synced #2322 and #2316 from a stale main behind-state via a clean
fast-forward update; resolved a real merge conflict on #2321 isolated to
generated docs/site-map.md and regenerated it via npm run sitemap:update.
No CI failures or unresolved review threads required action on any of the
three PRs.
Claude-Session: https://claude.ai/code/session_01C4RHy24AtgPobEQQwrj7u1
Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants

@BigSimmo@cursoragent@claude