Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): keep chat composer above the Android gesture bar #5988

MergedPollyGlot(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5988/headmerged by maria-rcks View on GitHub

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)
before: toolbar under the gesture bar after: toolbar clears the gesture bar
After: keyboard open (composer still rides the keyboard, no gap)
After: collapsed composer (unchanged)

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes

🤖 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.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 05a2ee7a-3b37-4936-a78a-507c8cf6ae93

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Approved becc7d0

      Straightforward Android bug fix that changes the condition for bottom safe area padding from focus state to keyboard visibility state. The change is small, well-commented, uses an existing library hook, and has no broader runtime implications beyond fixing the toolbar positioning edge case.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. maria-rcks merged thise5c82d7

    5. maria-rcks closed this

Sign in to join this conversation.