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/actions.rs | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/client/shell/actions.rs') diff --git a/src/client/shell/actions.rs b/src/client/shell/actions.rs index 31408457..119988f6 100644 --- a/src/client/shell/actions.rs +++ b/src/client/shell/actions.rs @@ -13,12 +13,27 @@ impl ClientShellState { crate::input::KeybindMatch::Action(crate::input::KeybindAction::ToggleSidebar) => { self.sidebar_collapsed = !self.sidebar_collapsed; self.sidebar_collapsed_manual = true; + self.reveal_navigation_workspace = true; self.invalidate_pane_surface(); outcome.repaint = true; outcome.resize = true; self.persist_chrome_preferences(outcome); } crate::input::KeybindMatch::Action(action) => { + if self.workspace_preview_action_blocked() + && matches!( + action, + crate::input::KeybindAction::RenameWorkspace + | crate::input::KeybindAction::CloseWorkspace + ) + { + self.receive_endpoint_unavailable( + "Select an available workspace and press Enter before renaming or closing it" + .into(), + ); + outcome.repaint = true; + return; + } if matches!( action, crate::input::KeybindAction::NewWorktree @@ -129,10 +144,8 @@ impl ClientShellState { self.mobile_switcher_scroll = 0; self.reveal_mobile_workspace = false; 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; } @@ -337,7 +350,7 @@ impl ClientShellState { self.push_endpoint_method_with_kind(method, PendingEndpointKind::Generic, outcome); } - fn push_endpoint_notice( + pub(super) fn push_endpoint_notice( &mut self, kind: ClientEndpointNoticeKind, code: impl Into, -- cgit v1.2.3