From b9ce96869e89937278d673d70ae4c135dd318469 Mon Sep 17 00:00:00 2001 From: akbash Date: Wed, 9 Sep 2026 02:35:31 +0300 Subject: feat: navigate and highlight workspaces across machines (#3755) * fix: highlight workspace navigation with saved machines refs #3754 * feat: navigate workspaces across connected machines refs #3754 * feat: navigate workspaces across machines refs #3754 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: Ogulcan Celik --- src/client/shell/overlay_input.rs | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/client/shell/overlay_input.rs') diff --git a/src/client/shell/overlay_input.rs b/src/client/shell/overlay_input.rs index db089f4e..42e331af 100644 --- a/src/client/shell/overlay_input.rs +++ b/src/client/shell/overlay_input.rs @@ -313,11 +313,18 @@ impl ClientShellState { } pub(super) fn workspace_action_id(&self) -> Option { - self.navigate_workspace_id.clone().or_else(|| { - self.snapshot - .as_deref() - .and_then(|snapshot| snapshot.focused_workspace_id.clone()) - }) + self.navigate_workspace_id + .as_ref() + .filter(|target| { + target.endpoint_id == self.active_endpoint_id + && self.navigation_target_valid(target) + }) + .map(|target| target.workspace_id.clone()) + .or_else(|| { + self.snapshot + .as_deref() + .and_then(|snapshot| snapshot.focused_workspace_id.clone()) + }) } pub(super) fn open_new_workspace_overlay(&mut self) { @@ -913,10 +920,8 @@ impl ClientShellState { } else if key.code == KeyCode::Esc { self.overlay = None; self.mode = ClientShellMode::Navigate; - self.navigate_workspace_id = self - .snapshot - .as_deref() - .and_then(|snapshot| snapshot.focused_workspace_id.clone()); + self.navigate_workspace_id = self.focused_navigation_target(); + self.reveal_navigation_workspace = true; outcome.repaint = true; } return; -- cgit v1.2.3