diff --git a/crates/tui/src/tools/subagent/mod.rs b/crates/tui/src/tools/subagent/mod.rs index 7618b62c..e7c70359 100644 --- a/crates/tui/src/tools/subagent/mod.rs +++ b/crates/tui/src/tools/subagent/mod.rs @@ -2402,9 +2402,12 @@ async fn run_subagent( top_p: None, }; - let response = tokio::time::timeout(STEP_API_TIMEOUT, runtime.client.create_message(request)) - .await - .map_err(|_| anyhow!("API call timed out after {}s", STEP_API_TIMEOUT.as_secs()))??; + let response = + tokio::time::timeout(STEP_API_TIMEOUT, runtime.client.create_message(request)) + .await + .map_err(|_| { + anyhow!("API call timed out after {}s", STEP_API_TIMEOUT.as_secs()) + })??; let mut tool_uses = Vec::new(); for block in &response.content { diff --git a/crates/tui/src/tui/ui.rs b/crates/tui/src/tui/ui.rs index a58d6564..0fd29561 100644 --- a/crates/tui/src/tui/ui.rs +++ b/crates/tui/src/tui/ui.rs @@ -3224,11 +3224,16 @@ fn render_footer(f: &mut Frame, area: Rect, app: &mut App) { } /// Whether the footer should animate the water-spout strip. Driven by the -/// underlying live-work flags (model loading, compacting, sub-agents) rather -/// than a stringly-typed status label, so adding or removing labels never -/// silently disables the animation. +/// underlying live-work flags so the strip stays visible for the *entire* +/// turn — not just the moments where bytes are streaming. `is_loading` can +/// flicker off between LLM rounds within a single turn (tool execution, +/// reasoning replay, capacity refresh, etc.), so we ALSO gate on the turn +/// itself still being in flight via `runtime_turn_status == "in_progress"`. +/// Without that, the user sees the strip vanish for seconds at a time even +/// though the agent is still working. fn footer_working_strip_active(app: &App) -> bool { - app.is_loading || app.is_compacting || running_agent_count(app) > 0 + let turn_in_progress = app.runtime_turn_status.as_deref() == Some("in_progress"); + app.is_loading || app.is_compacting || running_agent_count(app) > 0 || turn_in_progress } /// Test-only helper retained as a parity reference for `FooterWidget`'s