From 43b2a72c96e0abbf93ecfe320e3c08c8a2c90096 Mon Sep 17 00:00:00 2001 From: Bruno Deanoz Date: Sun, 21 Jun 2026 18:55:36 +0200 Subject: [PATCH] fix: attachment menu floats above pills instead of pushing them up Moved AttachmentMenu out of the bottom dock Column into its own floating overlay positioned above the dock with padding(bottom=140dp). Pills and input stay in place, menu hovers over them. --- .../java/dev/kaizen/app/chat/ChatScreen.kt | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt b/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt index fada69f..c0e3bb1 100644 --- a/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt +++ b/app/src/main/java/dev/kaizen/app/chat/ChatScreen.kt @@ -540,17 +540,6 @@ fun ChatScreen( }, ) Spacer(Modifier.height(10.dp)) - androidx.compose.animation.AnimatedVisibility( - visible = showAttachMenu, - enter = androidx.compose.animation.fadeIn() + androidx.compose.animation.slideInVertically { it / 2 }, - exit = androidx.compose.animation.fadeOut() + androidx.compose.animation.slideOutVertically { it / 2 }, - ) { - AttachmentMenu( - onCamera = { showAttachMenu = false; cameraPicker.launch(null) }, - onGallery = { showAttachMenu = false; filePicker.launch("image/*") }, - onFile = { showAttachMenu = false; filePicker.launch("*/*") }, - ) - } ChatInput( value = input, onValueChange = { input = it }, @@ -563,6 +552,23 @@ fun ChatScreen( Spacer(Modifier.height(16.dp)) } + // Attachment menu — floats above the bottom dock + androidx.compose.animation.AnimatedVisibility( + visible = showAttachMenu, + modifier = Modifier + .align(Alignment.BottomCenter) + .padding(bottom = 140.dp) + .then(if (isTablet) Modifier.widthIn(max = 720.dp) else Modifier), + enter = androidx.compose.animation.fadeIn() + androidx.compose.animation.slideInVertically { it / 2 }, + exit = androidx.compose.animation.fadeOut() + androidx.compose.animation.slideOutVertically { it / 2 }, + ) { + AttachmentMenu( + onCamera = { showAttachMenu = false; cameraPicker.launch(null) }, + onGallery = { showAttachMenu = false; filePicker.launch("image/*") }, + onFile = { showAttachMenu = false; filePicker.launch("*/*") }, + ) + } + // Model picker (bottom sheet), opened by the top pill if (showModelSheet) { ModelSheet(