Pass project_max directly to truncate_project instead of project_max+30,
so the function (not ratatui's right-clip) controls truncation — showing
the end of the path (e.g. …/foo/bar) rather than the beginning.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switch chat-log layout constraint from Min(0) to Fill(1) to ensure the
transcript panel never bleeds into the sub-agents panel. Add Ctrl+L
keybinding (global + transcript screen) that sets needs_clear, causing
terminal.clear() before the next draw to flush rendering artifacts. Update
help modal to document Ctrl+L.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Created 7 new beans for untracked TODO items:
- claudbg-wfoe: Ctrl+C quits without confirmation
- claudbg-xokw: accept msgs/messages as filter aliases
- claudbg-vcxz: document filter syntax in help text
- claudbg-pow4: cursor movement in filter/search bar
- claudbg-ysj0: prevent transcript overflow + Ctrl+L redraw
- claudbg-28ao: move db/history files to ~/.claude/claudbg/
- claudbg-wxdt: truncate project path from start in TUI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add `in:<N>`, `out:<N>`, and `tokens:<N>` filter fields (with `:`, `>`, `<`
operators) to the TUI filter query language. Populate input_tokens and
output_tokens on SessionListItem from the DB sessions table, wire them into
the SessionRow trait, and update the help modal to document the new fields.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Home jumps to the top (scroll = 0) and End jumps to the bottom, mirroring
the existing gg/G vim-style bindings. Help modal updated to document both.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the '>' prefix + yellow fg on the selected/viewing agent row with
Modifier::REVERSED applied to the full span, matching ratatui Table highlight
conventions and removing the need for a cursor character.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Press '/' to immediately focus the filter input on the session-list
screen and the search input on the transcript screen, matching the
less(1) convention. Updates help modal and placeholder hint text.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- claudbg-vqhj: '/' key to focus filter/search bar
- claudbg-j9az: bug — model column always blank in sessions list
- claudbg-6m2c: token count filter fields (in:/out:/tokens: with </> ops)
- claudbg-e49f: Home/End keys to jump to top/bottom of transcript
- claudbg-8bs3: color-highlight selected agent row instead of '>' cursor
Removed "project truncates beginning" TODO item — already implemented
in truncate_project() which prepends '…' and keeps the tail.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The project path was missing for sessions whose first JSONL line has no
cwd field. Fix reads up to 20 non-empty lines to find any entry with cwd
(typically a system-type entry that may not be at line 1).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add --scope=project|user flag to `sessions list` (default: project).
When project scope is active, only sessions whose project_path matches
the current working directory are shown. Use --scope=user to see all.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the user is viewing a SubagentTranscript, the corresponding entry
in the sub-agents panel is now highlighted with '>' prefix regardless
of which panel has keyboard focus.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When on SubagentTranscript, Esc or Backspace now goes back to the parent
session's Transcript view (lazy-reloads entries) instead of jumping all
the way to the session list. Transcript → session list path unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gg (double-g): jump to top of transcript via pending_g chord detection.
G (Shift+G): jump to bottom of transcript.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Compute total rendered lines on each page-down keypress and cap the
scroll offset so it cannot scroll past the last line.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Query the DB cache on TUI startup to enrich SessionListItems with
message_count and fallback project_path for sessions whose JSONL
first line lacks a cwd field.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also close claudbg-4g3l, claudbg-ltt0, claudbg-37cj as already implemented.
Fixes pre-existing fmt issues in agents.rs, sessions.rs, filter.rs, and TUI files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Created 10 beans covering all tracked work items:
- claudbg-x45o: sessions list --scope flag (project-scoped by default)
- claudbg-9627: sessions list missing project path bug
- claudbg-zniv: TUI missing project path bug
- claudbg-0yk4: TUI message count always 0
- claudbg-4gtn: Space/PageDown scrolls past transcript end
- claudbg-e4ac: selected agent highlights in agents widget
- claudbg-mfpd: back-navigation from agent to session transcript
- claudbg-u28r: search highlight unreadable in light mode
- claudbg-trk3: Shift+G jump to bottom of transcript
- claudbg-6t38: gg jump to top of transcript
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bottom search bar (3 rows, always visible), press 't' to focus
- Case-insensitive match highlighting (yellow bg) across all spans
- Panel title shows current/total match count (e.g. "2/7")
- 'n'/'N' navigate next/previous match, wrapping around
- Enter applies search and returns focus to chat log
- Esc clears search and returns focus to chat log
- Tab cycles ChatLog → SubagentsPanel → SearchInput → ChatLog
- Help modal updated with search keybindings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(claudbg-eej6): wrap Handle::block_on with block_in_place in TUI
load_transcript_for_session and load_transcript_for_agent called
Handle::current().block_on() from within the tokio::main async context,
causing a panic on session selection. Wrap with block_in_place() to
signal the scheduler to move other tasks off the thread before blocking.
fix(claudbg-80fb): add #[serde(rename = "sessionId")] to RawEntry.session_id
The JSONL field is camelCase ("sessionId") but serde matched only the
literal field name, so session_id always deserialized as None. This made
AgentRef.session_id default to "", and since any_str.starts_with("") is
always true, load_transcript_for_agent matched the wrong session and
found no agent, leaving sub-agent transcripts permanently empty.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>