Skip to content

fix(ui): size drill screens to the scroll container, not viewport vh (#18) - #26

Merged
tsenoner merged 2 commits into
mainfrom
fix/18-drill-screen-height
Jun 23, 2026
Merged

tsenoner merged 2 commits into
mainfrom
fix/18-drill-screen-height

Conversation

@tsenoner

Copy link
Copy Markdown
Owner

Closes #18. Roadmap item 2/7.

After the inner-scroll shell (#6/#15), .app-main is the scroll container and .screen { flex: 1 0 auto } already grows to fill it. The four drill screens still pinned a viewport vh floor, which over-measures (viewport > .app-main = viewport − header − nav − safe-area) and forces the screen taller than its container — pushing the bottom-pinned answer buttons below the fold on a short viewport.

Change

Swap the vh floors for minHeight="100%" (the SolveScreen prop), exactly as LevelsScreen already ships:

screen before after
QuickDrill 70vh 100%
GuidedSolve 62vh 100%
Speedrun 62vh 100%
DailyChallenge 62vh 100%

base.css's 100dvh on .app-shell is the intentional shell height — left untouched.

Test

New QuickDrill.test.tsx renders the screen and asserts the SolveScreen root carries minHeight: 100% (no vh), guarding against re-introduction.

Severity / verification

Low severity (the PWA pins portrait, where .app-main is always taller than 62–70vh; only reachable in a short desktop/in-browser window). typecheck ✓ · lint --max-warnings 0 ✓ · 291 tests ✓ · build ✓.

🤖 Generated with Claude Code

…18)

After the inner-scroll shell (#6/#15), .app-main is the scroll container and
.screen { flex: 1 0 auto } already fills it — so the viewport-relative vh floors
on the four drill screens over-measured (viewport > .app-main = viewport − header
− nav − safe-area), forcing the screen taller than its container and pushing the
bottom-pinned answer buttons below the fold.

Replace the vh floors with minHeight="100%" (the SolveScreen prop), matching the
pattern LevelsScreen already ships:
- QuickDrill 70vh; GuidedSolve / Speedrun / DailyChallenge 62vh → 100%

Adds a QuickDrill render guard asserting the SolveScreen root carries minHeight
100% (no vh), so the regression can't silently return.

Gates: typecheck, lint, 291 tests, build — all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@vercel

vercel Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daycipher Ready Ready Preview, Comment Jun 23, 2026 11:59am

…ry caller (#18)

After #18, all six SolveScreen call-sites passed minHeight="100%" — the
prop was a constant everywhere, so the vh-vs-container fix belonged in the
shared component, not repeated per screen. Default `minHeight = '100%'`
(optional, still overridable) and remove the literal from all four drill
screens plus the two LevelsScreen runners. A future consumer can no longer
forget the prop and re-introduce the #18 regression.

Replace the per-screen QuickDrill.test.tsx (which asserted a value the
screen merely forwarded, and carried unused IndexedDB-reset boilerplate)
with SolveScreen.test.tsx, guarding the default and the override path at
the source for all consumers.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@tsenoner
tsenoner merged commit 1399127 into main Jun 23, 2026
3 checks passed
@tsenoner
tsenoner deleted the fix/18-drill-screen-height branch June 23, 2026 12:42

This branch was successfully deployed

1 active deployment
Preview — ed566603 Deployed Jun 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drill screens: size to the scroll container, not viewport vh (post inner-scroll layout)

1 participant