fix(tui): compact tool-call transcript rendering — suppress boilerplate (#3031)

Three targeted changes to reduce low-value detail in the default
compact/Live transcript view:

1. ExecCell: suppress "(no output)" line in Live mode.  The success
   header already conveys the outcome; Transcript mode keeps it for
   exports/clipboard/pager.

2. ExecCell: suppress sub-second timing in Live mode.  Calls under 1s
   show no timing line; Transcript mode always shows exact timing.

3. render_preserved_output_mode: suppress "(no output)" for empty output
   in Live mode.  Same rationale — the header carries the signal.

Full command text, complete output, and exact timing remain available
in Transcript mode (pager, clipboard export, Alt+V detail view).
This commit is contained in:
Hunter Bown
2026-06-10 15:57:08 -07:00
parent b23067bacd
commit 7fef919765
+26 -12
View File
@@ -961,7 +961,12 @@ impl ExecCell {
Style::default().fg(palette::TEXT_MUTED),
width,
));
} else if self.status != ToolStatus::Running {
} else if self.status != ToolStatus::Running
&& mode == RenderMode::Transcript
{
// #3031: Suppress "(no output)" in compact/Live mode;
// the success header is enough signal. Transcript still
// records it for exports/clipboard/pager.
lines.push(Line::from(Span::styled(
" (no output)",
Style::default().fg(palette::TEXT_MUTED).italic(),
@@ -970,13 +975,17 @@ impl ExecCell {
}
if let Some(duration_ms) = self.duration_ms {
let seconds = f64::from(u32::try_from(duration_ms).unwrap_or(u32::MAX)) / 1000.0;
lines.extend(render_compact_kv(
"time",
&format!("{seconds:.2}s"),
Style::default().fg(palette::TEXT_DIM),
width,
));
// #3031: Suppress sub-second timing in compact mode.
// Transcript mode always shows exact timing.
if mode == RenderMode::Transcript || duration_ms >= 1000 {
let seconds = f64::from(u32::try_from(duration_ms).unwrap_or(u32::MAX)) / 1000.0;
lines.extend(render_compact_kv(
"time",
&format!("{seconds:.2}s"),
Style::default().fg(palette::TEXT_DIM),
width,
));
}
}
wrap_card_rail(lines)
@@ -2840,10 +2849,15 @@ fn render_preserved_output_mode(
) -> Vec<Line<'static>> {
let mut lines = Vec::new();
if output.trim().is_empty() {
lines.push(Line::from(Span::styled(
" (no output)",
Style::default().fg(palette::TEXT_MUTED).italic(),
)));
// #3031: In compact/Live mode, suppress "(no output)" — the tool
// header already carries the success/failure status. Transcript
// mode still records it for exports/clipboard/pager.
if mode == RenderMode::Transcript {
lines.push(Line::from(Span::styled(
" (no output)",
Style::default().fg(palette::TEXT_MUTED).italic(),
)));
}
return lines;
}