46 Commits (c4646cf0e2363e77b938f3953f7450f8199900b9)
 

Author SHA1 Message Date
Elijah Voigt c4646cf0e2 feat(claudbg-d8ht): color-coded transcript label prefixes in CLI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 8d72b0e971 feat(claudbg-37cj): add --[no-]color global flag and NO_COLOR support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 9c9f61efd1 feat(claudbg-4g3l): add --limit flag to list commands, default 10
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 970ed0895f feat(claudbg-ltt0): sessions with no subcommand defaults to list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 7f864192e8 fix(tui): populate session list from disk on startup
run_tui() now calls discover_sessions() before entering the event loop,
converts each SessionRef to SessionListItem (sorted most-recent-first),
and assigns to state.sessions. Failures silently yield an empty list.

Fixes claudbg-zi1d

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 3dd463b3ae chore(beans): close completed epics
Mark TUI, session list & dump, and transcription output epics as
completed — all child tasks done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt f80185e442 feat(tui): add sub-agents panel to transcript screen
Splits chat area with a 30-char right panel listing sub-agent runs.
Yellow border highlights the focused pane. Tab cycles focus; j/k
navigates agents when panel focused; Enter drills into sub-agent
transcript. Shows "No sub-agents" when list is empty.

Closes claudbg-9c8r

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 0581431dd7 feat(tui): add transcript screen with stats header and chat log
Renders 4-row stats header (session ID, model, tokens, duration, tools)
above a scrollable chat log (Paragraph::scroll). Thinking blocks filtered,
tool results truncated to 200 chars. Handles scroll, Tab focus toggle,
Esc→back, q→quit dialog. Loads data lazily in event loop.

Closes claudbg-rudq

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 523bf4b89c feat(tui): add quit confirmation dialog and help modal
Quit dialog: centered 26×5 Clear+Block overlay triggered by q/Q,
confirms with q, dismisses with Esc. Help modal: centered 32×14 overlay
triggered by ?, lists all keyboard shortcuts, dismisses with Esc.
Both modals intercept all input while open. Wired into run.rs dispatch.

Closes claudbg-1e1c
Closes claudbg-1tlk

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 06b0c7cc57 feat(tui): add session list screen widget
Renders full-screen session list using ratatui Table with REVERSED
selection highlight. Columns: ID, Date, Project (tail-truncated), Model,
Msgs, Agents. Handles Up/k/Down/j nav, Enter→transcript, q/Esc→quit.
Wired into event loop render dispatch.

Closes claudbg-pta8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 1ddf7fb4fe feat(tui): add terminal setup, event loop, and teardown
Implements run_tui() with RAII terminal guard (TerminalGuard), panic hook
for safe cleanup, and 50ms poll event loop. Placeholder renderer draws a
bordered box. Wires into stubs.rs replacing the coming-soon stub.

Closes claudbg-ut9q

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt c3721bc9ef feat(tui): add app state model and screen enum
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>
2 months ago
Elijah Voigt 3e9e6f7ced feat(tui): add ratatui + crossterm dependencies
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>
2 months ago
Elijah Voigt 0af7b50095 fix(cli): improve --include help text with valid values and example
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>
2 months ago
Elijah Voigt 68a795bacd feat(sessions): add Sub-agents count column to sessions list
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>
2 months ago
Elijah Voigt 4fd09045d0 fix(transcribe): respect --verbose for tool use input truncation
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>
2 months ago
Elijah Voigt 1455859825 fix(transcribe): show tool results by default with truncation
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>
2 months ago
Elijah Voigt dbffc151fb fix(transcribe): format tool_calls as readable list in header
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>
2 months ago
Elijah Voigt 123913aefd fix(dump): collapse consecutive identical rows in sessions dump
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>
2 months ago
Elijah Voigt d9ceb916ba fix(output): respect terminal width and truncate long project paths
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>
2 months ago
Elijah Voigt f3258ee2b5 fix(output): emit array-of-objects for JSON output
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
Elijah Voigt b6ef138aae fix(models): add serde rename for durationMs field
RawEntry.duration_ms was not decorated with #[serde(rename = "durationMs")]
so the camelCase field from JSONL was silently dropped, causing
sessions transcribe to always show Duration: 0ms.

