Repository navigation
feat(tui): canonical agent visibility + sub-agent kind distinction - #1447
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
a54a3d8 to
fb784a8
Compare
Wish: tui-sidebar-canonical-visibility — surfaces stopped canonical agents in the TUI sidebar so users can re-spawn idle workspace agents without losing the menu, and explicitly types every node as canonical or sub-agent so sub-agents render only nested under their parent. Changes: - TreeNode.tsx: replace palette.textDim with legible color and swap glyph ○→◌ for wsAgentState='stopped'; add ' [Enter to start]' suffix to mirror existing [stuck]/[paused]/[done] pattern; render kind-aware label decoration. - types.ts: extend TreeNode shape with kind: 'canonical' | 'subagent'. - session-tree.ts: set kind in buildAgentNode (canonical) and appendSubAgentNodes (subagent) so the data layer carries the distinction without name parsing. - Tests: TreeNode.test.tsx (color + suffix + glyph), Nav.test.tsx (Enter-on-stopped triggers spawnAgent), session-tree.test.ts (kind field assertions for canonical vs subagent paths). Wish artifact: .genie/wishes/tui-sidebar-canonical-visibility/WISH.md Co-orchestrated by team 'tui-sidebar'; squashed from 2 wip commits into a single conventional commit before merge.
fb784a8 to
32a96c4
Compare
G1 of the wish (visibility for stopped agents) changes: - TreeNode color for wsAgentState='stopped' from palette.textDim to a legible color - Glyph from ○ to ◌ Update the captured frame for the "TreeNode > agent state = stopped" visual test to reflect the new design. Also drops orphaned SystemStats / Nav-loading / TeamCreate snapshots whose describe blocks were quarantined in #1448 (skipped tests have no snapshots to compare against). Net diff: 1 snapshot block updated (stopped state), 6 orphan blocks removed. No new snapshots; no other tests affected.
`computeNavCounts` returned `{ agentCount: 0, runningCount: 0 }` whenever
the workspace scan came up empty (stale workspaceRoot, no agents resolved,
or every node was an orphan session) — even when tmux had live panes. Users
saw `0/0` in the nav header despite running agents.
Fix: when workspaceRoot mode produces zero agents, fall back to the live
tmux pane inventory so the header reflects reality. Export `computeNavCounts`
so the helper is unit-testable — the missing test on this helper is exactly
why the regression slipped through PR #1447's review.
Adds 8 regression tests covering: workspaceRoot+agents, workspaceRoot+empty
fallback, no-workspaceRoot tmux sum, mixed orphan/agent counting, running
filter, and diagnostic-snapshot edge cases.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…up) (#1507) `computeNavCounts` returned `{ agentCount: 0, runningCount: 0 }` whenever the workspace scan came up empty (stale workspaceRoot, no agents resolved, or every node was an orphan session) — even when tmux had live panes. Users saw `0/0` in the nav header despite running agents. Fix: when workspaceRoot mode produces zero agents, fall back to the live tmux pane inventory so the header reflects reality. Export `computeNavCounts` so the helper is unit-testable — the missing test on this helper is exactly why the regression slipped through PR #1447's review. Adds 8 regression tests covering: workspaceRoot+agents, workspaceRoot+empty fallback, no-workspaceRoot tmux sum, mixed orphan/agent counting, running filter, and diagnostic-snapshot edge cases. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Implements wish `tui-sidebar-canonical-visibility` (3 execution groups, all done by team `tui-sidebar`):
Why
User-reported bug: canonical workspace agents (`~/workspace/agents//`) that aren't currently running disappeared from the TUI sidebar, blocking re-spawn. Plus non-canonical sub-agents (slashed names like `felipe/scout`, `genie/devrel`) shared the same hierarchy with no kind distinction.
After this PR: every canonical agent is visible regardless of runtime state, sub-agents are explicitly nested.
Diff
614 insertions across 7 files (Nav.tsx, TreeNode.tsx, types.ts, session-tree.ts + Nav.test.tsx, TreeNode.test.tsx, session-tree.test.ts extensions).
Wish artifact
`.genie/wishes/tui-sidebar-canonical-visibility/WISH.md` — full plan, acceptance criteria, validation commands.
Known gap before mark-ready
Commits are `wip: tui-sidebar-canonical-visibility#1` (G1+G2) and `wip: tui-sidebar-canonical-visibility#3` (G3). Commitlint will reject. Squash into one `feat(tui): canonical agent visibility + kind distinction` commit before mark-ready-for-review. Pending Felipe's authorization for force-push (similar to #1432 cleanup).