Skip to content

[Bugfix #1182] Group idle sibling architects under 'Idle Architects' node (main always separate)#1183

Merged
amrmelsayed merged 9 commits into
mainfrom
builder/bugfix-1182
Jul 15, 2026
Merged

[Bugfix #1182] Group idle sibling architects under 'Idle Architects' node (main always separate)#1183
amrmelsayed merged 9 commits into
mainfrom
builder/bugfix-1182

Conversation

@amrmelsayed

Copy link
Copy Markdown
Collaborator

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:

Idle sibling count Rendering
0 No container, no visual change
1 The lone idle sibling keeps its own top-level (0) row (a container would save no space for one row)
≥ 2 All idle siblings fold under ▶ Idle Architects (N), collapsed by default

main is always its own row regardless of builder count — it is the always-present workspace home base (created by launchInstance on every workspace; siblings are opt-in via add-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.ts rootChildren() 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: new IdleArchitectsGroupTreeItem — label Idle Architects (N), Collapsed by default, a stable id (idle-architects-group) so VSCode persists expansion, contextValue group-idle-architects, the same neutral circle-outline/disabledForeground idle 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 into makeGroupRow(g, now, isArchitectAxis) (unchanged rendering: None for childless, Expanded for populated, openArchitectTerminal command on architect headers). New architectRootChildren() partitions groups into main (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. New idleArchitectRows() recomputes the container's children on expansion (each a childless BuilderGroupTreeItem that still opens its own terminal), so a click on a name inside the group opens that architect's terminal. getChildren dispatches on the new item type.

No extension.ts change (the accordion's onDidExpandElement only acts on BuilderTreeItem; the container toggles natively). No package.json menu change (no menu when-clause targets a Builders-view group contextValue).

Net diff: ~145 LOC src (2 files), ~277 LOC tests.

Test Plan

pnpm check-types clean, pnpm lint clean, pnpm vitest run638 pass (54 files), node esbuild.js --production bundles.

@amrmelsayed amrmelsayed merged commit e358467 into main Jul 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vscode: group idle sibling architects under 'Idle Architects' collapsed node (main always separate)

1 participant