--- # claudbg-rudq title: 'TUI: transcript screen — chat log and stats header' status: in-progress type: feature priority: normal created_at: 2026-03-30T04:46:56Z updated_at: 2026-03-30T16:53:51Z parent: claudbg-i6l2 blocked_by: - claudbg-ut9q --- Render the full-screen transcript view for a session or sub-agent. ## Layout ``` Session: 21fae0a8 Model: claude-3-opus Tokens: in=12k out=4k Duration: 57min Tools: Bash×12, Read×8, Write×3 ──────────────────────────────────────────────────────────────────────────── [user]: Please implement the sessions list command… [assistant]: I'll start by reading the existing code structure… [tool: Read] {"file_path": "/path/to/file.rs"} [tool_result]: pub struct SessionRef {\n pub session_id: String,\n pub project… [assistant]: Here is the implementation: … ``` ## Implementation - Split the frame: top block = stats header (fixed ~3 lines), middle = scrollable chat log, right panel = sub-agents (see sub-agents task). - Use `ratatui::widgets::Paragraph` with `Wrap { trim: false }` for the header. - Chat log: build as a `Vec` (ratatui spans/lines). Each entry becomes one or more lines. Use `Paragraph::new(text).scroll((v_offset, h_offset))` for scroll. - Horizontal scroll for long lines: track `transcript_h_scroll` in state, increment/decrement with left/right keys. - Vertical scroll: `transcript_scroll` in state, up/down keys. - Thinking blocks: hidden by default (filter from `entries` before rendering). - Tool results: truncated to ~200 chars by default. ## Data source Load `RawEntry` list from raw JSONL via `read_session_file` when entering transcript screen. Compute `SessionStats` for the header. ## Blocked by - app state (claudbg-nq36), event loop (claudbg-ut9q)