From 028780cebccc135d67a9ff97fbb0b11a150608de Mon Sep 17 00:00:00 2001 From: Can Celik Date: Fri, 18 Sep 2026 21:50:26 +0300 Subject: fix: reveal selected agent when cycling the sidebar (#4355) * fix: reveal selected agent when cycling the sidebar * fix: reveal agent after endpoint activation --- src/client/shell/endpoint_navigation.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 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 6cb8c2c4..c15fd434 100644 --- a/src/client/shell/endpoint_navigation.rs +++ b/src/client/shell/endpoint_navigation.rs @@ -203,11 +203,23 @@ impl ClientShellState { _ => unreachable!("endpoint agent navigation"), }; let target = &agents[next]; - self.focus_or_activate( + if self.focus_or_activate( target.endpoint_id.clone(), ClientEndpointFocusTarget::Pane(target.pane_id.clone()), outcome, - ); + ) { + if target.endpoint_id == self.active_endpoint_id { + self.reveal_endpoint_agent( + &target.endpoint_id, + &target.pane_id, + self.hits.agent_body.height, + ); + } else { + self.pending_agent_reveal = + Some((target.endpoint_id.clone(), target.pane_id.clone())); + } + outcome.repaint = true; + } return true; } false @@ -218,6 +230,7 @@ impl ClientShellState { endpoint_id: ClientEndpointId, outcome: &mut ClientShellInput, ) -> bool { + self.pending_agent_reveal = None; let online = self.endpoint_is_online(&endpoint_id); if !online && !endpoint_id.is_local() { let label = self.endpoint_label(&endpoint_id).to_owned(); @@ -242,6 +255,7 @@ impl ClientShellState { target: ClientEndpointFocusTarget, outcome: &mut ClientShellInput, ) -> bool { + self.pending_agent_reveal = None; let online = self.endpoint_is_online(&endpoint_id); if !online && !endpoint_id.is_local() { let label = self.endpoint_label(&endpoint_id).to_owned(); -- cgit v1.2.3