[AIR #1108] vscode: open architect terminal on Agents-view group-header click#1109
Conversation
…ents view Architect-axis group headers in the Agents view now carry a codev.openArchitectTerminal command (with the architect name as the argument), so clicking the header body opens that architect's terminal, matching the builder-row affordance. The chevron still toggles expand/collapse independently. Stage/area headers stay command-less containers. Null spawnedByArchitect folds into the main header per architectGrouping(). Adds builders-architect-header-command.test.ts covering the command presence/argument on architect headers and its absence on stage/area headers.
Architect ReviewLow-risk AIR PR. Verified the implementation independently against PR head. Implementation
const isArchitectAxis = grouping.id === 'architect';
return groups.map(g => {
const groupItem = new BuilderGroupTreeItem(...);
if (isArchitectAxis) {
groupItem.command = {
command: 'codev.openArchitectTerminal',
title: 'Open Architect Terminal',
arguments: [g.key],
};
}
...
});Test coverage
Mocks Risk and scope17 net lines in RecommendationAPPROVE. Ready for the pr gate. Architect review |
Closes #1108.
Summary
In the Agents view's architect-axis grouping mode, clicking an architect
group header (e.g.
MAIN,VSCODE) now opens that architect's terminal,matching the builder-row affordance. The chevron continues to toggle
expand/collapse independently (VS Code routes the row
commandand the chevrongesture separately — the same pattern builder rows already use).
This removes the asymmetry where the architect-axis grouping made the architect
first-class, but its header was a less interactive surface than the builder
rows nested under it.
Changes
packages/vscode/src/views/builders.ts—rootChildren()now setsitem.command = { command: 'codev.openArchitectTerminal', title: 'Open Architect Terminal', arguments: [g.key] }on each group header only when the active grouping axis is
architect(
grouping.id === 'architect').g.keyis the architect name.packages/vscode/src/__tests__/builders-architect-header-command.test.ts—new unit tests.
Key decisions
SPECIFY, …) and area(
TOWER, …) headers name no launchable entity, so they stay command-lesscontainers. The gate is
grouping.id === 'architect', checked once per render.mainfold preserved. A nullspawnedByArchitectfolds into themainbucket in
architectGrouping(); themainheader therefore opens the mainarchitect terminal (
arguments: ['main']), consistent with the fold.codev.openArchitectTerminalalready acceptsthe optional architect-name argument (Multi-architect feature is underbaked — gaps in lifecycle, persistence, and UX #786 Phase 6) and already handles a
stale / not-found owner gracefully — it shows a
No '<name>' architect foundwarning (the same path the Workspace > Architects right-click takes). So the
stale-owner edge from the issue's scope notes needs no extra work here.
package.json/ menu changes. This is a rowcommand(left-click),not a
view/item/contextmenu entry, so no contribution-point wiring isneeded.
Test plan
pnpm test:unit(vscode package): 43 files / 516 tests pass, including the4 new tests:
codev.openArchitectTerminalwith the architectname as the argument;
spawnedByArchitectyields amainheader that opens the mainterminal;
porch check: ✓ build ✓ tests.Out of scope (per issue)
surface there).