Optimise phone touch targets and fix Therapy Compass mobile overflow#736
Conversation
Convergence pass bringing sub-44px interactive controls up to the design system's --spacing-tap floor on phone, and fixing horizontal-overflow clipping in Therapy Compass. No visual redesign; desktop is preserved. Tap targets (phone): - answer suggestion/follow-up chips: 32px -> 44px with an 8px gap under pointer:coarse only (mouse users keep the compact 32px chip) - ClinicalDashboard: Stop, Show/Hide previous answer, Show earlier messages - header/shell: guide close button, workflow icon-cluster gap - services results (bookmark/open/select) + service/form toast dismiss - differentials-home open links, best-answer + urgent rows, empty-state CTAs - favourites hub/library filter chips, dropdowns, sort, Continue CTA - formulation builder + home controls - DocumentViewer hit prev/next, summary + secondary controls (phone 44, desktop 36 via sm:min-h-9), medication + patient-profile buttons Therapy Compass mobile overflow: - stack fixed/minmax multi-column grids to one column under 640px so clipped clinical content (review columns, contraindications) is reachable - make the comparison table scroll horizontally instead of clipping columns - raise nav/tab/segment/chip and remaining controls to the 44px tap floor Verification: typecheck clean; eslint clean on changed files; check:type-scale + check:icon-scale pass; unit suite 2681/2682 (the one failure is a pre-existing Python child-process test unrelated to this diff). Manual Playwright pass at 390x820 confirms 0 horizontal overflow on every route, 44px tap targets, and the Therapy Compass fixes; desktop unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YKNwAjDBUTv5khn64QKwHW
|
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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe PR standardizes mobile tap-target sizing across application controls and adds Therapy Compass phone-specific stacking and horizontal scrolling. Logic, state handling, event handlers, and exported APIs remain unchanged. ChangesMobile responsive UI
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
A touch-optimisation convergence pass for phone. No visual redesign — this closes the gap between the design system's 44px tap contract (
--spacing-tap→min-h-tap/size-tap) and interactive controls that were still 32–40px, and fixes horizontal-overflow that clipped clinical content in Therapy Compass on a phone. Desktop is deliberately preserved throughout.Tap targets raised to the 44px floor on phone:
pointer: coarseonly (mouse users keep the compact 32px chip — no desktop change).min-h-tap sm:min-h-9(phone 44, desktop 36); medication + patient-profile buttons.Therapy Compass mobile overflow (was clipping clinical data):
minmaxmulti-column grids (review queue, recommend rows, 2-column detail/sheets/brief/pathways, result card) now stack to a single column under 640px via a scopedtc-stack-smclass — previously the Index/Review completeness columns and contraindication cells were cut off the right edge with no way to reach them.tc-scroll-sm) instead of clipping the right-hand therapies.Verification
typecheck— clean (nosrc/errors)eslinton all changed files — clean (0 errors)check:type-scale+check:icon-scale(--strict) — pass (no arbitrarytext-[Npx], no retired icon half-steps)pdf-extraction-budget.test.ts, a Python child-process-kill timing test) fails deterministically in isolation and is unrelated to this UI/CSS diff — a pre-existing environment limitation (the Python OCR/worker stack isn't runnable here)Verification not run: npm run verify:pr-local— the repo Playwright/browser gate can't launch a browser in this environment (installed Playwright wants browser build 1228; only 1194 is present), so verify:pr-local's conditional build/UI steps can't complete here.UI verification not run: the same Playwright browser-version mismatch prevents the repo UI gate from launching a browser here.Substituted a manual Playwright pass at 390×820 with the pinned chromium-1194 binary: 0 horizontal overflow on every route, tap targets measured at 44px (e.g. ServiceCard Open/Select; chips 44px underpointer:coarse, 32px underpointer:fine), Therapy Compass overflow fixes confirmed (stacked screens + horizontally-scrollable comparison table), desktop unchanged.Risk and rollout
pointer:coarse-scoped; Therapy Compass responsive rules are@media (max-width:640px)scoped to.tc-root; desktop-compact controls kept viasm:min-h-9).Clinical Governance Preflight
UI-only tap-target sizing and phone layout. No ingestion, answer generation, search/ranking, source-governance, or document-access logic was changed;
DocumentVieweris touched only for control heights/gaps, so source rendering, citations, review-status and outdated/unknown-source behaviour are unchanged.Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
Therapy Compass is a promoted design-export that still uses inline CSS-in-JS; the responsive fixes are added as scoped, phone-only rules in
styles.tsxplus minimal class hooks, so desktop rendering is unchanged. Bringing it fully onto the token system remains separate follow-up work.🤖 Generated with Claude Code
https://claude.ai/code/session_01YKNwAjDBUTv5khn64QKwHW
Summary by CodeRabbit