Repository navigation
Description
Problem
In the Agents view shipped via #1106 (PR #1106), clicking a builder row opens that builder's terminal while the chevron on the left continues to handle expand / collapse — two independent click targets, the row body for the action, the chevron for the structure. That pattern doesn't extend to architect group headers in the new architect-axis grouping mode: clicking an architect header (e.g. MAIN, VSCODE) only toggles expand / collapse via the row, with no way to open that architect's terminal from the same surface. To launch the architect terminal the user has to switch to the Workspace > Architects subsection.
The asymmetry is the friction. The architect-axis grouping makes the architect first-class in the work view, but the row itself is then a less interactive surface than the builder rows nested under it — which inverts the visual hierarchy.
Expected
The architect group header should behave like a builder row: click-on-row opens that architect's terminal; the chevron remains a separate target for expand / collapse. The existing codev.openArchitectTerminal command already accepts an optional architect name argument (per #786 Phase 6, see extension.ts), so wiring it up is mechanical.
Source
The architect-axis groups are produced by architectGrouping() in packages/vscode/src/views/builder-grouping.ts. The header TreeItem is built (along with the area / stage headers) in packages/vscode/src/views/builders.ts — that's where the command property needs to be set on the architect headers specifically (not the area / stage headers, which don't have a launch affordance).
Required wiring on the architect-header TreeItem:
item.command = {
command: 'codev.openArchitectTerminal',
title: 'Open Architect Terminal',
arguments: [groupKey], // architect name
};The collapsibleState (Collapsed / Expanded) stays as today — VS Code routes chevron clicks to the expand / collapse gesture independently of the row's command, so both work without conflict (this is the same pattern the builder rows already use, where command opens the terminal and the chevron expands the changed-files list).
Scope notes
- Only the architect-axis group headers get the
command. Stage and area headers (SPECIFY,TOWER, etc.) don't represent a launchable entity — they remain pure grouping containers. mainfor null-owner builders is special. PerarchitectGrouping(), nullspawnedByArchitectfolds into themainbucket. Themaingroup header should open the main architect terminal (consistent with the fold).- Stale-owner architects (a builder's
spawnedByArchitectreferences an architect no longer in the live roster) would produce a group header that, when clicked, fails to find the architect terminal.codev.openArchitectTerminalshould already handle this case gracefully (the same path the right-click action takes from Workspace > Architects); if it doesn't, that's a separateNotFoundUX bug worth tracking under this issue's lifecycle.
Out of scope
- Touching area / stage group headers — they don't represent launchable entities.
- Right-click context menu on architect group headers (e.g. "Open Worktree Folder" parity). Could be a follow-up if the affordance matters, but the click-to-open is the primary friction.
- Adding launch affordance from area / stage modes (where architects aren't visible as headers). Workspace > Architects remains the surface for that case.
Protocol
AIR. Mechanical UI wiring, no architectural decision, well-scoped. The change is roughly a 5-line set of item.command = { ... } on the architect-header construction site in builders.ts, plus a small unit test asserting the architect header carries the expected command argument.
Related
- Agents view: architect-aware group-by axis (VSCode) #1106 Agents view: three-way group-by axis (the PR this issue extends).
- vscode: Agents view with a 3-way group-by axis (stage / area / architect) + conversational Add Architect #1104 Agents view design (the umbrella).
- Multi-architect feature is underbaked — gaps in lifecycle, persistence, and UX #786 Phase 6 — established the
codev.openArchitectTerminalcommand's optional-name argument that this issue depends on.
Activity
[AIR #1108] feat: open architect terminal on group-header click in Ag…
Merge pull request #1109 from cluesmith/builder/air-1108