log-raw-view

Log raw view: head/tail summary mode (first N + last N lines) for long command outputs

Metadata

Statusdone
Assignedagent-950
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-28T21:30:41.106599515+00:00
Started2026-04-28T21:51:38.409813018+00:00
Completed2026-04-28T21:52:13.381535596+00:00
Tagseval-scheduled
Eval score0.92
└ blocking impact0.90
└ completeness1.00
└ constraint fidelity0.85
└ coordination overhead0.95
└ correctness0.95
└ downstream usability0.85
└ efficiency0.90
└ intent fidelity0.93
└ style adherence0.95

Description

Description

User feature request for the log raw view (the renderer that previously got the green-tone-down treatment in tone-down-green). For long tool/command outputs (cargo build dumps, full file reads, etc.), show only first N + last N lines with the middle elided. Same content, less scroll.

User quote: 'a version of Log [raw] where we can see head/tail of the command outputs instead of all lines? for a kind of auto-summarization. first 3 lines last 3 lines? or 5 lines? that'd be cool'

v1 spec

  • Default truncation: 5 head + 5 tail lines. Picked 5 over 3 because 3 is too tight for typical cargo error output; 5 catches the actual error context on either end.
  • Threshold: only truncate when total lines > 12 (5 head + 5 tail + at least 2 elided lines worth keeping). Below threshold, show as-is.
  • Elision marker: a single line like … N lines elided … (with the actual count) — keeps the user's mental model accurate, distinguishes from genuinely-short output.
  • Toggle: a keybind in the log raw view (suggest s for 'summary' or h for 'head/tail'; whatever fits the existing TUI key conventions, avoid collisions). Toggles between full and summarized for the active view.
  • Style: the elision marker uses a dim/grey color to visually distinguish from real output. Don't add any other visual weight.

Out of scope

  • Per-tool-call configuration (one global toggle, not per-line)
  • Smart 'show error context only' (that's a different feature)
  • Persisting the toggle state across TUI restarts (in-session only for v1)
  • Changing default behavior — start full, user opts in to summary
  • Restyling anything else in the log raw view (per the user's earlier feedback: 'log raw view is amazing as it currently is')

Design notes

  • 5/5 is the v1 default. The line count should be configurable in TUI config (e.g., tui.log_summary_head / tui.log_summary_tail) — but defaults are fine for v1; only add the config keys if it's trivial to do alongside.
  • The toggle should only affect the rendering; the underlying log content is unchanged.

Validation

  • Failing test first: a render test where input is a 50-line command output, summary mode is on, output buffer contains only first 5 lines + elision marker + last 5 lines (and the elision marker shows '40 lines elided' or equivalent count)
  • Failing test: input is 8 lines (below threshold), summary mode on → output is identical to full mode (no elision)
  • Failing test: full mode shows all 50 lines (no regression on existing behavior)
  • Toggle keybind works: pressing the chosen key flips between full and summarized rendering
  • Manual smoke: open log raw view on a recent task with cargo output, verify long outputs collapse to head/tail and short outputs stay full
  • No regressions in non-log views (chat, TUI tabs, status bar)
  • cargo build + cargo test pass

Depends on

Required by

Log