Closes claudbg-nqxz

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 01afe4d804 fix(discovery): correct subagent directory path structure
Subagents live at <session-uuid>/subagents/ (a sibling directory to
the session JSONL), not at <project-dir>/subagents/. Fix both
discover_agents_for_session and discover_all_agents to use the correct
path, and update integration tests accordingly.

Closes claudbg-33n0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 5bddec167b docs(CLAUDE.md): add JSONL schema notes and correct subagent path structure
- Document camelCase JSONL field names that need serde renames
  (durationMs, sessionId, parentUuid, etc.)
- Correct subagent disk structure: subagents live in
  <session-uuid>/subagents/ (a sibling directory), not
  <project-dir>/subagents/ as previously documented
- Note comfy-table is already in use (not a choice)
- Add discovery path note to agents architecture section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 66c1cf5c6e chore(beans): triage session bugs, agent discovery bug, and TUI epic
Session list & dump epic (claudbg-tci9):
- Table overflows terminal / project path truncation (claudbg-6dgc)
- JSON output is array-of-arrays not array-of-objects (claudbg-pfa5)
- --include help text missing valid values (claudbg-a532)
- Collapse consecutive identical rows in dump (claudbg-d9ev)
- Add sub-agent count column to sessions list (claudbg-xpzp)

Transcription output improvements epic (claudbg-8vpb):
- Tools header shows debug HashMap not readable list (claudbg-f4ot)
- Duration always 0ms due to durationMs/duration_ms field mismatch (claudbg-nqxz)
- Tool results hidden by default — should show with truncation (claudbg-zy1p)
- Tool use input hard-capped at 120 chars ignoring --verbose (claudbg-kg0v)

Agent discovery bug (claudbg-33n0):
- discover_agents_for_session looks in <project>/subagents/ but actual
  disk structure is <project>/<session-uuid>/subagents/

TUI epic (claudbg-i6l2) + 8 child tasks:
- ratatui/crossterm deps, app state, terminal/event loop,
  session list screen, transcript screen, sub-agents panel,
  quit dialog, help modal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 7f321060f5 docs: add README and MIT license
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 361c2cb99c chore(beans): mark all v0.1.0 epics and milestone completed
All 7 epics and the v0.1.0 milestone bean are now marked completed.
All 37 beans across the project have been implemented.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 8a7bab6a6a fix(output): ensure minimum table width for non-interactive environments
Set a 200-column minimum width in render_table so comfy-table never
truncates cell content in the Nix build sandbox or other non-tty
contexts; also mark Wave 7 stub beans in-progress/completed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt b087c02c3c chore(beans): mark Wave 6 agent tickets completed
claudbg-ki43, claudbg-kzcs, claudbg-iwqj, claudbg-ag0r all completed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt ec379c3b54 feat(agents): implement agents list/dump/transcribe/follow [claudbg-ki43, claudbg-kzcs, claudbg-iwqj, claudbg-ag0r]
Replace stub implementations with full Wave 6 agent commands: list
discovers and renders agents for a session; dump reads agent JSONL
directly (no DB); transcribe shows stats header + chat log with
include guards; --follow variant polls the file at 500ms for both
dump and transcribe. Adds 10 new unit tests; total now 99, 0 warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 62e807f3e1 chore(beans): mark Wave 5 tickets completed [claudbg-bh11, claudbg-ei6j, claudbg-m4p1, claudbg-zwoj]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt b1b0fb16e7 feat(sessions): implement sessions list, dump, transcribe + --follow [claudbg-bh11, claudbg-ei6j, claudbg-m4p1, claudbg-zwoj]
- Replace stub sessions commands with full implementations
- sessions list: lazy-syncs all discovered sessions, queries DB sorted most-recent-first, supports table/json/xml output and --verbose full UUID display
- sessions dump: resolves 8-char prefix via LIKE query, fetches raw JSONL from DB, renders table/json/xml with content preview (truncated at 80 chars unless --verbose)
- sessions transcribe: prints stats header then chat log; thinking/tool-result blocks gated by --include flags; json/xml output serialize structured messages
- --follow for dump and transcribe: bypasses DB, polls file with byte-seek offset at 500ms intervals
- Update agents.rs stubs to accept &GlobalOpts (Wave 6 prep)
- Update main.rs to pass &cli.global to all session and agent commands
- 89 tests pass, 0 clippy warnings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt efe70aef7e feat(output): implement table, JSON, and XML output renderers [claudbg-ftb9, claudbg-fkyt, claudbg-bt5p]
Add src/output/ module with three renderers:
- table.rs: render_table() using comfy-table with dynamic column sizing
- json.rs: render_json<T: Serialize>() using serde_json pretty-print
- xml.rs: render_xml_rows() with XML-escaped headers and values

