From 94f6d9c0d9bb9cf9ffae99d8bbfb09e9bf2fc9e0 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Thu, 3 Sep 2026 02:47:48 +0300 Subject: fix: reveal newly focused spaces in the sidebar (#3554) --- src/client/shell/state.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/client/shell/state.rs') diff --git a/src/client/shell/state.rs b/src/client/shell/state.rs index ffac93da..6b00e6c3 100644 --- a/src/client/shell/state.rs +++ b/src/client/shell/state.rs @@ -880,6 +880,7 @@ pub(crate) struct ClientShellState { pub(super) agent_scroll: usize, pub(super) tab_scroll: usize, pub(super) mobile_switcher_scroll: usize, + pub(super) reveal_focused_workspace: bool, pub(super) reveal_mobile_workspace: bool, pub(super) mobile_switcher_suspended: bool, pub(super) reveal_focused_tab: bool, @@ -1021,6 +1022,7 @@ impl ClientShellState { agent_scroll: 0, tab_scroll: 0, mobile_switcher_scroll: 0, + reveal_focused_workspace: true, reveal_mobile_workspace: false, mobile_switcher_suspended: false, reveal_focused_tab: true, @@ -1242,6 +1244,7 @@ impl ClientShellState { self.agent_scroll = 0; self.tab_scroll = 0; self.mobile_switcher_scroll = 0; + self.reveal_focused_workspace = true; self.reveal_mobile_workspace = false; self.mobile_switcher_suspended = false; self.reveal_focused_tab = true; @@ -1317,6 +1320,14 @@ impl ClientShellState { }) || render::tab_bar_status_width(current) != render::tab_bar_status_width(&snapshot) }); + if self + .snapshot + .as_deref() + .and_then(|current| current.focused_workspace_id.as_deref()) + != snapshot.focused_workspace_id.as_deref() + { + self.reveal_focused_workspace = true; + } if tab_layout_changed || self .snapshot -- cgit v1.2.3