From 7de2773613447df5524122ab6040c2c17dde01fc Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Sun, 25 Oct 2026 20:45:50 -0400 Subject: [PATCH] fix(search): bring the tab bar back after a predictive back from Search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A predictive back from Search left Chat without its tab bar. When Search left without closing through the morph, its DisposableEffect reset the morph with a launch on Search's own rememberCoroutineScope. That scope is cancelled as the entry leaves composition, so the reset never ran and SearchMorph.fraction stayed where the gesture left it, keeping the bar's pill and search button hidden. Launch the reset on rootScope, which ✕ already uses for its shrink. --- .../main/kotlin/com/flipcash/app/internal/ui/SearchMorph.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/ui/SearchMorph.kt b/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/ui/SearchMorph.kt index 59a87466d5..ad1f3528b9 100644 --- a/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/ui/SearchMorph.kt +++ b/apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/ui/SearchMorph.kt @@ -147,8 +147,10 @@ internal class SearchMorph(private val navigator: CodeNavigator) { onDispose { // Gone without closing through the morph (a back that committed): the button comes // back. A chat pushed over Search keeps Search in the stack, and the field up. + // On the root scope: the entry's own is cancelled as the entry leaves, before a + // launch on it could run, which left the bar's chrome hidden after a predictive back. if (!closing && navigator.backStack.none { it is AppRoute.Messaging.Search }) { - scope?.launch { fraction.snapTo(0f) } + rootScope?.launch { fraction.snapTo(0f) } } } }