From 74505861e40c48e070e711bd4de662a17b0939b3 Mon Sep 17 00:00:00 2001 From: Eric Yue Date: Sun, 20 Sep 2026 22:33:50 +0800 Subject: fix: keep workspace navigation visible in terminal theme (#4408) * fix: keep workspace navigation visible in terminal theme refs #4300 * fix: clear workspace highlight on directional pane focus refs #4300 --------- Co-authored-by: JJ Liebig --- src/client/shell/composition.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/client/shell/composition.rs') diff --git a/src/client/shell/composition.rs b/src/client/shell/composition.rs index 10dc6633..4da21e77 100644 --- a/src/client/shell/composition.rs +++ b/src/client/shell/composition.rs @@ -40,6 +40,12 @@ impl ClientShellState { .navigate_workspace_id .as_ref() .is_some_and(|target| self.navigation_target_valid(target)); + let pending_workspace_highlight = + self.pending_workspace_highlight.as_ref().filter(|pending| { + self.mode != ClientShellMode::Navigate + && pending.target.endpoint_id == self.active_endpoint_id + && self.navigation_target_valid(&pending.target) + }); // A resize invalidates pane geometry, not the healthy Local workspace chrome. let local_snapshot = self.snapshot.as_deref().filter(|_| { self.endpoints.len() == 1 @@ -65,7 +71,8 @@ impl ClientShellState { selected_workspace_id: self .navigate_workspace_id .as_ref() - .filter(|_| valid_navigation_target), + .filter(|_| valid_navigation_target) + .or_else(|| pending_workspace_highlight.map(|pending| &pending.target)), reveal_navigation_workspace: &mut self.reveal_navigation_workspace, dragged_workspace_id: None, workspace_drop_indicator_row: None, @@ -143,6 +150,12 @@ impl ClientShellState { .navigate_workspace_id .as_ref() .is_some_and(|target| self.navigation_target_valid(target)); + let pending_workspace_highlight = + self.pending_workspace_highlight.as_ref().filter(|pending| { + self.mode != ClientShellMode::Navigate + && pending.target.endpoint_id == self.active_endpoint_id + && self.navigation_target_valid(&pending.target) + }); if self.snapshot.is_none() || self.pane_surface.is_none() { return Some(self.compose_unavailable(cols, rows)); } @@ -200,7 +213,8 @@ impl ClientShellState { selected_workspace_id: self .navigate_workspace_id .as_ref() - .filter(|_| valid_navigation_target), + .filter(|_| valid_navigation_target) + .or_else(|| pending_workspace_highlight.map(|pending| &pending.target)), reveal_navigation_workspace: &mut self.reveal_navigation_workspace, dragged_workspace_id, workspace_drop_indicator_row, -- cgit v1.2.3