You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
claudbg/.beans/claudbg-rudq--tui-transcrip...

1.9 KiB

title status type priority created_at updated_at parent blocked_by
TUI: transcript screen — chat log and stats header todo feature normal 2026-03-30T04:46:56Z 2026-03-30T04:49:03Z claudbg-i6l2
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<Line> (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)