You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On edge-to-edge Android, adjustResize no longer moves the composer above the IME. The KeyboardAvoidingView change proposed in #182 improves the layout, but a physical Pixel 11 Pro test still left the input partially covered.
A larger keyboardVerticalOffset can correct the open position, but React Native 0.81.5 handles Android keyboardDidHide as another frame-change event. With a non-zero offset, that leaves stale bottom padding after the IME closes, so the composer does not return to the bottom.
Change
Preserve the existing iOS KeyboardAvoidingView padding behavior and 90 dp offset.
On Android, initialize from Keyboard.metrics(), subscribe to keyboardDidShow / keyboardDidHide, and apply the IME-reported height directly as bottom padding.
Reset Android padding explicitly to zero on hide.
Subscribe before resynchronizing native metrics so an IME transition during route mount cannot be lost.
Add regression coverage for show, hide, invalid metrics, iOS isolation, and the measured Pixel geometry.
The first complete-header-offset build fixed opening but exposed stale padding after keyboard dismissal.
The final APK was installed over the side-by-side test package and verified by the reporter: opening the IME keeps the full composer visible; dismissing it returns the composer to the bottom.
Verification
npm test — 339 passed
npm run typecheck
Keyboard offset tests — 6 passed
Android arm64 release APK build
Physical Pixel 11 Pro open/close cycle
The change is limited to the session keyboard integration and its small pure helper/tests.
Built from v0.4.15 tag + this PR merged, self-signed release APK, server is opencode serve on the same phone via Termux (http://127.0.0.1:4096).
Before: composer fully hidden behind keyboard (issues #194/#156). After: full composer + send button stay visible above the keyboard, typing is readable. It sits flush with no bottom gap, which is fine. Dismissing the keyboard returns the composer cleanly to the bottom, no stuck padding after 3+ open/close cycles.
One build note: npx expo prebuild --clean silently dropped android:usesCleartextTraffic="true" from the manifest even though app.json sets it, so http:// URLs failed instantly in the fresh build until I added a small config plugin forcing the attribute. Might be worth folding into this PR or a follow-up, otherwise clean-prebuild releases will hit it too.
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
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.
Closes #194
Root cause
On edge-to-edge Android,
adjustResizeno longer moves the composer above the IME. TheKeyboardAvoidingViewchange proposed in #182 improves the layout, but a physical Pixel 11 Pro test still left the input partially covered.A larger
keyboardVerticalOffsetcan correct the open position, but React Native 0.81.5 handles AndroidkeyboardDidHideas another frame-change event. With a non-zero offset, that leaves stale bottom padding after the IME closes, so the composer does not return to the bottom.Change
KeyboardAvoidingViewpadding behavior and 90 dp offset.Keyboard.metrics(), subscribe tokeyboardDidShow/keyboardDidHide, and apply the IME-reported height directly as bottom padding.Physical-device verification
Pixel 11 Pro, Android 17:
Verification
npm test— 339 passednpm run typecheckThe change is limited to the session keyboard integration and its small pure helper/tests.