Skip to content

fix: add navigationBarsPadding to composer / agent editor (bottom nav overlap) - #5

Open
talwayh1 wants to merge 1 commit into
xintaofei:mainfrom
talwayh1:fix/composer-navigation-bar-insets
Open

fix: add navigationBarsPadding to composer / agent editor (bottom nav overlap)#5
talwayh1 wants to merge 1 commit into
xintaofei:mainfrom
talwayh1:fix/composer-navigation-bar-insets

Conversation

@talwayh1

@talwayh1 talwayh1 commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Fixes the prompt composer (and the agent editor) being partially hidden behind the system navigation bar on devices with gesture navigation or 3-button navigation (e.g. Xiaomi MIUI/HyperOS, Samsung, Pixel with gesture mode).

Problem

MainActivity calls enableEdgeToEdge(), so the UI extends behind the system bars. The bottom-anchored input areas only applied imePadding():

Column(Modifier.imePadding()) { ... ComposeBar(...) }

imePadding() only consumes the IME (software keyboard) insets. When the keyboard is dismissed, the navigation bar insets are still present, and the composer sits behind the gesture bar / 3-button nav — the text field and send button are partially covered and hard to tap.

Fix

Chain navigationBarsPadding() after imePadding() on both bottom-anchored containers:

  • SessionDetailScreen — the composer Column in the Scaffold bottomBar
  • AgentDetailScreen — the root editor Column
Column(Modifier.imePadding().navigationBarsPadding()) { ... }

The ordering is safe in both states:

  • Keyboard open: the IME consumes the navigation-bar area, so the navigation-bar insets are 0 and navigationBarsPadding() adds nothing extra.
  • Keyboard closed: imePadding() is 0 and navigationBarsPadding() lifts the composer fully above the navigation bar.

Test plan

  • Reproduced on a Xiaomi device (gesture nav): composer partially covered by the gesture bar before the fix
  • After the fix in a local build: composer sits fully above the navigation bar; typing + send both work
  • CI build passes (changes are 2 lines + 1 import, additive)

Related

Fixes the issue about the composer being covered by the virtual navigation bar.

The app calls enableEdgeToEdge() in MainActivity, so content extends
behind the system bars. The prompt composer on SessionDetailScreen and
the agent editor on AgentDetailScreen only applied imePadding(), which
handles the software keyboard but not the system navigation bar.

On devices with gesture navigation or 3-button nav (e.g. Xiaomi/MIUI),
the bottom composer is partially hidden behind the virtual navigation
bar, making the input field and send button hard to reach.

Fix by chaining navigationBarsPadding() after imePadding() on both
bottom-anchored containers:
- SessionDetailScreen: composer Column in the Scaffold bottomBar
- AgentDetailScreen: root editor Column

Keyboard behavior is preserved: when the IME is open the navigation bar
insets are already consumed by the keyboard, so navigationBarsPadding()
adds nothing extra.
@talwayh1

talwayh1 commented Sep 5, 2026

Copy link
Copy Markdown
Author

Fixes #6

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