Each renderer has unit tests (17 new tests total); total test count: 79 passing, 0 clippy warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 15d9402534 feat(commands): implement index subcommand and command stubs [claudbg-7vkw]
- src/commands/index.rs: run() syncs all sessions; respects --force flag
- src/commands/sessions.rs: placeholder list/dump/transcribe stubs
- src/commands/agents.rs: placeholder list/dump/transcribe stubs
- src/commands/stubs.rs: tui and query coming-soon stubs
- src/main.rs: wire all subcommands through new command modules
- Fix: use unsafe {} for set_var in tests (Edition 2024 requirement)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt cf1bc9d8a8 feat(db): implement database & caching layer [claudbg-goc1, claudbg-umrv, claudbg-hskl, claudbg-edmr]
- src/db/connection.rs: DbHandle type alias (Arc<libsql::Database>), open_db(), default_db_path()
- src/db/schema.rs: run_migrations() creating sessions, messages, tool_uses, raw_sessions tables
- src/db/sync.rs: ensure_synced() and force_resync() with lazy mtime/size-based staleness check
- Cargo.toml: add tempfile dev-dependency for tests
- Fix: scope read connection before write to avoid SQLite locked error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 2acab9c179 chore(beans): mark Wave 2 tickets completed
Mark claudbg-uls1, claudbg-g5uv, claudbg-jupi, claudbg-76fy, claudbg-d3aj
as completed with implementation summaries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt fb18b64621 feat(parser): add session/agent discovery and JSONL reader [claudbg-g5uv,claudbg-jupi,claudbg-76fy]
Add src/parser/discovery.rs with SessionRef, AgentRef, discover_sessions(),
discover_agents_for_session(), and discover_all_agents(). Add
src/parser/reader.rs with async read_session_file() using tokio BufReader.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 620a3571c6 feat(models): define Rust types for JSONL schema [claudbg-uls1]
Add src/models/session.rs with permissive RawEntry, Message,
MessageContent (untagged), ContentBlock (tagged), Usage, SystemMessage.
Add src/models/stats.rs with SessionStats and compute_stats().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 63e1f34778 fix: add explicit [lib]/[[bin]] sections to Cargo.toml for rust-analyzer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 4129e65594 feat(wave1): Full clap Cli struct + dispatch skeleton in main.rs [claudbg-pkyj]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt ae33d93d8e feat(wave1): Short UUID display utility and xml_escape helper [claudbg-x7wb]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt ded9cd3a5c feat(wave1): Define global CLI flags (OutputFormat, IncludeList) [claudbg-nmuu]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 1a2f999636 feat(wave1): App error type and Result alias [claudbg-i09w]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt 3b62deb617 feat(wave1): Add Cargo.toml dependencies + create src/lib.rs scaffold [claudbg-yugb]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt b6740f0f9e Add v0.1.0 project plan: 37 beans across 7 epics
Milestone: v0.1.0 - Core Session Inspector
Epics: CLI Foundation, Data Parsing & Models, Database & Caching,
Output Formatting, Sessions Commands, Agent Commands, Stub Commands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago
Elijah Voigt c85e353c70 Initial project scaffold
- flake.nix: Nix flake with crane-based Rust builds, rust-overlay for a
  pinned stable toolchain (with rust-analyzer, clippy, rust-src), and a
  devShell stocked with cargo-watch, cargo-edit, cargo-nextest, and beans
- Cargo.toml: minimal package manifest targeting Rust edition 2024
- Cargo.lock: generated lockfile
- src/main.rs: placeholder main entry point
- flake.lock: pinned flake input revisions
- .gitignore, .envrc, .beans.yml, .claude/settings.json: project tooling config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 months ago