Repository navigation
Keep the composer above the iOS keyboard in wide layouts - #6492
Merged
Merged
Conversation
The visual-viewport shell hook only ran in the compact layout, so wide touch layouts (unfolded iPhone Duo, iPad landscape) kept a full-height shell when the on-screen keyboard opened. iOS then either panned the page (pushing the header off screen) or left the composer behind the keyboard. Run the hook at every width; it is a no-op wherever the layout viewport already matches the visual viewport. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
A Discord TestFlight report on an unfolded iPhone Duo showed the on-screen keyboard covering the composer.
useMobileVisualViewportHeightresizes the app shell to the visual viewport while the iOS keyboard is open, butAppLayoutonly enabled it in the compact layout. Wide touch layouts (an unfolded iPhone Duo, iPad landscape) get the desktop layout, so the shell kept its full height when the keyboard opened. Depending on the device, iOS then scrolled the whole page up and pushed the thread header off screen (bb iOS app on iPad), scrolled too little so the composer toolbar stayed behind the keyboard (iPad Safari), or did not scroll at all (the reporter's Duo). The compact-only gate dates from when phone width was the only iOS touch case.What changed
apps/app/src/components/layout/useMobileVisualViewportHeight.ts: removed theenabledparameter, so the hook runs at every width. It already clears its override whenever the layout viewport matches the visual viewport, so desktop browsers, Electron and Android (interactive-widget=resizes-content) get no shell override.apps/app/src/components/layout/AppLayout.tsx: no longer passesisCompactViewport.useMobileVisualViewportHeight.test.tsx: dropped theenabledprop. The "disabled clears overrides" check now checks that unmounting clears them.How you verified
pnpm start:worktreeinstance, in both the bb iOS app and Safari. There is no iPhone Duo simulator on Xcode 26.6.--bb-shell-heightstays unset.pnpm exec turbo run typecheck lint --filter=@bb/apppasses.pnpm exec turbo run test --filter=@bb/app -- src/components/layout/ src/components/promptbox/FollowUpPromptBox: 17 files, 166 tests pass.🤖 Generated with Claude Code