fix(factsheets): route the mode home through the shared composer template - #2091
Conversation
…late Patient Factsheets rendered its own hand-rolled main/composer-slot markup instead of ModeHomeMain + ModeHomeTemplate, so it never applied the SSR data-composer-reserve attribute other standalone mode homes use — the composer fell back to the phone bottom dock instead of the in-flow hero. Convert the page to the shared template (matching the minimal Answer-home shape: hero, composer, privacy note, governance footer) and drop the bespoke browse/featured sections, which remain fully reachable via the existing /factsheets/search category filters. Remove the three exports (featuredFactsheets, categoryCount, factsheetCategoryGlyph) that were only used by the removed markup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aSV4sbw6iFqEA7Y7JeVes
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:49 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 101 included PR reviews in the past 7 days; at that activity level, included reviews refill at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
Comment |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aSV4sbw6iFqEA7Y7JeVes
…eets-search-regression-8iyvnd # Conflicts: # src/components/factsheets/factsheets-home-page.tsx
Uh oh!
There was an error while loading. Please reload this page.
Summary
/factsheets) hand-rolled its own<main>/composer-slot markup instead of reusingModeHomeMain+ModeHomeTemplate(the pair every other standalone mode home — DSM, Services, Forms, Specifiers, Formulation, Calculators — already uses). Its bespoke slot never applied the SSRdata-composer-reserveattribute those templates set, so instead of the in-flow hero composer, the page fell back to the phone bottom dock (the search bar pinned to the viewport bottom with a+/send-arrow, and a blank gap where the composer should have been).src/components/factsheets/factsheets-home-page.tsxto render throughModeHomeMain+ModeHomeTemplate, matching the minimal shape the universal Answer home (/) uses: hero icon/title/subtitle, the shared in-flow composer, the privacy note, and a governance-disclaimer footer. Only the title, subtitle, icon, and search routing (/factsheets/search) differ from mode to mode — the page itself is now the same shared template./factsheets/searchalready lists every factsheet when no query is submitted and already has its own category-filter UI, so both are still fully reachable — they're just no longer duplicated as a home-page preview.featuredFactsheets(),categoryCount(), andfactsheetCategoryGlyph()(plus their now-unused imports/backing maps) fromfactsheets-data.ts/factsheets-icons.ts— each was used only by the removed home-page markup and had no other caller or test coverage.tests/mode-home-loading-contract.test.tsassertingfactsheets-home-page.tsximports/rendersModeHomeTemplateand no longer referencesDesktopComposerPortalSlotdirectly, so a future edit can't silently reintroduce a hand-rolled composer host.Verification
npm run verify:pr-local— all 10 selected checks passed:check:runtime,check:installed-lock-parity,format:changed,lint,typecheck,test(649 files / 6999 passed, 4 skipped),build,check:rag:fixtures(36 golden cases, 25 suites),check:medication-interactions,check:medication-lexicon-report. Summary line:PR-local verification summary: - completed: check:runtime, check:installed-lock-parity, format:changed, lint, typecheck, test, build, check:rag:fixtures, check:medication-interactions, check:medication-lexicon-report - failed: (none) - not reached: (none).npm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed — not run as the full Chromium gate; instead verified directly with a live Playwright screenshot check at 390×844 against the local dev server (npm run ensure): confirmed/factsheetsnow renders the composer in-flow under the hero (composer-slot host has 1 child, height 106px,data-composer-reservecleared, zero bottom-dock elements present) and structurally matches/dsmand/(Answer) at the same viewport, with no console/page errors on/factsheetsor/factsheets/search.npm run verify:releasebefore release or handoff confidence claims — not run; this is a PR handoff, not a release, and the change carries no provider-backed surface.This PR does not touch retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract behaviour, so
eval:retrieval:quality/eval:rag/eval:qualityare not applicable.Risk and rollout
scripts/pr-policy.mjsclassifies the changed paths as UI, not clinical-risk (no auth/privacy/patient/upload paths touched) and not a RAG-ranking surface.Notes
src/lib/rag/**, clinical-search, retrieval-selection, ranking-config, answer-ranking, the eval harness, or the golden fixture, so noRAG impact:declaration applies.Generated by Claude Code