TUI: replace running-view with SupervisionScreen (#193)#437
Open
windoliver wants to merge 25 commits into
Open
TUI: replace running-view with SupervisionScreen (#193)#437windoliver wants to merge 25 commits into
windoliver wants to merge 25 commits into
Conversation
New top-level Supervision screen replaces the running-view monolith: fleet banner, 3-col agent grid with state-aware cards, drill-dock for per-agent Feed/DAG/Term, approval queue with badge + fleet chip + A-to-next modal. TUI-side heuristics classify agents (run/silent/stuck/blocked/ thrashing/awaiting/done/idle); thresholds configurable. Six-commit migration with env-flag scaffolding torn down in the final commit.
Pure types and threshold loader for the new Supervision screen. Unwired — dead code with tests until later tasks consume it.
Disambiguates SupervisedAgent.contextHot (boolean) from FleetSummary's aggregated count. costSpikeCount/contextHotCount make the count semantics explicit at call sites.
8-state classifier with priority order: awaiting > blocked > thrashing > stuck > silent > running > done > idle. Annotations (costSpike, contextHot) are additive and do not change primary state.
…lation test Clarifies why claim-age = task-age in Grove's data model. Documents that thrashing keys only on relations[0]. Adds a negative test for the multi-relation case so the simplification is locked in. Drops an unreachable regex branch in the silent-duration test.
DrillFeed reads contributions and filters client-side by agentId — small and focused, no highlight/filter/expand machinery. DagView is rendered unscoped for v1 (per-agent scoping is a follow-up). TerminalView uses the existing sessionName prop. drill-tabs.tsx exposes nextDrillTab as a pure helper.
#193) Scaffolding — opt-in only. RunningView remains default. Approval handlers are no-op stubs for now; full wiring lands when supervision becomes default in a follow-up task.
Replaces Task 13's no-op stubs with a thin SupervisionPage wrapper that sources pendingApprovals from useAgentMonitor and dispatches Enter/Escape to the prompt's tmux session on accept/reject — matching running-view's existing behaviour exactly.
Retires running-view.tsx (73 KB), running-keyboard.ts, running-cmd-mode.ts, agent-list.tsx, running-view-hints.ts, and their tests. SupervisionScreen becomes the running screen for every session; the GROVE_TUI_SUPERVISION env flag is removed. RUNNING_VIEW_HINTS → SUPERVISION_HINTS. Storage migration shim maps the legacy RunningPanel enum to the drillTab string. Visual test harnesses for RunningView panels deleted. Removed bindings vs. running-view (operator muscle memory): - 1/2/3 now select drill tabs (Feed/DAG/Term) only when drill is open - 4 is unbound (only three drill tabs) - f cycles state filter (was: fullscreen toggle)
Delete running-view.tsx, running-keyboard.ts, running-cmd-mode.ts,
agent-list.tsx, running-view-hints.ts and all their test files.
Delete screen-manager.test.ts (imported deleted RunningViewProps).
Update hint-map.ts to use SUPERVISION_HINTS for the running page.
Update use-session-persistence.ts: replace RunningPanel (numeric enum)
with DrillTab (string union) + migrateRunningPanel shim for legacy saves.
Simplify screen-manager.tsx: RunningPageWithBackConfirm always renders
SupervisionPage, env flag GROVE_TUI_SUPERVISION removed.
Fix hint-bar acceptance tests to expect supervision hints ("Move")
instead of old running-view hints ("Goto") on the running page.
Connects the archive-on-back flow (handleBackToMain in screen-manager) to a "back-to-main" keyboard action triggered by Shift+B on the supervision surface. Previously dead code after the running-view retirement. Adds B to SUPERVISION_HINTS so the binding is discoverable.
Stakes out the tmux-based real-process e2e called out by the spec (feedback_real_process_e2e convention). Body deferred to a follow-up that fills it in following tests/e2e/watch-relist-tmux.ts.
…onScreen (#193) The harness still drives a real claude-code review-loop; it just now matches the new FLEET banner + agent-card text instead of the retired running-view's "Contribution Feed" / "coder [1]" labels. Goal injection moves from a mid-session `:` prompt to the wizard's goal-input screen (SupervisionScreen does not currently expose a mid-session prompt). Requires ANTHROPIC_API_KEY. Run as: ANTHROPIC_API_KEY=... bun run tests/tui/typed-acp-tmux-e2e.ts
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
Closes #193. Builds the agent-supervision hero surface called for in the issue, replacing the 73 KB
running-view.tsxmonolith with a decomposedsrc/tui/views/supervision/module:useAgentMonitorpermission prompts —Aopens a modal,y/naccept/deny via the sametmux send-keyspath running-view used.classifyAgent,summarize) with configurable thresholds viaGROVE_TUI_SUP_*env vars, fully unit-tested.running-view.tsx,running-keyboard.ts,running-cmd-mode.ts,agent-list.tsx,running-view-hints.ts, two visual test harnesses, and their tests. Storage migration shim maps the legacyRunningPanelenum to the newdrillTabstring.Design:
docs/superpowers/specs/2026-05-15-tui-supervision-hero-design.mdPlan:
docs/superpowers/plans/2026-05-15-tui-supervision-hero.mdRemoved bindings (operator muscle memory)
1/2/3now select drill tabs (Feed / DAG / Term), only when drill is open4is unbound (only three drill tabs)fcycles state filter (was: fullscreen toggle)Bis new — back-to-main (was implicit via Ctrl+B in running-view)Test plan
bun test src/tui/views/supervision/— 104 unit/component testsbun test tests/tui/supervision-snapshot.test.ts tests/tui/supervision-keyboard-e2e.test.ts— 2 integration testsgroveand verify: fleet banner shows counts, cards render with correct state colors,Enteropens drill,Aopens approval modal,y/nroute to tmux,Breturns to preset-select with archive promptgrove upwith multiple agents and one tmux permission promptKnown follow-up gaps (non-blocking, all documented in commit messages)
screen-manager.test.tsdeleted (26 state-machine tests). The deletion is documented in commite6628270; tests for the SupervisionScreen replacement need to be ported separately.drill-dock.tsx); per-agent DAG scoping is a follow-up.FlashBarsurfacing yet. Plan called for "queue entry re-appears" — current behaviour relies on the next tick rather than an explicit toast.usePermissionDetectionwrapper inScreenManagerstill renders the old "Permission Request" banner above SupervisionScreen — duplicate UX with the new ApprovalModal. Drop it in a follow-up once the new modal is validated in production.🤖 Generated with Claude Code