From 3db38a907e3b4c135b874f9e2eb96eb21eb7ce50 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 21:52:03 -0700 Subject: [PATCH] Tab Bar Animation Fix Nucleic-Session: 09F787AF-3A70-4978-8762-9827C1CC0774 Co-authored-by: Nucleic --- .../NucleicRemote/Views/AdaptiveRootView.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift b/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift index eeaab5e..fd005d8 100644 --- a/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift +++ b/NucleicRemote/NucleicRemote/Views/AdaptiveRootView.swift @@ -46,10 +46,13 @@ struct CompactRootView: View { @State private var barHeight: CGFloat = 72 /// The bar owns the bottom edge on the top-level tabs, but yields it to a pushed session's - /// floating glass chat bar (`openSessionID`, set by `SessionDetailView`'s appear/disappear) and - /// to the new-chat composer while it's up (`showNewChat`) — both slide it out, so the composer - /// doesn't just stack on top of a lingering tab bar. - private var showsTabBar: Bool { store.openSessionID == nil && !showNewChat } + /// floating glass chat bar (`compactDetailPresented`, driven by `SessionsView`'s navigation + /// path) and to the new-chat composer while it's up (`showNewChat`) — both slide it out, so the + /// composer doesn't just stack on top of a lingering tab bar. We key off the path rather than + /// `openSessionID` because the path flips the instant a back-swipe begins, whereas + /// `openSessionID` isn't cleared until the detail's `onDisappear` fires at the *end* of the pop + /// transition — which left the bar sliding back up 1–2s late. + private var showsTabBar: Bool { !store.compactDetailPresented && !showNewChat } /// The "+" is inert without control scope or a project to start in, so it's shown only when a /// chat could actually be kicked off (mirrors `NewChatAffordance.canStart`).