Fix exercise question card headspace - #237
Conversation
📝 WalkthroughWalkthroughThe learning session screen now uses keyboard-aware viewport tracking and shared geometry helpers to center and size question content responsively. Header and action-row styling accept runtime overrides, and layout behavior is covered by tests. ChangesResponsive learning session layout
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Thanks, but it doesnt make sense to merge it, because I am currently refactoring the learnflow and also the UI of the learncards. But we can stay in touch and can discuss it. |


Summary
Root cause
Removing the original fixed top margin eliminated the excessive headspace, but it left the card positioned directly after the header. The approved Figma frames instead constrain the card to the vertical center of the full screen. The final implementation derives a symmetric center region from the live viewport and keeps the header, card, and action widths aligned responsively.
Verification
pnpm test— 27 files, 128 tests passedpnpm format:checkpnpm typecheckpnpm lintx=2→x=4selection change; no onboarding or unrelated screenBefore — reported issue
The original issue screenshot shows the excessive blank space above the exercise question card.
Source: DAY-166 / GitHub issue #218
After — final visual evidence
iPhone 17
iPhone 13 mini
Interaction recording
day166-centered-interaction.mp4
Design references
#218
Closes #218