fix(document-viewer): keep a small resting pad at the true scroll bottom on phones - #2042
Conversation
DocumentViewer's phone content padding snapped straight to 0 once the floating search pill auto-hid on scroll-down, so the last card in the document painted flush against the physical bottom edge with no breathing room. Keep a small 0.75rem gap instead — the same figure the pill itself already uses for its own floating clearance — and update the two contract tests that pinned the old zero-padding literal/threshold. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BFweh9gxrV11tS2QZ9sobp
…pad fix Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BFweh9gxrV11tS2QZ9sobp
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #11435 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:54 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 98 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 (4)
Comment |
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. |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 36221231 | Triggered | Generic High Entropy Secret | d5aed78 | tests/rag-adversarial-fixtures.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
check:design-system-contract flagged the new max-sm:pb-[0.75rem] arbitrary value as a raw padding literal regression. Tailwind's default spacing scale already has 3 = 0.75rem, so pb-3 gives the identical 12px resting pad without a bracketed literal. Updates the matching test assertion.
BigSimmo
commented
Aug 17, 2026
GitGuardian: "1 secret uncovered" — investigationInvestigated locally (no GitGuardian dashboard access from this session, so I can't see the exact match):
So the finding doesn't correspond to anything this PR's diff introduces. It's most likely either a false positive, or something already present somewhere in Not pushing anything further to this branch while auto-merge is armed, per this repo's PR-mutation policy. Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Summary
DocumentViewer's content padding snapped straight to0once the floating "Search within this document" pill auto-hid on scroll-down, so the last card in the document painted flush against the physical bottom edge with zero breathing room at the true end of scroll (reported live on an installed iPhone PWA — the last card, e.g. "Tables and diagrams"/"Indexing details", sat with no clearance and felt stuck/cut off).src/components/DocumentViewer.tsx: keep a small0.75rem(12px) resting gap once the composer hides, instead of0— the same figure the pill itself already uses for its own floating clearance (.floating-composer-edge), so it's consistent rather than an arbitrary new number. Also updateddata-phone-composer-reserve(diagnostic attribute) and addeddata-reserve-hidden-pad="0.75rem"so the existing hide/reveal collapse-budget math (readChromeCollapseMetricsinuse-hide-on-scroll.ts) correctly treats this small pad as already-released rather than still-available runway.tests/clinical-dashboard-merge-artifacts.test.tsandtests/ui-phone-scroll-page-owned.spec.ts: updated the two existing contract assertions that pinned the old0/"max-sm:pb-0"literal, so they now assert the new deliberate 12px baseline instead of going stale.This does not change the shared shell's "zero reserve when hidden" architecture (
mobile-composer-reserve.ts, used byGlobalSearchShell/ClinicalDashboard) — that mechanism and its own tests are untouched. This is scoped only toDocumentViewer's own, separately-authored content padding.Verification
display-mode: standalonePWA rendering) to the true scroll bottom of a document. Before the fix, the last card sat with a measured0pxgap from the viewport edge; after the fix, it's12px(0.75rem), confirmed both numerically (getComputedStyle(...).paddingBottom) and via screenshot.vitestruns covering every test file that referencesDocumentVieweror the phone scroll-hide mechanism (use-hide-on-scroll.test.ts,clinical-dashboard-merge-artifacts.test.ts,ui-overlay-css-contract.test.ts,header-scroll-hide-contract.test.ts,mobile-composer-reserve.test.ts,dashboard-scroll-padding.test.ts, plus 17 moredocument-*/mode-nav-*files) — 278 tests, all passing.npx tsc --noEmitandnpx eslinton the two changed source/test files — clean.npx prettier --checkon the changed files — already formatted.npm run verify:pr-local— not run: this sandbox's installed Playwright Chromium build (chromium-1194) doesn't match the version this repo's config expects (chromium-headless-shell-1234), a pre-existing environment limitation unrelated to this change (matches the documented#255drift). Recommend running the standard PR Playwright/verify:uipass in CI before merge.docs/phone-chrome-physical-acceptance.md, Chromium evidence cannot close this gap — please confirm live on the reporting device before/while merging.Risk and rollout
/documents/[id]and friends) and is easily reverted; it does not touch retrieval, answer generation, auth, or the shared cross-app composer-reserve architecture.Notes
/issuesentry.Generated by Claude Code