What Changed#
Key the chat composer's bottom safe-area padding on keyboard visibility (useKeyboardState) instead of editor focus. This matches the convention already used by NewTaskDraftScreen.
Why#
ThreadDetailScreen zeroed composerBottomInset whenever the composer was expanded, assuming an expanded (focused) composer always has the keyboard under it. On Android the back gesture closes the keyboard without blurring the editor, so the composer stayed expanded with zero bottom padding and the toolbar row (+, model picker, send) landed under the gesture navigation bar.
UI Changes#
Tested on a Pixel emulator (API 35, gesture navigation), dev client + Metro, paired to a local backend.
Screenshots#
| Before (expanded, keyboard closed) |
After (expanded, keyboard closed) |
 |
 |
After: keyboard open (composer still rides the keyboard, no gap)
After: collapsed composer (unchanged)
Checklist#
🤖 Generated with Claude Code
Note
Low Risk
Single-screen layout tweak with no auth, data, or API changes; behavior is limited to composer padding on mobile.
Overview
Thread detail chat composer bottom safe-area padding now follows keyboard visibility (useKeyboardState) instead of whether the composer is expanded.
On Android, dismissing the keyboard with the back gesture can leave the editor focused while the keyboard is hidden; tying inset to expansion zeroed bottom padding and pushed the toolbar under the gesture navigation bar. When the keyboard is open, inset stays at zero so the composer still sits flush on the keyboard; when it is closed, normal bottom inset is restored—matching NewTaskDraftScreen.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit becc7d0eff6616225f78f8c9ecd9ab5abdcd897d. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Note
Fix chat composer position above Android gesture bar in ThreadDetailScreen#
The composerBottomInset in ThreadDetailScreen.tsx was previously set to 0 when the composer was expanded, which caused it to overlap the Android gesture bar. It now uses keyboard visibility instead: 0 when the keyboard is visible, Math.max(insets.bottom, 12) otherwise.
Macroscope summarized becc7d0.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
05a2ee7a-3b37-4936-a78a-507c8cf6ae93You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share