fix(ui): keep the mobile search composer in the hero on mode landing pages#1027
Conversation
…pages Standalone mode landing pages (Forms, Services, DSM, Formulation, Specifiers, Factsheets, Differentials, Favourites, Tools, Therapy-compass) docked the search composer to the bottom of the phone viewport and hid it on scroll, while the answer home kept its in-flow "hero pill" in the middle of the page. PR #964 introduced that split via heroComposerBreakpoint="sm-up"; this restores the pre-#964 behaviour so every mode landing page keeps the in-flow hero pill on phones, matching the home page. - global-search-shell: heroComposerBreakpoint "sm-up" -> "all" so the phone composer portals into the in-flow hero slot at every width. - mobile-composer-reserve: standalone mode homes reserve the idle content pad instead of dock clearance, so no empty band opens under the pill. - The APP-5 privacy notice now rides the hero pill on phone mode homes too (as it already does on desktop and did before #964). - Update ui-tools / mobile-composer-reserve / ui-phone-scroll tests that encoded the docked behaviour. Phone-only (<640px); desktop and tablet already used the hero. The in-dashboard mode states (/?mode=documents, /?mode=prescribing) are search workspaces, not landing pages, and are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E4xB2fbeBWAWWBLCB3PJ4w
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughStandalone mode homes now keep the global search composer in-flow within the hero at all widths, including phones. Mobile reserve logic uses only idle content padding, while UI and unit tests verify the absence of a bottom dock and command dropdown. ChangesStandalone mobile composer behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
heroComposerBreakpoint="sm-up"on the standalone search shell (before feat(ui): compact bottom search dock on phones everywhere except the home hero #964 all mode homes kept the in‑flow pill on phones). This restores the pre‑feat(ui): compact bottom search dock on phones everywhere except the home hero #964 behaviour so every mode landing page keeps the in‑flow hero pill on phones, matching the home page.src/components/clinical-dashboard/global-search-shell.tsx:heroComposerBreakpoint"sm-up"→"all"so the phone composer portals into the in‑flow hero slot at every width.src/components/clinical-dashboard/mobile-composer-reserve.ts: standalone mode homes reserve the idle content pad instead of dock clearance, so no empty band opens under the pill.<640px); desktop and tablet already used the hero at both prop values. The in‑dashboard mode states (/?mode=documents,/?mode=prescribing) are the documents‑search / prescribing workspaces, not landing pages, and are unchanged.Verification
npm run lint+npm run typecheck— passnpm run test(vitest) — 3028 passed. The only failure is the pre‑existingtests/pdf-extraction-budget.test.ts(Python child‑tree deadline), which fails identically on cleanmain(this VM has no Python OCR stack) and is unrelated to this diff.npm run verify:ui(focused) — the affected Chromium specstests/ui-tools.spec.ts+tests/ui-phone-scroll.spec.tspass 12/12 (hero pill on all standalone mode homes incl. the visible privacy notice,@criticalcomposer presence, tablet hero, results dock unchanged, phone‑scroll geometry stable).npm run verify:release— not run (release‑only).npm run check:production-readiness— not run: UI‑only composer placement. The only governance‑adjacent effect is the APP‑5 privacy notice becoming more visible on phone mode homes; no privacy/env/Supabase/governance logic changed.Risk and rollout
<640px) layout change to search‑composer placement on mode landing pages; desktop/tablet unchanged; no data, auth, or retrieval logic touched.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy) (unchanged)Notes
heroComposerBreakpoint="sm-up"value is now unused (the prop default is already"all"); the prop and its branch are left in place. Removing the dead path is optional follow‑up cleanup.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit