From efc1d943608693b1a6a1efcbb8915bf4f1e5a854 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 21:52:12 -0700 Subject: [PATCH] Tab Bar Animation Fix Nucleic-Session: 09F787AF-3A70-4978-8762-9827C1CC0774 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Views/SessionsView.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/SessionsView.swift b/NucleicRemote/NucleicRemote/Views/SessionsView.swift index 5fc3328..45c70ab 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionsView.swift @@ -73,9 +73,18 @@ struct SessionsView: View { path.append(SessionID(rawValue: raw)) } consumeRoute() + // Sync the shell's tab-bar visibility to the current push depth on (re)appear — + // `onChange` alone won't fire for a path restored across a remount. + store.compactDetailPresented = !path.isEmpty } // A notification tap while this tab is already up. .onChange(of: store.pendingRoute) { consumeRoute() } + // Drive the floating tab bar straight off the navigation path: it empties the instant a + // back-swipe/tap begins, so the bar slides back in immediately instead of waiting for + // `SessionDetailView.onDisappear` (which fires only at the end of the pop transition). + .onChange(of: path) { _, newPath in + store.compactDetailPresented = !newPath.isEmpty + } .toolbar { ToolbarItem(placement: .topBarTrailing) { Button {