[Bugfix #1182] Group idle sibling architects under 'Idle Architects' node (main always separate)#1183
Merged
Merged
Conversation
…cts' node (main always separate)
…separate, transitions)
amrmelsayed
added a commit
that referenced
this pull request
Jul 15, 2026
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.
Fixes #1182
Summary
Follow-up to #1174 / PR #1175. Now that childless architects stay visible under the architect axis of the Agents view, a workspace running several quiet siblings (reviewer, demos, ide, mobile, …) accumulates 3-5 childless architect rows that displace real builder work below the fold. This groups idle sibling architects (zero builders, never
main) under a single collapsed "Idle Architects (N)" container — but only when ≥ 2 are idle. Scope is architect-axis only; stage and area axes are unchanged.Behavior:
(0)row (a container would save no space for one row)▶ Idle Architects (N), collapsed by defaultmainis always its own row regardless of builder count — it is the always-present workspace home base (created bylaunchInstanceon every workspace; siblings are opt-in viaadd-architect), so burying it behind a chevron is a bad trade for one row of space. Populated architects (main + siblings) render as their own top-level groups with builders expanded, unchanged from #1174. Ordering: main → populated siblings → idle container (bottom).Root Cause
packages/vscode/src/views/builders.tsrootChildren()mapped every architect group (including the childless ones #1174 made visible) to its own top-level header. With N idle siblings that is N rows of chevron-less(0)headers, each ~22px, pushing actual builder rows off-screen — the proportion cost #1174 traded for never losing an architect row mid-session.Fix
builder-tree-item.ts: newIdleArchitectsGroupTreeItem— labelIdle Architects (N),Collapsedby default, a stableid(idle-architects-group) so VSCode persists expansion,contextValuegroup-idle-architects, the same neutralcircle-outline/disabledForegroundidle glyph a childless architect carries, and no command bound (a header click only toggles — there is no single terminal for a container of N architects).builders.ts: extracted the inline group-row builder intomakeGroupRow(g, now, isArchitectAxis)(unchanged rendering:Nonefor childless,Expandedfor populated,openArchitectTerminalcommand on architect headers). NewarchitectRootChildren()partitions groups intomain(always own row), populated siblings (own rows), and idle siblings — emitting the container only when idle ≥ 2, else rendering the lone idle sibling as its own row. NewidleArchitectRows()recomputes the container's children on expansion (each a childlessBuilderGroupTreeItemthat still opens its own terminal), so a click on a name inside the group opens that architect's terminal.getChildrendispatches on the new item type.No
extension.tschange (the accordion'sonDidExpandElementonly acts onBuilderTreeItem; the container toggles natively). Nopackage.jsonmenu change (no menuwhen-clause targets a Builders-view groupcontextValue).Net diff: ~145 LOC src (2 files), ~277 LOC tests.
Test Plan
pnpm check-typesclean,pnpm lintclean,pnpm vitest run→ 638 pass (54 files),node esbuild.js --productionbundles.builders-idle-architects-group.test.ts(11 cases): fresh workspace (main only, no container); 1 idle sibling → own row, no container; 2 idle siblings → collapsedIdle Architects (2); 4 idle / everyone idle; main-always-separate under every combo; ordering (main → populated → container); the container's neutral glyph + no-command +contextValue; expansion yields the individual architect rows each opening its terminal; both transitions (sibling gains a builder → graduates out; drops to 1 idle → container dissolves to a lone row); stage axis unaffected.builders-childless-architect-header.test.tsthat pinned the pre-vscode: group idle sibling architects under 'Idle Architects' collapsed node (main always separate) #1182 behavior (3 childless architects all top-level) to the lone-idle-sibling case — the ≥2 interaction is now covered by the new file.