Skip to content

Conversation

@gbasin
Copy link
Owner

@gbasin gbasin commented Jan 20, 2026

Summary

  • Improve visual viewport tracking for iOS keyboard appearance/disappearance
  • Add CSS variables for viewport offset and dimensions (--viewport-offset-top, --viewport-offset-left, --visual-viewport-height, --visual-viewport-width)
  • Switch mobile overlay from position: fixed with bottom to height-based layout for better iOS PWA compatibility
  • Enhance isKeyboardVisible detection in Terminal to handle edge cases
  • Replace always-on iOS polling with extended RAF burst (1500ms) during focus changes
  • Remove debug UI that was added during development

Test plan

  • Test on iOS Safari: tap keyboard button, verify keyboard appears and layout adjusts smoothly
  • Test on iOS PWA (home screen app): verify same behavior
  • Test keyboard dismiss: tap outside or use keyboard button to hide
  • Test orientation change on iOS
  • Verify no regression on Android/desktop

🤖 Generated with Claude Code

gbasin and others added 4 commits January 20, 2026 13:13
Introduces a DebugOverlay component for UI debugging, activated via the 'debug-ui' query param. Improves visual viewport and keyboard inset handling by tracking additional metrics (offsets, viewport size), updating related CSS variables, and refining polling and event logic in useVisualViewport. Updates tests and styles to support new debug and viewport features, and improves keyboard visibility detection in Terminal.
Refines keyboard visibility logic by using isKeyboardVisible in Terminal and updates keyboard height calculation to consider document height. Adds orientation change handling in useVisualViewport and updates related tests. Also sets position and z-index for terminal controls in CSS.
Replace the constant 250ms basePollTimer on iOS with a longer RAF burst
duration (800ms → 1500ms) during focus/orientation changes. This should
still catch keyboard animations while reducing unnecessary polling when
the keyboard is hidden.

Remaining update mechanisms:
- RAF burst (1500ms) on focus/orientation change
- pollTimer (250ms) while text input is focused
- Event listeners for resize, scroll, focus changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gbasin gbasin merged commit 20b7697 into master Jan 20, 2026
1 check passed
@gbasin gbasin deleted the fix/mobile-quick-keys branch January 20, 2026 20:27
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.

2 participants