From d8283881dba06b457d6634bba1fed56e4344c351 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Tue, 7 Apr 2026 02:51:11 +0300 Subject: fix: animate all-workspaces agent panel spinners --- src/app/mod.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/app') diff --git a/src/app/mod.rs b/src/app/mod.rs index 2c5d3855..870a485b 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -640,7 +640,7 @@ impl App { } fn sync_animation_timer(&mut self, now: Instant) { - if self.active_workspace_has_animation() { + if self.agent_panel_has_animation() { self.next_animation_tick .get_or_insert(now + ANIMATION_INTERVAL); } else { @@ -648,11 +648,19 @@ impl App { } } - fn active_workspace_has_animation(&self) -> bool { - self.state - .active - .and_then(|idx| self.state.workspaces.get(idx)) - .is_some_and(Workspace::has_working_pane) + fn agent_panel_has_animation(&self) -> bool { + match self.state.agent_panel_scope { + crate::app::state::AgentPanelScope::CurrentWorkspace => self + .state + .active + .and_then(|idx| self.state.workspaces.get(idx)) + .is_some_and(Workspace::has_working_pane), + crate::app::state::AgentPanelScope::AllWorkspaces => self + .state + .workspaces + .iter() + .any(Workspace::has_working_pane), + } } fn can_render_now(&self, now: Instant) -> bool { -- cgit v1.2.3