fix(tui): rustfmt parity + working-strip stays visible all turn

Two fixes folded into one commit (the parity failure was blocking the
v0.6.2 npm publish, the strip fix is the dogfooding follow-up):

1. cargo fmt --all: subagent/mod.rs (long timeout wrapper) was over the
   line-length budget when committed earlier; rustfmt rewraps it. CI
   parity (`cargo fmt -- --check`) was failing the release pipeline.

2. footer working-strip stays visible for the entire turn: previously
   the strip only animated while `is_loading || is_compacting ||
   running_agents > 0`. Between LLM rounds inside a single turn (tool
   execution, reasoning replay, capacity refresh) `is_loading` flickers
   off — and so the user saw the strip vanish for seconds at a time
   even though the agent was clearly still working. Widen the gate to
   ALSO include `runtime_turn_status == Some("in_progress")`, which
   only clears when `EngineEvent::TurnComplete` fires — so the strip
   now stays lit for the whole turn duration.
This commit is contained in:
Hunter Bown
2026-04-26 15:45:13 -05:00
parent 0d92eb847b
commit 6ab2fcc21f
2 changed files with 15 additions and 7 deletions
+6 -3
View File
@@ -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 {
+9 -4
View File
@@ -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