aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/state.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-03 02:47:48 +0300
committerGitHub <noreply@github.com>2026-09-03 02:47:48 +0300
commit94f6d9c0d9bb9cf9ffae99d8bbfb09e9bf2fc9e0 (patch)
treee4dfc7ea631cbb872ffc59a7ca0270a8fe000d7d /src/client/shell/state.rs
parent2ae8b91ca5919c26df7ce779b0e9a5dd98b769ae (diff)
fix: reveal newly focused spaces in the sidebar (#3554)
Diffstat (limited to 'src/client/shell/state.rs')
-rw-r--r--src/client/shell/state.rs11
1 files changed, 11 insertions, 0 deletions
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