--- # claudbg-9c8r title: 'TUI: sub-agents panel in transcript view' status: completed type: feature priority: normal created_at: 2026-03-30T04:47:15Z updated_at: 2026-03-30T17:02:14Z parent: claudbg-i6l2 blocked_by: - claudbg-rudq --- Add a sub-agents panel to the right side of the transcript screen, showing all sub-agent runs for the current session. ## Layout ``` ┌── Transcript ──────────────────────┬─── Sub-agents ──┐ │ [user]: … │ a8e741de agent │ │ [assistant]: … │ > c3f920aa agent │◄ selected │ [tool: Bash] … │ │ │ [tool_result]: … │ │ └────────────────────────────────────┴──────────────────┘ ``` The panel is ~25% of the frame width (or a fixed ~30 chars). ## Implementation - Use `ratatui::layout::Layout` with `Constraint::Min` for the chat area and `Constraint::Length(30)` for the panel. - Panel shows: short agent ID + agent type. If the session has no sub-agents, the panel can be hidden or show "No sub-agents". - Panel is focusable via Tab (Tab cycles: chat log → sub-agents panel → chat log). - When panel is focused, j/k moves selection. Enter navigates to that sub-agent's transcript (sets `screen` to `SubagentTranscript`). - Highlight the focused pane's border (e.g. with a colored `Block` border). ## Data source `AppState.subagents: Vec` populated via `discover_agents_for_session` when entering transcript screen. ## Blocked by - transcript screen (claudbg-rudq) - agent discovery fix (claudbg-33n0) ## Summary of Changes\n\nModified render_transcript() to split chat area horizontally (Min(0) + Length(30)). Sub-agents panel shows agent list with yellow border/selection highlight when focused. Tab toggles focus. j/k navigates sub-agents when panel focused. Enter navigates to SubagentTranscript. Panel shows 'No sub-agents' when empty. 184 tests pass.