Skip to content

fix(mobile): restore chat height after keyboard dismiss - #699

Open
cha1latte wants to merge 3 commits into
codedogQBY:mainfrom
cha1latte:fix/android-chat-dismiss-layout
Open

fix(mobile): restore chat height after keyboard dismiss#699
cha1latte wants to merge 3 commits into
codedogQBY:mainfrom
cha1latte:fix/android-chat-dismiss-layout

Conversation

@cha1latte

@cha1latte cha1latte commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use react-native-keyboard-controller padding behavior in both Android chat screens
  • keep the existing animated keyboard-opening path and vertical offset
  • add a regression contract that rejects the stale height behavior

Root cause

The controller's height behavior writes animated { height, flex: 0 } while the keyboard is open, then returns {} when closed. Reanimated can retain those native properties and leave the chat wrapper keyboard-shortened after dismissal.

An explicit undefined reset was also rejected by real Pixel testing because it cleared the wrapper's static flex: 1. Padding behavior avoids both failure modes: it never writes height/flex and closes to an explicit numeric paddingBottom: 0.

Verification

  • reproduced on Pixel 9a with a 965 px lower dead area
  • device-tested and rejected the first reset attempt before this correction
  • official-main Expo suite: 15 passed
  • focused regression: 3 passed
  • Expo TypeScript and scoped Biome checks
  • git diff --check
  • independent review: no Critical or Important findings
  • installed the corrected preview APK in place on a Pixel 9a and exercised the full closed -> open -> dismissed keyboard cycle
  • before/dismissed screenshots were byte-identical, and the composer returned from [34,1218][1046,1340] open to [34,2120][1046,2242] dismissed

The aggregate PR diff is three focused files: both chat screens and the regression test.

@cha1latte
cha1latte marked this pull request as draft August 19, 2026 00:35
@cha1latte
cha1latte marked this pull request as ready for review August 19, 2026 01:33
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.

1 participant