Defines Screen, Focus, AppState, SessionListItem with state transition
methods (new, enter_transcript, go_back). Reuses existing RawEntry and
AgentRef types. Includes 11 unit tests.
Closes claudbg-nq36
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds ratatui 0.29 with crossterm backend feature to Cargo.toml.
crossterm 0.28.1 is pulled in transitively via ratatui's crossterm feature.
Closes claudbg-78xt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Explicitly list 'thinking' and 'output' as valid values and show an
example invocation so users can discover options from --help.
Closes claudbg-a532
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Call discover_agents_for_session for each session and show the real
count in a new Sub-agents column. JSON and XML output updated to include
the subagents field.
Closes claudbg-xpzp
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hardcoded 120-char cap with usize::MAX when opts.verbose is set.
Also add a trailing ellipsis indicator when content is actually truncated.
Closes claudbg-kg0v
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the opts.include.output gate in render_entry_text so tool results
are always visible. Truncated to 200 chars by default; uncapped with
--verbose.
Closes claudbg-zy1p
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace {:?} debug format with entries sorted by count descending,
formatted as "Name×N" joined by ", " instead of raw HashMap output.
Closes claudbg-f4ot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add collapse_dump_rows() post-processing pass that merges runs of rows
with identical type/role/content into a single row showing the seq range
as "N-M". Applies to table, JSON, and XML output uniformly.
Closes claudbg-d9ev
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hardcoded FALLBACK_WIDTH=200 with ContentArrangement::Dynamic
so comfy-table auto-fits to the actual terminal. Truncate project paths
to the last ~40 chars with an ellipsis prefix in sessions list.
Closes claudbg-6dgc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sessions list/dump and agents list/dump were passing Vec<Vec<String>>
directly to render_json, producing unlabeled arrays. Now each row is
mapped to a serde_json object with named keys before serializing.
Closes claudbg-pfa5
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
19 changed files with 944 additions and 75 deletions
Added collapse_dump_rows() post-processing pass in sessions.rs that merges consecutive rows with identical type/role/content into a single row with seq shown as 'N-M' range. Applied before output format branching so it affects table, JSON, and XML output uniformly.
In sessions.rs transcribe function, replaced {:?} debug format with a sorted, human-readable format: entries sorted by count descending, formatted as 'Name×N', joined by ', '.
In sessions.rs and agents.rs render_entry_text ToolUse branch: replaced hardcoded 120-char cap with cap=usize::MAX when opts.verbose, 120 otherwise. Added ellipsis indicator when content is actually truncated.
title: JSON output is array-of-arrays instead of array-of-objects
title: JSON output is array-of-arrays instead of array-of-objects
status: todo
status: completed
type: bug
type: bug
priority: normal
priority: normal
created_at: 2026-03-30T04:37:05Z
created_at: 2026-03-30T04:37:05Z
updated_at: 2026-03-30T04:41:14Z
updated_at: 2026-03-30T05:05:12Z
parent: claudbg-tci9
parent: claudbg-tci9
---
---
@ -38,3 +38,7 @@ Output should be an array of objects with named keys:
- `src/commands/sessions.rs` — `list()` and `dump()` JSON output branches
- `src/commands/sessions.rs` — `list()` and `dump()` JSON output branches
- `src/output/json.rs` — generic `render_json`
- `src/output/json.rs` — generic `render_json`
## Summary of Changes
Fixed JSON output in both sessions.rs and agents.rs to produce array-of-objects instead of array-of-arrays. Each row is now mapped to a serde_json object with named keys before serializing. Keys: sessions list (id, date, project, model, messages, subagents), sessions dump (seq, timestamp, type, role, content), agents list (id, type, file, modified), agents dump (seq, timestamp, type, role, content).
In sessions.rs list(): built a session_id->file_path map from discovered sessions, then for each DB row called discover_agents_for_session to get the real count. Added 'Sub-agents' column to table headers and row data. Updated JSON and XML output to include the subagents field.
- `src/commands/agents.rs` — `render_entry_text`, same branch (~line 74–92)
- `src/commands/agents.rs` — `render_entry_text`, same branch (~line 74–92)
## Summary of Changes
Removed opts.include.output gate in render_entry_text in both sessions.rs and agents.rs. Tool results now always shown, truncated at 200 chars by default, uncapped with --verbose.