aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/endpoint_navigation.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-18 21:50:26 +0300
committerGitHub <noreply@github.com>2026-09-18 21:50:26 +0300
commit028780cebccc135d67a9ff97fbb0b11a150608de (patch)
treeb4282db58167539473fa1f0a7f4acd569db9ec53 /src/client/shell/endpoint_navigation.rs
parent241063f7ffb9583ba9b3438b32a82fcec3cf32a3 (diff)
fix: reveal selected agent when cycling the sidebar (#4355)
* fix: reveal selected agent when cycling the sidebar * fix: reveal agent after endpoint activation
Diffstat (limited to 'src/client/shell/endpoint_navigation.rs')
-rw-r--r--src/client/shell/endpoint_navigation.rs18
1 files changed, 16 insertions, 2 deletions
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();