Skip to content

[Parity][Android] Hide bottom nav bar when command palette is open #718

Description

@yuga-hashimoto

Parity Gap

Upstream source: `openclaw/openclaw`

  • Commit: `e5e6cf04` — `fix(android): hide nav under command palette` (2026-06-03)
  • Files changed:
    • `apps/android/app/src/main/java/ai/openclaw/app/ui/ShellScreen.kt`
    • `apps/android/app/src/test/java/ai/openclaw/app/ui/ShellScreenLogicTest.kt`

Related existing issue: #708 (Add tabbed home ShellScreen) — this fix must be applied when implementing ShellScreen

Current app: `yuga-hashimoto/openclaw-assistant`


Problem Summary

When the shell's command palette is open, upstream hides the bottom navigation bar. Before this fix, the bottom nav was only hidden when the software keyboard was visible. Showing the bottom nav while the command palette overlay is active causes a visual conflict and wastes screen space.

Upstream extracted the visibility logic into a named function `shellBottomNavVisible(keyboardVisible, commandOpen)` and added a unit test to verify both conditions independently.


Exact Upstream Evidence

1) New helper function in `ShellScreen.kt`

internal fun shellBottomNavVisible(keyboardVisible: Boolean, commandOpen: Boolean): Boolean =
  !keyboardVisible && !commandOpen

2) Usage in `ShellScreen` composable

Before:

val keyboardVisible = WindowInsets.ime.getBottom(density) > 0
// ...
bottomBar = {
  if (!keyboardVisible) {
    ClawBottomNav(...)
  }
}

After:

val keyboardVisible = WindowInsets.ime.getBottom(density) > 0
val showBottomNav = shellBottomNavVisible(keyboardVisible = keyboardVisible, commandOpen = commandOpen)
// ...
bottomBar = {
  if (showBottomNav) {
    ClawBottomNav(...)
  }
}

3) Unit test added — `ShellScreenLogicTest.kt`

@Test
fun bottomNavHidesForKeyboardAndCommandPalette() {
  assertTrue(shellBottomNavVisible(keyboardVisible = false, commandOpen = false))
  assertFalse(shellBottomNavVisible(keyboardVisible = true, commandOpen = false))
  assertFalse(shellBottomNavVisible(keyboardVisible = false, commandOpen = true))
}

Target Files in openclaw-assistant

File Action
`app/src/main/java/com/openclaw/assistant/ui/ShellScreen.kt` Create / update as part of #708 — include `shellBottomNavVisible()` helper and use it in the bottom bar condition
`app/src/test/java/com/openclaw/assistant/ui/ShellScreenLogicTest.kt` Create — add `bottomNavHidesForKeyboardAndCommandPalette()` test

Implementation Checklist

  • Extract bottom-nav visibility into a named `internal fun shellBottomNavVisible(keyboardVisible: Boolean, commandOpen: Boolean): Boolean`
  • Return `!keyboardVisible && !commandOpen` (both conditions must be false for nav to show)
  • In `ShellScreen` composable, compute `showBottomNav` from this function and use it as the `bottomBar` condition
  • Add `ShellScreenLogicTest.kt` with a unit test covering all three input combinations (both false → true; keyboard true → false; commandOpen true → false)

Acceptance Criteria

  • Bottom nav is visible when keyboard is hidden and command palette is closed
  • Bottom nav is hidden when the software keyboard is up (existing behavior preserved)
  • Bottom nav is hidden when the command palette is open — this is the new condition
  • Unit test `bottomNavHidesForKeyboardAndCommandPalette` passes

Test Steps

  1. Open the app and navigate to the shell home screen
  2. Open the command palette (e.g., tap the command button or swipe/gesture)
  3. Confirm the bottom navigation bar disappears while the command palette is visible
  4. Close the command palette — confirm the bottom nav reappears
  5. Open the software keyboard in a text field — confirm the bottom nav also hides
  6. Run `ShellScreenLogicTest` — all assertions pass

Implementation note: Apply this fix as part of #708 (ShellScreen implementation). The helper function `shellBottomNavVisible` must be `internal` so the test class can access it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions