Skip to content

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

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

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

@xintaofei

Copy link
Copy Markdown
Owner

Thanks for the detailed write-up and the issue — the composer overlap on 1.0.1 was real. It's been fixed on our development branch and will land with the next push/release (#6 will be closed then):

  • The navigation-bar inset is now applied inside the composer itself, so the composer surface runs on under the gesture/3-button bar while the text field and send button stay above it. Adding navigationBarsPadding() on the outer bottom-bar column on top of that would consume the inset first and make the surface stop short of the screen edge.
  • The agent editor lives inside the Settings tab, above the app's own bottom tab bar, so it never sits against the system navigation bar. Its Save bar's existing navigationBarsPadding() was actually surplus (it added blank space above the tab bar) and has been removed.

Closing for those reasons, but much appreciated.

@xintaofei xintaofei closed this Nov 14, 2026
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.

2 participants