aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/endpoint_agents.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/shell/endpoint_agents.rs')
-rw-r--r--src/client/shell/endpoint_agents.rs43
1 files changed, 28 insertions, 15 deletions
diff --git a/src/client/shell/endpoint_agents.rs b/src/client/shell/endpoint_agents.rs
index a49fccf9..3cc106b3 100644
--- a/src/client/shell/endpoint_agents.rs
+++ b/src/client/shell/endpoint_agents.rs
@@ -103,8 +103,17 @@ fn agent_rows(
.iter()
.filter_map(|endpoint| {
endpoint.snapshot.as_deref().map(|snapshot| {
- super::agent_sidebar::agent_rows(snapshot, config, Some(&endpoint.label))
- .into_iter()
+ snapshot
+ .agents
+ .iter()
+ .filter_map(|agent| {
+ super::agent_sidebar::agent_row(
+ snapshot,
+ &agent.pane_id,
+ config,
+ Some(&endpoint.label),
+ )
+ })
.map(|agent| ((endpoint.endpoint_id.clone(), agent.pane_id.clone()), agent))
.collect::<Vec<_>>()
})
@@ -112,18 +121,22 @@ fn agent_rows(
.flatten()
.collect::<HashMap<_, _>>();
- super::aggregate_navigation::aggregate_agent_rows(endpoints, config.agent_panel_sort)
- .into_iter()
- .filter_map(|row| {
- let key = (row.endpoint.endpoint_id.clone(), row.agent.pane_id.clone());
- let mut agent = rendered_rows.remove(&key)?;
- agent.focused &= row.endpoint.endpoint_id == active_endpoint_id;
- Some(EndpointAgentRow {
- endpoint_id: row.endpoint.endpoint_id.clone(),
- machine_label: row.endpoint.label.to_owned(),
- stale: row.endpoint.stale(),
- agent,
- })
+ super::aggregate_navigation::aggregate_agent_rows(
+ endpoints,
+ active_endpoint_id,
+ config.agent_panel_sort,
+ )
+ .into_iter()
+ .filter_map(|row| {
+ let key = (row.endpoint.endpoint_id.clone(), row.agent.pane_id.clone());
+ let mut agent = rendered_rows.remove(&key)?;
+ agent.focused &= row.endpoint.endpoint_id == active_endpoint_id;
+ Some(EndpointAgentRow {
+ endpoint_id: row.endpoint.endpoint_id.clone(),
+ machine_label: row.endpoint.label.to_owned(),
+ stale: row.endpoint.stale(),
+ agent,
})
- .collect()
+ })
+ .collect()
}