From 2c3d0576418e986a890afa5004ed4d8b6ba5ea02 Mon Sep 17 00:00:00 2001 From: Bruno Deanoz Date: Thu, 18 Jun 2026 17:03:55 +0200 Subject: [PATCH] fix(ui): dynamically shrink EmptyHero bottom spacer on keyboard open to keep greeting visible --- app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt b/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt index 061f454..75ee18c 100644 --- a/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt +++ b/app/src/main/java/dev/kaizen/app/chat/ChatComponents.kt @@ -162,7 +162,12 @@ fun EmptyHero(userName: String, onPick: (String) -> Unit, modifier: Modifier = M SuggestionPills(onPick) } - Spacer(Modifier.height(142.dp)) // Clear the floating bottom dock + // Dynamically shrink the bottom spacer when the keyboard is open. + // This ensures the remaining elements fit perfectly into the space above the keyboard + // without causing the column to exceed the screen height and trigger an automatic scroll. + // As a result, the greeting remains perfectly stationary and visible while typing! + val bottomSpacerHeight = if (isKeyboardOpen) 72.dp else 142.dp + Spacer(Modifier.height(bottomSpacerHeight)) } }