test(mobile): guard phone answer layout against phantom scroll#567
Conversation
Follow-up regression coverage for the merged phone answer-view fix (#563). Adds two Chromium tests to tests/ui-smoke.spec.ts, reusing the existing mockDemoApi/answerOverride and dock-geometry helpers: - short answer stays content-sized and top-aligned with no phantom scroll into the near-black shell (main scrollHeight === clientHeight); - long answer stays scrollable and top-aligned, with the opaque composer input clear of the scroll viewport. Verified the short-answer test fails if the viewport-height floor is reintroduced, so it genuinely guards the fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1ekcXQZVFVKKzdoVpjyVQ
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdded phone UI smoke tests covering answer-surface sizing and alignment for short answers, scrolling and composer clearance for long answers, and horizontal overflow in both cases. ChangesPhone answer layout
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Summary
tests/ui-smoke.spec.ts, reusing the existingmockDemoApi/answerOverrideand dock-geometry helpers (no new infra):#main-contentscrollHeight === clientHeight);scrollHeight − clientHeightjumps from 0 to ~25px), so it genuinely guards the fix rather than passing vacuously.Verification
npm run typecheckandnpm run lint(tests/ui-smoke.spec.ts) — pass.npm run check:runtime(part ofverify:ui) — pass.tests/ui-smoke.spec.tsin Chromium → 68 passed. The only failures (4) are the pre-existing, unrelatedprivacy warnings and links are available before clinical inputtest (it navigates to/privacyand can't find its<h1>in this local dev environment); that test is untouched by this PR. CI runs the UI suite with the full setup.npm run verify:uias-is needsPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATHpointed at the pre-installed browser in this sandbox (the bundled Playwright expects a browser build that isn't downloaded here); CI has the matching browser.Clinical Governance Preflight
N/A — test-only change. It does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.
Notes
Generated by Claude Code