Problem
Spawning a builder terminal unconditionally targets vscode.ViewColumn.Two (packages/vscode/src/terminal-manager.ts:336). If the user only has one editor group open, VS Code creates a new second group to host the terminal. That's intrusive — the user's existing layout gets reshaped every time a builder spawns, even if they were happily working in a single column.
Desired behavior:
- Second group exists → spawn in it (current behavior, preserved).
- No second group exists → spawn in the first / default group instead of forcing a new one into existence.
This keeps the "builders live in the right pane" affordance for users who already work in a split, while staying out of the way for users who don't.
Current state
terminal-manager.ts:330–337:
let location: vscode.TerminalLocation | vscode.TerminalEditorLocationOptions;
if (type === 'dev' || position !== 'editor') {
location = vscode.TerminalLocation.Panel;
} else if (type === 'architect') {
location = { viewColumn: vscode.ViewColumn.One };
} else {
location = { viewColumn: vscode.ViewColumn.Two }; // ← always Two, even if it doesn't exist
}
ViewColumn.Two is fixed by ordinal — VS Code creates the group on demand if it isn't there.
Proposed behavior
For terminals that today resolve to ViewColumn.Two (the else branch — builder and shell types), conditionally pick the target column:
const groupCount = vscode.window.tabGroups.all.length;
location = { viewColumn: groupCount >= 2 ? vscode.ViewColumn.Two : vscode.ViewColumn.One };
Architect terminals (ViewColumn.One) and dev/panel terminals stay exactly as they are.
Acceptance criteria
Out of scope
- A user-facing setting to choose between "force second group" (old) and "attach if exists" (new).
- Re-positioning existing builder terminals when the user later splits / unsplits groups.
- Cross-builder grouping (e.g. all builders in one group, dev terminals elsewhere).
Related
Problem
Spawning a builder terminal unconditionally targets
vscode.ViewColumn.Two(packages/vscode/src/terminal-manager.ts:336). If the user only has one editor group open, VS Code creates a new second group to host the terminal. That's intrusive — the user's existing layout gets reshaped every time a builder spawns, even if they were happily working in a single column.Desired behavior:
This keeps the "builders live in the right pane" affordance for users who already work in a split, while staying out of the way for users who don't.
Current state
terminal-manager.ts:330–337:ViewColumn.Twois fixed by ordinal — VS Code creates the group on demand if it isn't there.Proposed behavior
For terminals that today resolve to
ViewColumn.Two(theelsebranch — builder and shell types), conditionally pick the target column:Architect terminals (
ViewColumn.One) and dev/panel terminals stay exactly as they are.Acceptance criteria
ViewColumn.Twobranch today).ViewColumn.One) and dev / panel terminals are untouched.show(!focus)semantics preserved (cursor doesn't jump unexpectedly).Out of scope
Related