fix(android): new session bottom sheet follows IME keyboard#1366
Open
Savlgoodman wants to merge 1 commit into
Open
fix(android): new session bottom sheet follows IME keyboard#1366Savlgoodman wants to merge 1 commit into
Savlgoodman wants to merge 1 commit into
Conversation
PathPicker and PickerContent now track IME height via useReanimatedKeyboardAnimation
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.
Problem
On Android, when creating a new session and tapping the project/path or worktree row, a bottom sheet opens with a
TextInput. The auto-focused text field triggers the software keyboard, but the bottom sheet (rendered insideRNModal) stays anchored to the physical screen bottom — the keyboard covers the input field, the Done button, and the lower portion of the picker list. The screen-levelKeyboardAvoidingViewcannot help becauseRNModallives in a separate native surface.Fix
Make the Android branch of
BottomSheetkeyboard-aware by leveraginguseReanimatedKeyboardAnimationfromreact-native-keyboard-controller(already a project dependency, already used inAgentContentView.ios.tsxandPlaceholderContainerView.tsx).Animated.Valuewith ReanimateduseSharedValuefor the sheet slide transformuseReanimatedKeyboardAnimationand combine it with the sheet's open/close translateY viauseAnimatedStyleAnimated.spring(which caused a bouncy open animation that blocked input) withwithTiming(200ms)for a smooth, responsive transitionNo changes to iOS (
presentationStyle="formSheet"handles this natively) or Web (uses inline popover).Before:


*worktree
(picker stays visible)
After:

Files changed
packages/happy-app/sources/app/(app)/new/index.tsx— AndroidBottomSheetcomponent