From cafd9e5dd0e59ecc7551ae066c737f23573460a7 Mon Sep 17 00:00:00 2001 From: akbash Date: Tue, 25 Aug 2026 01:08:36 +0300 Subject: fix: refresh shared agent manifest caches (#3204) refs #2711 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> --- src/app/actions.rs | 5 ++++- src/app/api.rs | 13 +++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/app') diff --git a/src/app/actions.rs b/src/app/actions.rs index a45687b4..6cbd9cc4 100644 --- a/src/app/actions.rs +++ b/src/app/actions.rs @@ -2743,7 +2743,9 @@ impl AppState { } Vec::new() } - AppEvent::AgentDetectionManifestsUpdated { updated, status } => { + AppEvent::AgentDetectionManifestsUpdated { + updated, status, .. + } => { self.agent_manifest_update_status = status; self.refresh_agent_manifest_summaries(); if !updated.is_empty() @@ -5782,6 +5784,7 @@ mod tests { version: crate::detect::manifest_update::ManifestVersion::parse("2026.06.10.1") .unwrap(), }], + activated: Vec::new(), status, }); diff --git a/src/app/api.rs b/src/app/api.rs index 92d9596f..5d347cf7 100644 --- a/src/app/api.rs +++ b/src/app/api.rs @@ -300,8 +300,8 @@ impl App { None }; let manifest_update_agents = - if let AppEvent::AgentDetectionManifestsUpdated { updated, .. } = &ev { - Some(updated.iter().map(|item| item.agent).collect::>()) + if let AppEvent::AgentDetectionManifestsUpdated { activated, .. } = &ev { + Some(activated.clone()) } else { None }; @@ -1423,7 +1423,7 @@ mod tests { } #[tokio::test] - async fn manifest_update_event_resets_matching_agent_detection_runtime() { + async fn manifest_activation_event_resets_matching_agent_detection_runtime() { let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel(); let mut app = App::new( &crate::config::Config::default(), @@ -1448,11 +1448,8 @@ mod tests { app.terminal_runtimes.insert(terminal_id, runtime); app.handle_internal_event(AppEvent::AgentDetectionManifestsUpdated { - updated: vec![crate::detect::manifest_update::ManifestUpdateCommit { - agent: Agent::Codex, - version: crate::detect::manifest_update::ManifestVersion::parse("2026.06.10.1") - .unwrap(), - }], + updated: Vec::new(), + activated: vec![Agent::Codex], status: crate::detect::manifest_update::ManifestUpdateStatus::default(), }); -- cgit v1.2.3