Context
Spec 786 landed an Architects tree under the Workspace view that shows every registered architect for the current workspace (main plus any siblings added via afx workspace add-architect --name <name>), with right-click Remove on siblings and live-refresh on the architects-updated SSE event. Three follow-up gaps remain.
Gap 1 — No "Add Architect" UI affordance
Today, registering a sibling architect can only be done from the CLI:
afx workspace add-architect --name ob-refine
There is no codev.addArchitect command, no "+" button on the Architects tree title bar or row, no QuickPick name prompt anywhere in the extension. A code comment at packages/vscode/src/views/workspace.ts:57 explicitly acknowledges the gap ("codev.removeArchitect (and any future codev.addArchitect UI) can call .refresh() after mutating Tower").
Suggested fix. Add a codev.addArchitect command + a Workspace view affordance to trigger it:
- A title-bar
+ action on the Architects parent row, or an inline "+ Add Architect" row underneath the architect children
- QuickPick (or
vscode.window.showInputBox) to prompt for the architect name; validate via the same rule Tower uses (validateArchitectName rejects main and other reserved names)
- On success, call
client.addArchitect(workspacePath, name) and let the existing architects-updated SSE refresh re-render the tree
Gap 2 — Cmd/Ctrl+K A always defaults to main
codev.openArchitectTerminal accepts an optional architectName argument (extension.ts:405), and Architects tree rows correctly pass the name on click. But no-arg invocations (keyboard shortcut Cmd/Ctrl+K A and Command Palette → "Codev: Open Architect Terminal") always default to main (extension.ts:415). When the workspace has siblings registered, there's no keyboard-driven way to pick a non-main architect — you must click the row in the sidebar.
Suggested fix. When codev.openArchitectTerminal is invoked with no argument and the workspace has N > 1 architects, show a QuickPick listing all of them (alphabetical, main first) and open the picked one. When N == 1, preserve today's behavior (open main directly, no picker). The QuickPick can reuse the same client.getWorkspaceState(workspacePath) call already made at line 417.
Gap 3 — Lowercase main breaks the Workspace view label convention
Every other row in the Workspace view uses Title Case for the visible label:
- Open Architect / Open Web Interface / Spawn Builder / New Shell / Start Dev Server / Stop Dev Server
- Parent: Architects, Open Dev URL rows (user-defined labels, also typically Title Case)
But the architect child rows render the raw architect name verbatim — for the default architect, that's main (all lowercase). It visually stands out as the only lowercase row in the entire Workspace tree, breaking the convention.
Suggested fix. Render the display label in Title Case while keeping the internal architect name (the identifier passed to openArchitectTerminal / removeArchitect) unchanged. Decide:
- Option A — Display-only capitalization.
Main (capitalize first letter); siblings render as the user typed them (e.g. ob-refine stays ob-refine). Minimum-change, but mixed casing across rows.
- Option B — Display name field. Tower exposes a
displayName alongside name; the extension renders displayName ?? capitalize(name). Requires a Tower API addition; gives users control over how their architects appear in the sidebar.
In either case, the internal identifier (main etc.) must stay lowercase because it's referenced everywhere (validateArchitectName, the architect:<name> send-message form, builder spawn affinity).
File to change. packages/vscode/src/views/workspace.ts:269 (new vscode.TreeItem(name) → wrap name in a display-name helper).
Out of scope (track separately if needed)
Acceptance
- A user can register a new sibling architect entirely from the VS Code extension UI, without dropping to the CLI.
Cmd/Ctrl+K A correctly handles single-architect (opens main directly) and multi-architect (picker) workspaces.
- The Architects tree rows visually match the casing convention of the rest of the Workspace view.
Related
Discovered while
Inventorying the multi-architect surface in the extension during the README revision pass (see docs/vscode-readme-revision branch).
Context
Spec 786 landed an Architects tree under the Workspace view that shows every registered architect for the current workspace (
mainplus any siblings added viaafx workspace add-architect --name <name>), with right-click Remove on siblings and live-refresh on thearchitects-updatedSSE event. Three follow-up gaps remain.Gap 1 — No "Add Architect" UI affordance
Today, registering a sibling architect can only be done from the CLI:
There is no
codev.addArchitectcommand, no "+" button on the Architects tree title bar or row, no QuickPick name prompt anywhere in the extension. A code comment atpackages/vscode/src/views/workspace.ts:57explicitly acknowledges the gap ("codev.removeArchitect(and any futurecodev.addArchitectUI) can call.refresh()after mutating Tower").Suggested fix. Add a
codev.addArchitectcommand + a Workspace view affordance to trigger it:+action on the Architects parent row, or an inline "+ Add Architect" row underneath the architect childrenvscode.window.showInputBox) to prompt for the architect name; validate via the same rule Tower uses (validateArchitectNamerejectsmainand other reserved names)client.addArchitect(workspacePath, name)and let the existingarchitects-updatedSSE refresh re-render the treeGap 2 —
Cmd/Ctrl+K Aalways defaults tomaincodev.openArchitectTerminalaccepts an optionalarchitectNameargument (extension.ts:405), and Architects tree rows correctly pass the name on click. But no-arg invocations (keyboard shortcutCmd/Ctrl+K Aand Command Palette → "Codev: Open Architect Terminal") always default tomain(extension.ts:415). When the workspace has siblings registered, there's no keyboard-driven way to pick a non-mainarchitect — you must click the row in the sidebar.Suggested fix. When
codev.openArchitectTerminalis invoked with no argument and the workspace has N > 1 architects, show a QuickPick listing all of them (alphabetical,mainfirst) and open the picked one. When N == 1, preserve today's behavior (openmaindirectly, no picker). The QuickPick can reuse the sameclient.getWorkspaceState(workspacePath)call already made at line 417.Gap 3 — Lowercase
mainbreaks the Workspace view label conventionEvery other row in the Workspace view uses Title Case for the visible label:
But the architect child rows render the raw architect name verbatim — for the default architect, that's
main(all lowercase). It visually stands out as the only lowercase row in the entire Workspace tree, breaking the convention.Suggested fix. Render the display label in Title Case while keeping the internal architect name (the identifier passed to
openArchitectTerminal/removeArchitect) unchanged. Decide:Main(capitalize first letter); siblings render as the user typed them (e.g.ob-refinestaysob-refine). Minimum-change, but mixed casing across rows.displayNamealongsidename; the extension rendersdisplayName ?? capitalize(name). Requires a Tower API addition; gives users control over how their architects appear in the sidebar.In either case, the internal identifier (
mainetc.) must stay lowercase because it's referenced everywhere (validateArchitectName, thearchitect:<name>send-message form, builder spawn affinity).File to change.
packages/vscode/src/views/workspace.ts:269(new vscode.TreeItem(name)→ wrapnamein a display-name helper).Out of scope (track separately if needed)
Codev: Send Message(the no-arg flow may not surface sibling architects as targets).Acceptance
Cmd/Ctrl+K Acorrectly handles single-architect (opensmaindirectly) and multi-architect (picker) workspaces.Related
architects-updatedSSE event — already landed)Discovered while
Inventorying the multi-architect surface in the extension during the README revision pass (see
docs/vscode-readme-revisionbranch).