Repository navigation
Description
Status: for discussion. This proposes a layout policy, not a fix. The decision points at the end need the owner's ruling before anything is spawned.
Problem
Three surfaces choose an editor group three different ways, none of them from the task the user is doing:
| Surface | Today |
|---|---|
| Architect terminal | Always group 1 (terminal-manager.ts, editor mode) |
| Builder / shell terminal | Group 2 if a second group exists when the terminal is first created, else group 1; never moves afterwards |
Issue preview (sidebar row or terminal #N click) |
Group 2 if it exists, else group 1 (view-issue.ts pickIssuePreviewColumn) |
| Builder file diff, multi-file review | No column passed to vscode.diff / vscode.changes; lands in whichever group last had focus |
Observed consequences: the first builder of a session often lands beside the architect in group 1 while later ones go to group 2; an issue preview opened from a builder terminal covers that terminal; a diff opened from the sidebar lands wherever the cursor last was.
The underlying mismatch: the code assigns groups by content type (architect here, builders there), while the user's mental model assigns them by role in the task (what am I reviewing, who receives the feedback). Those agree for code review and document review and collide for issue triage, where the issue is the thing being read and the architect is the receiver.
Proposed model
Two roles, resolved from content rather than ordinal position:
- Subject group: whatever the user is reading or annotating. Diffs, specs, plans, reviews, issue previews, markdown documents. Opening a subject takes focus.
- Agents group: every terminal, architect included. The receiver of feedback is whichever tab is active there. Revealing an agent never takes focus.
The agents group is identified as the group holding terminal tabs (VS Code exposes terminal tab inputs), so the model survives closing a group, reordering, and the user's choice of which side agents live on.
Placement rules
| Surface | Proposed |
|---|---|
| Architect terminal | Agents group, a tab beside the builders |
| Builder / shell terminal | Agents group, takes focus |
| Issue preview | Subject group, takes focus; architect revealed in the agents group |
| Builder file diff, multi-file review | Subject group, takes focus; that builder revealed |
| Spec / plan / review document | Subject group; the builder for that issue number revealed |
| Dev process terminal | Bottom panel, unchanged |
| Group creation | Never automatic (#804 stays). One explicit Codev: Arrange Agent Layout command creates the split and moves existing agent tabs across. |
Counterpart reveal
The receiver is derivable at each opener: a builder diff knows its builder; a spec, plan, or review resolves to its builder by issue number; an issue implies the architect. When a subject opens, reveal that tab in the agents group without focus. Ship behind a setting, default on.
Fallbacks
- One group: everything stacks in it as today; the counterpart reveal still activates a tab.
codev.terminalPosition: panel: the panel is the agents group, the editor area is the subject group. Same relationship rotated.- Sidebar clicks with no source group keep today's behaviour for the subject side.
Walkthroughs
- Click a changed file under builder 1566: diff in subject with focus, builder 1566 revealed in agents.
- Open the plan for 1592 from a gate toast: document in subject, builder 1592 revealed.
- Open an issue from the backlog: preview in subject, architect revealed. The builder read a minute ago is still a tab in agents.
- Cmd-click
#1592inside a builder terminal: preview opens in subject with focus; the clicked terminal stays visible in agents. - Open a builder from the sidebar: no subject; the terminal joins agents and takes focus.
- Switch from 1566's diff to a file under 1592: subject swaps, the revealed agent tab follows.
- Close the agents group: back to the one-group fallback; nothing is created behind the user's back.
Decision points for the owner
- The architect's home. The model moves the architect out of its fixed group 1 into the agents group with the builders. This is the one behavioural change users will notice.
- Default side. Subjects left and agents right is the proposal; the arrange command should accept either.
- Counterpart reveal default. On by default, or opt-in.
- Diff column. Diffs would take an explicit column for the first time; confirm that
preview: truenavigation walks (vscode: next-file / previous-file navigation across files in a Codev View Diff session #1060) keep reusing one tab within the subject group.
Out of scope
Cross-workspace switching (#1566) opens windows, not groups. Sequential agent cycling (#1563) moves between agent tabs and is unaffected; both lanes should merge before this is planned so their roster helpers can be reused rather than duplicated.
Relation
- vscode: don't force-create a second editor group when spawning builder terminals — attach if exists, else use the default group #804: the no-automatic-group-creation rule this proposal keeps.
- vscode: next-file / previous-file navigation across files in a Codev View Diff session #1060: diff navigation preview reuse.
- Cycle agent terminals from keyboard and Stream Deck — next/previous in the Codev sidebar Agents order #1563, vscode: Tower sidebar — cross-workspace navigation hub (machine-wide attention, switch, activate on demand) #1566: in-flight terminal navigation lanes; sequence after.
- A private layout diagram exists for this discussion; ask the vscode architect for the link.
Activity