Skip to content

feat(tui): interactive subagent sidebar and transcript viewer (#2376)#2381

Merged
bug-ops merged 1 commit intomainfrom
feat/issue-2376/tui-subagent-management
Mar 29, 2026
Merged

feat(tui): interactive subagent sidebar and transcript viewer (#2376)#2381
bug-ops merged 1 commit intomainfrom
feat/issue-2376/tui-subagent-management

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 29, 2026

Summary

  • Add interactive subagent management to the TUI dashboard: navigable sidebar (a to focus, j/k to select), non-blocking transcript viewer (Enter to open, Esc to return), and status bar Viewing: <name> indicator
  • Extend SubAgentMetrics in zeph-core with transcript_dir: Option<String> to bridge subagent path data to the TUI without introducing a zeph-tui → zeph-subagent dependency
  • Transcript reads use tokio::task::spawn_blocking; partial last-line writes from active agents are discarded silently; large transcripts are truncated to the last 200 entries with a truncation indicator

Changed files

  • crates/zeph-core/src/metrics.rstranscript_dir field on SubAgentMetrics
  • crates/zeph-core/src/agent/mod.rs — populate transcript_dir in refresh_subagent_metrics()
  • crates/zeph-subagent/src/manager.rsagent_transcript_dir() accessor
  • crates/zeph-tui/src/app.rsAgentViewTarget, TuiTranscriptEntry, TranscriptCache, SubAgentSidebarState types; start_transcript_load(), poll_pending_transcript(), visible_messages(), handle_subagent_panel_key()
  • crates/zeph-tui/src/lib.rs — poll pending transcript in main event loop
  • crates/zeph-tui/src/widgets/subagents.rsrender_interactive() with ListState
  • crates/zeph-tui/src/widgets/chat.rscollect_message_lines_from() accepting explicit slice; dynamic title
  • crates/zeph-tui/src/widgets/status.rsViewing: <name> segment
  • crates/zeph-tui/src/widgets/help.rs — new keybinding rows; snapshot updated

Test plan

  • cargo +nightly fmt --check — pass
  • cargo clippy --workspace -- -D warnings — pass (0 warnings)
  • cargo nextest run --workspace --lib --bins — 6633/6633 pass
  • cargo nextest run -p zeph-tui --lib — 389/389 pass
  • Manual TUI session: cargo run --features full -- --config .local/config/testing.toml --tui with at least one active subagent to verify sidebar navigation, transcript loading, status bar, and help overlay

Closes #2376

@github-actions github-actions bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate enhancement New feature or request size/XL Extra large PR (500+ lines) labels Mar 29, 2026
@bug-ops bug-ops force-pushed the feat/issue-2376/tui-subagent-management branch from e1e6972 to 7f61e9b Compare March 29, 2026 01:11
@bug-ops bug-ops enabled auto-merge (squash) March 29, 2026 01:11
Add navigable subagent sidebar to the TUI dashboard. The `a` key focuses
the Sub-Agents panel; `j`/`k` move selection; `Enter` loads the selected
agent's JSONL transcript into the main chat area via a non-blocking
tokio::task::spawn_blocking read; `Esc` returns to the main conversation.
A "Viewing: <name>" indicator appears in the status bar while a subagent
transcript is active and the header bar shows the agent name and state.

- Add `transcript_dir: Option<String>` to `SubAgentMetrics` in zeph-core
- Expose `agent_transcript_dir()` accessor on `SubAgentManager`
- Wire `transcript_dir` population in `refresh_subagent_metrics()`
- Add `AgentViewTarget`, `TuiTranscriptEntry`, `TranscriptCache`,
  `SubAgentSidebarState` types to zeph-tui
- Implement `start_transcript_load()`, `poll_pending_transcript()`,
  `maybe_reload_transcript()`, `visible_messages()` on `App`
- `render_interactive()` on subagents widget with stateful ListState
- Status bar "Viewing" segment; help overlay documents new keybindings
- 389 zeph-tui unit tests pass; 6633 workspace tests pass
@bug-ops bug-ops force-pushed the feat/issue-2376/tui-subagent-management branch from 7f61e9b to 2970cb8 Compare March 29, 2026 01:20
@bug-ops bug-ops merged commit 2f02d62 into main Mar 29, 2026
26 checks passed
@bug-ops bug-ops deleted the feat/issue-2376/tui-subagent-management branch March 29, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tui): interactive subagent management — sidebar selection and transcript viewer

1 participant