Metadata
| Status | done |
|---|---|
| Assigned | agent-950 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-28T21:30:41.106599515+00:00 |
| Started | 2026-04-28T21:51:38.409813018+00:00 |
| Completed | 2026-04-28T21:52:13.381535596+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.92 |
| └ blocking impact | 0.90 |
| └ completeness | 1.00 |
| └ constraint fidelity | 0.85 |
| └ coordination overhead | 0.95 |
| └ correctness | 0.95 |
| └ downstream usability | 0.85 |
| └ efficiency | 0.90 |
| └ intent fidelity | 0.93 |
| └ style adherence | 0.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
sfor 'summary' orhfor '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
- (none)
Log
- 2026-04-28T21:30:41.092766161+00:00 Task paused
- 2026-04-28T21:30:44.221156955+00:00 Task published
- 2026-04-28T21:30:59.410943171+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer best matches TUI feature implementation requiring test-driven code modification, manual smoke testing, and quality focus aligned with user's existing feedback on log raw view.
- 2026-04-28T21:31:00.559722788+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-28T21:31:13.762136655+00:00 Starting: investigating log raw view in TUI to add head/tail summary toggle
- 2026-04-28T21:33:45.137521319+00:00 Reading existing log_render.rs and state.rs - design: add summary_mode flag, wire 's' keybind for Log tab, truncate ToolResult/ToolCall bodies in RawPretty when on. Constants: HEAD=5 TAIL=5 THRESHOLD=12. Starting with TDD.
- 2026-04-28T21:50:51.728476862+00:00 Implementation complete: 5 new tests pass, build succeeds, binary installed. Pre-existing test failures (ResumeConfig fields, chat-tab dot color, provenance, spawn_task) are unrelated to TUI log render changes — branch has zero commits beyond main, so these failures exist on main and are not regressions from this work.
- 2026-04-28T21:51:27.385493608+00:00 Committed: e16d62746 — pushed to remote
- 2026-04-28T21:51:30.854700872+00:00 Task unclaimed: agent 'agent-938' (PID 508488) process exited
- 2026-04-28T21:51:38.409816866+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-28T21:52:01.346026517+00:00 Validated: 5 new tests for head/tail summary all pass; 23 log_render tests pass total. cargo build succeeds. Pre-existing test failures (ResumeConfig, chat tab dot, provenance) are unrelated.
- 2026-04-28T21:52:13.381542499+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-28T21:55:00.568375977+00:00 PendingEval → Done (evaluator passed; downstream unblocks)