feat: condense answer-page library matches and polish answer chrome#487
Conversation
- Cross-mode "Also in your library" cards become compact single-row items in a wrapping rail (no horizontal scroll, no clipped cards); subtitle dropped, search action is an icon button, decorative badge hidden below sm so titles keep room - Sources capsule unified to a single rounded "Sources" pill with count badge in every state; grounding caveats stay on the Source-only pill and Review banner - Source-only disclosure restyled as a rounded amber pill that expands into a soft panel - "Try next" follow-ups get an eyebrow label above larger wrap-safe chips (stacked layout stretches so chips wrap at the column edge) - Answer support card rows tightened; Review tag rounded Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sign-polish-ffd5a6
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe changes simplify source labeling, add source-review notices for prior answers, add stacked follow-up chip layouts, convert cross-mode links to a wrapping layout, and refine evidence-panel and source-capsule styling. ChangesClinical dashboard presentation
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (10 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2c7726061
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/components/clinical-dashboard/evidence-panels.tsx (1)
236-238: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMinor: sourceLabel pill diverges from
subtleStatusPillused elsewhere in the same card.Line 209 in this same component still uses
subtleStatusPillfor the safety-count badge, whilepriority.sourceLabelnow hand-rolls an equivalent pill (rounded-full border ... bg-[color:var(--surface-wash)] ...). Not a functional problem, but two near-identical pill styles now coexist in the same file.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/clinical-dashboard/evidence-panels.tsx` around lines 236 - 238, Replace the hand-rolled class list on the priority.sourceLabel span with the existing subtleStatusPill style used by the safety-count badge in the same component, removing the duplicate pill styling while preserving the displayed label.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/clinical-dashboard/cross-mode-links.tsx`:
- Around line 65-76: The search button currently records the open telemetry
event before invoking onModeSearch. Remove logCrossModeLinkOpen from this button
handler, and if tracking is required, add or use a dedicated search telemetry
function rather than the open event.
---
Nitpick comments:
In `@src/components/clinical-dashboard/evidence-panels.tsx`:
- Around line 236-238: Replace the hand-rolled class list on the
priority.sourceLabel span with the existing subtleStatusPill style used by the
safety-count badge in the same component, removing the duplicate pill styling
while preserving the displayed label.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5c227f08-3c8b-4a32-99b3-58ed9995a40a
📒 Files selected for processing (10)
src/app/globals.csssrc/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/answer-content.tsxsrc/components/clinical-dashboard/answer-follow-up-suggestions.tsxsrc/components/clinical-dashboard/answer-result-surface.tsxsrc/components/clinical-dashboard/answer-suggestion-chips.tsxsrc/components/clinical-dashboard/cross-mode-links.tsxsrc/components/clinical-dashboard/evidence-panels.tsxsrc/components/ui-primitives.tsxtests/ui-smoke.spec.ts
💤 Files with no reviewable changes (2)
- src/components/clinical-dashboard/answer-result-surface.tsx
- src/components/ClinicalDashboard.tsx
Summary
smso titles keep room on phones.tests/ui-smoke.spec.tsrail assertion now checks the wrap layout instead ofoverflow-x-auto.Note: this branch (like ~15 sibling
claude/*branches) carries the shared ancestor commit648abfa3f("docs: align readiness runtime version", ±2 lines indocs/production-readiness-checklist.md) that never landed on main; it is included in this PR's diff.Verification
npm run verify:pr-local— not run as a unit: itsformat:checkstep fails locally on two files (CLAUDE.md,.claude/settings.json) that are byte-identical to green main (Windows CRLF checkout artifact), and its conditionalnext buildis unsafe beside the live dev server on this machine. The component gates were run individually instead (below).npm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed — run twice (pre-merge and post-merge with main). Post-merge: 128 passed, 2 failed (ui-smoke.spec.ts:1891routed-differential race,ui-tools.spec.ts:489hero sizing); both failures reproduce byte-identically with this PR's files reverted toorigin/mainin the same environment, so they are main-side/local-env, not from this diff. Pre-merge run: 124/124 after warm re-runs of two dev-server cold-compile timeouts.npm run verify:cheap— green on the merged tree (lint, typecheck, 1489 vitest tests, runtime/sitemap/type-scale checks).npm run format:checkgreen for all 10 files this PR touches (repo-wide run flags only the two pre-existing CRLF-artifact files identical to main).npm run verify:release— not run (not a release).npm run eval:retrieval:quality— not run: no retrieval, ranking, selection, chunking, or scoring behavior changed (presentation-only diff).npm run eval:rag -- --limit 15— not run: answer generation, synthesis prompt, and post-processing unchanged.npm run check:production-readiness— run because source rendering (presentation) changed. Result: code-level checks pass; the 2 FAIL lines are missingNEXT_PUBLIC_SUPABASE_URL/SUPABASE_SERVICE_ROLE_KEY/OPENAI_API_KEYenv in this secretless worktree, which the repo docs classify as expected demo-mode behaviour, not a regression.npm run check:deployment-readiness— not run: no deployment/startup behavior changed.Additional evidence: targeted Playwright (
cross-mode quick links,source-only) green; visual QA via headless Chromium at 1280px and 390px including a forced source-only state; horizontal overflow measured 0px on both viewports.Clinical Governance Preflight
Completed because the change touches source rendering (presentation only — no retrieval, generation, access, or data-path changes).
Clinical KB Database(sjrfecxgysukkwxsowpy) — no env/config changes.Notes
ClinicalDashboard.tsxis touched (5 lines: removal of now-unusedweakEvidence/groundedprops at one call site).🤖 Generated with Claude Code