Repository navigation
Description
Problem
When several builders are running and multiple hit gates at once, the user faces a wall of "needs your attention" rows. Triage today is manual: scan the tree, pick one, open its terminal, find the relevant artifact (plan / diff), decide, approve or send a message, then context-switch back to the tree to pick the next one. With 5–10 active builders, the loop is exhausting and easy to drop something on.
Goal: a "focus mode" that flips the model — instead of presenting all blocked builders at once and asking the user to choose, serve them one at a time, auto-advancing after each decision until the queue is empty.
Current state
codev.approveGate(commands/approve.ts:56) already iterates blocked builders via a quick-pick, then a confirmation modal per builder. The "queue" is implicit:overview.builders.filter(b => b.blocked).gate-toast.tsfires per-builder toasts on newly-blocked transitions and usesworkspaceStateto avoid re-toasting the same state.OverviewCache(views/overview-data.ts) refreshes on SSE; the blocked set is reactive.- No single command bundles "open terminal + show artifact + prompt for action + advance".
Proposed behavior
1. Entry
New command codev.enterFocusMode. Visible in palette and on the Builders view title bar as an inline action when ≥1 blocked builder exists. Sensible default keybinding (e.g. Cmd+K F).
Pre-flight: snapshot the current blocked-builder set from OverviewCache. Queue order = the existing orderForDisplay() ordering (longest-blockedSince first, post-#798: truly-blocked before actively-comm-blocked).
2. Per-builder presentation
For each builder in the queue:
-
Open its PTY in the editor (existing
terminalManagerpath), reveal+expand its tree row (already wired via vscode: focusing a builder PTY tab silently reveals/expands the matching builder row in the tree #790 if landed). -
Open the gate-relevant artifact in a side editor:
plan-approval→ plan file (usescodev.viewPlanFile/#793)spec-approval→ spec file (usescodev.viewSpecFile/#793)dev-approval→ unified diff (usescodev.viewDiff)- other gates → fall back to the unified diff
-
Surface an action QuickPick (uses
actionPickfrom vscode: replace popup dialogs (modals + action toasts) with keyboard-first QuickPicks for accessibility #797 for keyboard-first navigation):#773 plan-approval — "Flaky Dashboard E2E ..." ┌─────────────────────────────────────┐ │ ▸ Approve Gate [Enter] │ │ Skip (drop for this session) │ │ Exit focus mode [Esc] │ └─────────────────────────────────────┘
3. Action semantics
- Approve Gate — runs
codev.approveGatefor this builder withskipConfirmation: true(the focus-mode prompt IS the confirmation), then auto-advances to the next queued builder after OverviewCache refresh confirms the gate cleared. - Skip — drops this builder from the current session's queue (does not re-surface). Auto-advances.
- Exit focus mode — closes the session immediately. Any open artifact editors are left as-is for the user.
4. Queue dynamics
- Skip = drop for the session: skipped builders are never re-shown in this session, even if they remain blocked. They'll re-appear in the next focus-mode session (which re-snapshots).
- New arrivals mid-session = append: if a builder enters the blocked state during a focus session (SSE update), append it to the queue. The user sees it after the current snapshot's queue is exhausted.
- Exit conditions:
- User picks Exit → immediate stop.
- Queue exhausted AND no pending new arrivals → close session with a brief status-bar transient:
Codev: Focus mode done — all blocked builders handled.
5. State
Per-VS-Code-window. Two engineers running focus mode simultaneously each get their own session/queue snapshot — they may pick the same builder and one approval wins (the loser sees the gate-already-cleared state on next advance and skips automatically).
Acceptance criteria
-
codev.enterFocusModecommand registered; visible in palette, on Builders view title (inline action when blocked count ≥ 1), and bindable. - On entry, snapshots the current blocked set in the existing display order.
- Per builder: opens PTY, opens gate-relevant artifact (plan / spec / diff), surfaces an
actionPickwith Approve / Skip / Exit. - Approve invokes
codev.approveGatewithskipConfirmation: true; auto-advances after the gate clears. - Skip drops the builder from the session queue; never re-surfaces in this session.
- Exit immediately ends the session; leaves any opened editors untouched.
- New blocked builders that enter mid-session append to the queue.
- Session ends cleanly when queue is empty with a brief status-bar message.
- If a queued builder's gate clears via another path (e.g. approved from another window), focus mode skips it on advance without prompting.
Out of scope
- Reject action (intentionally — no
porch rejectexists today; this is approve-or-defer). - Send Message action (intentionally — focus mode is a triage loop, not an authoring surface; user exits to send messages).
- Persistent session state across VS Code restarts.
- Multi-architect coordination (intentionally — best-effort, last-write-wins via OverviewCache).
- Auto-entering focus mode when N≥X builders block.
Related
- vscode: focusing a builder PTY tab silently reveals/expands the matching builder row in the tree #790 — terminal focus → tree reveal (reuses the same reveal path).
- vscode: generalize viewPlanFile to siblings (viewSpecFile, viewReviewFile) with protocol-aware menu visibility #793 —
viewSpecFile/viewReviewFile(artifact reveal per gate). - vscode: replace popup dialogs (modals + action toasts) with keyboard-first QuickPicks for accessibility #797 —
actionPickhelper (keyboard-first prompts). - vscode: re-bucket Builders tree — actively-communicated blocked builders sort below active, truly-blocked stays on top #798 — re-bucket order (focus mode honors the new ordering).
Activity
amrmelsayed commentedon Sep 10, 2026
Cross-reference: #1672 (lane card) has been filed and defines a seam this issue should build on when it lands.
Two alignment points, both non-blocking for #800's design but worth pinning before implementation:
Queue definition. The pre-flight snapshot here derives the queue client-side (
overview.builders.filter(b => b.blocked), ordered byblockedSince). lane card: per-lane status card for fast re-orientation across architect and builder terminals #1672 specifies a Tower-assembled per-lane card whose computedWAITING ON YOUstate (ordered by age) is the same predicate with a single server-side home — and a richer one: it also knows aboutHELD(messages parked in a lane's Spec 1313 mailbox, cf. Dashboard: make the held-mail counter clickable, showing the held messages (from → to) #1450), which this issue's blocked-set pre-dates. When both exist, the focus queue should consume the card states rather than re-deriving, so focus mode,afx status --cards, and the panel strip can never disagree about who is blocked.Per-builder presentation. The step that opens the PTY + gate artifact + action pick has no "catch me up" element; lane card: per-lane status card for fast re-orientation across architect and builder terminals #1672's compact card strip (identity, ball chip, Now line, recent beats, freshness) is the natural header for each focus-mode step, so the decision is informed without scrollback.
Neither point changes this issue's UX; they change where its signal comes from. If this ships first, keep the client-side derivation but treat it as the interim implementation of the same predicate.