From 2dadd49605257bec26d29a58003dcc88dc9fa4ab Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Tue, 10 Mar 2026 23:19:27 -0400 Subject: [PATCH] Revert "Fix verbose mode breaking terminal rendering after many tool calls" This reverts commit f27a5e187a38613e37fa02769dda2f302a6440ed. --- lib/crates/arc-workflows/src/cli/progress.rs | 47 +++++++------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/lib/crates/arc-workflows/src/cli/progress.rs b/lib/crates/arc-workflows/src/cli/progress.rs index b8550a710..5d47ea993 100644 --- a/lib/crates/arc-workflows/src/cli/progress.rs +++ b/lib/crates/arc-workflows/src/cli/progress.rs @@ -888,8 +888,8 @@ impl ProgressUI { bar.finish_and_clear(); } for entry in &stage.tool_calls { - if entry.is_branch { - // Keep visible: branches always stay + if entry.is_branch || self.verbose { + // Keep visible: branches always, all entries in verbose mode entry.bar.abandon(); } else { entry.bar.finish_and_clear(); @@ -1211,40 +1211,25 @@ impl ProgressUI { } fn on_tool_call_completed(&mut self, stage_node_id: &str, tool_call_id: &str, is_error: bool) { - if let ProgressRenderer::Tty(tty) = &self.renderer { + if let ProgressRenderer::Tty(_) = &self.renderer { if let Some(stage) = self.active_stages.get_mut(stage_node_id) { - if let Some(pos) = stage + if let Some(entry) = stage .tool_calls - .iter() - .position(|e| e.tool_call_id == tool_call_id) + .iter_mut() + .find(|e| e.tool_call_id == tool_call_id) { let glyph = if is_error { red_cross() } else { green_check() }; - let elapsed = format_duration_short(stage.tool_calls[pos].bar.elapsed()); - - if self.verbose { - // Print as permanent output above the MultiProgress region, - // then remove the bar so MultiProgress stays small. - let dim = Style::new().dim(); - let _ = tty.multi.println(format!( - " {glyph} {} {}", - stage.tool_calls[pos].display_name, - dim.apply_to(&elapsed) - )); - stage.tool_calls[pos].bar.finish_and_clear(); - stage.tool_calls.remove(pos); + entry.status = if is_error { + ToolCallStatus::Failed } else { - let entry = &mut stage.tool_calls[pos]; - entry.status = if is_error { - ToolCallStatus::Failed - } else { - ToolCallStatus::Succeeded - }; - entry.bar.set_style(style_tool_done()); - entry.bar.set_prefix(elapsed); - entry - .bar - .finish_with_message(format!("{glyph} {}", entry.display_name)); - } + ToolCallStatus::Succeeded + }; + let elapsed = format_duration_short(entry.bar.elapsed()); + entry.bar.set_style(style_tool_done()); + entry.bar.set_prefix(elapsed); + entry + .bar + .finish_with_message(format!("{glyph} {}", entry.display_name)); } } }