feat(tui): navigate subagents and show session lineage#116
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba569721df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ba56972 to
d4710c3
Compare
|
Fixed the P1: search no longer hides subagents, so a query always surfaces a subagent whose content matches even when its parent does not match. The reachable-subagent hiding now applies only to the browse list (parent is always present there). Removed the now-unused @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4710c35ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Surface session topology in the TUI viewer: - Viewer header shows thread role and parent lineage, resolving whether each portable parent is indexed locally. - Press `a` to open a subagent picker (spawn children); Enter drills into a subagent with a back-stack so `q`/`Esc` pops back to the parent. - Viewing-mode actions (share/export/preview/handoff/resume/open) target the viewed session rather than the search selection. - Hide a subagent from the browse list only when its spawn parent is present in the same scoped result set, so it stays reachable through the parent's picker. Orphaned subagents, and children whose parent falls outside the active scope or result limit, stay visible. Search is exempt so a query always surfaces a content-matching subagent even when its parent does not match. CLI `recall search` / `session list` unchanged. - Drop the F/V/H match-source indicator from the list. ## Considered and deferred - Skill drill-down (Usage dashboard to sessions) still shows subagents that used the skill; this is targeted evidence, intentionally exempt from the list's subagent hiding. Signed-off-by: samzong <[email protected]> - src/db/session_store.rs retain_visible_subagents [BOT-NIT]: the reachability query joins parent-links twice over the fetched id set; verified acceptable — the browse fetch is LIMIT-bounded and both joins hit indexed columns (parent-links PK, sessions UNIQUE(source, source_id)). - src/tui/app.rs back_out_of_viewing [BOT-TASTE]: if the parent transcript fails to reload on pop, the viewer silently stays on the child; only reachable if the parent row is deleted mid-view, so left as a no-op rather than adding recovery UI.
d4710c3 to
0dbf7f0
Compare
|
Fixed the P1 on the browse scope: subagent hiding is now reachability-based — a subagent is dropped only when its spawn parent is present in the same scoped result set ( @codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What's changed?
Surface session topology in the TUI viewer, building on the portable topology index (#115).
ain the viewer to open a subagent picker (spawn children); Enter drills into a subagent, with a back-stack soq/Escpops back to the parent (nesting supported). The header hints▾ N subsand addsa substo the help line when subagents exist.(source, source_id)is indexed locally ((ext)when not).recall search/session listdefaults are unchanged.Why
Topology data (thread role, parent links) landed in the index and CLI in #115 but had no TUI surface. This makes subagent lineage navigable in the viewer and keeps the browse list focused on primary sessions, while guaranteeing that no session — subagent-only content matches, or children whose parent is out of scope — ever becomes unreachable, and leaving the stable CLI contract untouched.
Verification
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings, and the core test suite (354 passing) are green.Considered and deferred