feat(tui): interactive subagent sidebar and transcript viewer (#2376)#2381
Merged
feat(tui): interactive subagent sidebar and transcript viewer (#2376)#2381
Conversation
e1e6972 to
7f61e9b
Compare
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
7f61e9b to
2970cb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ato focus,j/kto select), non-blocking transcript viewer (Enterto open,Escto return), and status barViewing: <name>indicatorSubAgentMetricsinzeph-corewithtranscript_dir: Option<String>to bridge subagent path data to the TUI without introducing azeph-tui → zeph-subagentdependencytokio::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 indicatorChanged files
crates/zeph-core/src/metrics.rs—transcript_dirfield onSubAgentMetricscrates/zeph-core/src/agent/mod.rs— populatetranscript_dirinrefresh_subagent_metrics()crates/zeph-subagent/src/manager.rs—agent_transcript_dir()accessorcrates/zeph-tui/src/app.rs—AgentViewTarget,TuiTranscriptEntry,TranscriptCache,SubAgentSidebarStatetypes;start_transcript_load(),poll_pending_transcript(),visible_messages(),handle_subagent_panel_key()crates/zeph-tui/src/lib.rs— poll pending transcript in main event loopcrates/zeph-tui/src/widgets/subagents.rs—render_interactive()withListStatecrates/zeph-tui/src/widgets/chat.rs—collect_message_lines_from()accepting explicit slice; dynamic titlecrates/zeph-tui/src/widgets/status.rs—Viewing: <name>segmentcrates/zeph-tui/src/widgets/help.rs— new keybinding rows; snapshot updatedTest plan
cargo +nightly fmt --check— passcargo clippy --workspace -- -D warnings— pass (0 warnings)cargo nextest run --workspace --lib --bins— 6633/6633 passcargo nextest run -p zeph-tui --lib— 389/389 passcargo run --features full -- --config .local/config/testing.toml --tuiwith at least one active subagent to verify sidebar navigation, transcript loading, status bar, and help overlayCloses #2376