Skip to content

vscode: clicking an architect group header in the Agents view should open that architect's terminal (parity with the builder-row click affordance) #1108

Description

@amrmelsayed

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.
  • main for null-owner builders is special. Per architectGrouping(), null spawnedByArchitect folds into the main bucket. The main group header should open the main architect terminal (consistent with the fold).
  • Stale-owner architects (a builder's spawnedByArchitect references an architect no longer in the live roster) would produce a group header that, when clicked, fails to find the architect terminal. codev.openArchitectTerminal should already handle this case gracefully (the same path the right-click action takes from Workspace > Architects); if it doesn't, that's a separate NotFound UX 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/vscodeArea: VS Code extension

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions