From 68ae6adea0add496cea227030c94e5d3172f4e86 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Wed, 16 Sep 2026 15:29:45 +0300 Subject: fix: let local agent clicks cancel remote handoffs (#4236) refs #3903 --- src/client/shell/endpoint_navigation.rs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/client/shell/endpoint_navigation.rs') diff --git a/src/client/shell/endpoint_navigation.rs b/src/client/shell/endpoint_navigation.rs index 542bf3f9..6cb8c2c4 100644 --- a/src/client/shell/endpoint_navigation.rs +++ b/src/client/shell/endpoint_navigation.rs @@ -92,21 +92,11 @@ impl ClientShellState { else { return false; }; - if !self.endpoint_is_online(&endpoint_id) { - let label = self.endpoint_label(&endpoint_id).to_owned(); - self.receive_endpoint_unavailable(format!("{label} is reconnecting")); - outcome.repaint = true; - } else if endpoint_id == self.active_endpoint_id { - self.push_endpoint_method( - crate::api::schema::Method::PaneFocus(crate::api::schema::PaneTarget { pane_id }), - outcome, - ); - } else { - outcome.actions.push(ClientShellAction::ActivateEndpoint { - endpoint_id, - target: Some(ClientEndpointFocusTarget::Pane(pane_id)), - }); - } + self.focus_or_activate( + endpoint_id, + ClientEndpointFocusTarget::Pane(pane_id), + outcome, + ); true } -- cgit v1.2.3