Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
id: bugfix-1169
title: vscode-collapse-pull-requests-
protocol: bugfix
phase: pr
plan_phases: []
current_plan_phase: null
gates:
pr:
status: approved
requested_at: '2026-07-13T03:55:54.046Z'
approved_at: '2026-07-13T06:03:16.699Z'
iteration: 1
build_complete: false
history: []
started_at: '2026-07-13T03:33:32.344Z'
updated_at: '2026-07-13T06:03:16.700Z'
pr_ready_for_human: false
47 changes: 47 additions & 0 deletions codev/state/bugfix-1169_thread.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# bugfix-1169 — vscode: collapse lower-priority sidebar views by default

## Investigate

**Issue**: 4 of the 7 Codev sidebar views (Pull Requests, Recently Closed, Team, Status)
default to fully-expanded on first install, crowding the primary surfaces
(Workspace, Agents, Backlog). VS Code gives no manifest lever for height ratios;
the only lever is defaulting lower-priority views to `visibility: "collapsed"`.

**Root cause**: `packages/vscode/package.json` `contributes.views.codev[]` — the four
views omit `"visibility"`, so VS Code applies the default (`visible`).

**Note on the issue snippet**: the real file's view entries carry `"when"` clauses
(e.g. `"codev.hasWorkspace"`) that the issue's simplified snippet dropped. Fix must
ADD `"visibility": "collapsed"` while PRESERVING each existing `when`.

**Precedent**: `codev.placeholder` in `codevPanel` already uses `"visibility": "collapsed"`.

## Fix

Added `"visibility": "collapsed"` to the four lower-priority views (pullRequests,
recentlyClosed, team, status), preserving each existing `when` clause. JSON validates.

**Release notes decision**: issue scoped dual-accumulate release-notes entries onto this
branch, but repo workflow keeps those on the divergent `docs/vscode-changelog` branch
(worktrees/changelog) so code + changelog branches reconcile cleanly at release. Asked
the architect/human: decision = leave changelog to that branch. This builder branch ships
ONLY the manifest fix. Architect handles CHANGELOG.md [Unreleased] + UNRELEASED.md Polish.

Verify via VS Code Extension Development Host smoke (first-install shows the 4 views
collapsed to headers).

## PR

PR #1171 opened. CMAP: gemini=APPROVE, claude=APPROVE, codex=REQUEST_CHANGES.

Codex was right: I'd waved off a regression test as "declarative, nothing to test", but
the repo already pins manifest contracts with Vitest (`contributes-view-gating.test.ts`,
`contributes-panel.test.ts`). Added a regression block to `contributes-view-gating.test.ts`
asserting the 4 lower-priority views carry `visibility: "collapsed"` and the 3 primary
views keep no override. `visibility` is a first-render-only string VS Code reads at
runtime — no compile error catches a dropped "collapsed" — so pinning it is warranted.
21 tests pass. Committed + pushed, PR body updated. Requested `pr` gate via porch done.

**Scope**: single declarative manifest change (4 keys added) + dual-accumulate release
notes (packages/vscode/CHANGELOG.md `[Unreleased]` + docs/releases/UNRELEASED.md Polish).
No source, no tests (declarative). Well within BUGFIX scope (<300 LOC).
8 changes: 4 additions & 4 deletions packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,10 @@
{ "id": "codev.workspace", "name": "Workspace", "when": "codev.hasWorkspace" },
{ "id": "codev.agents", "name": "Agents" },
{ "id": "codev.backlog", "name": "Backlog", "when": "codev.hasWorkspace" },
{ "id": "codev.pullRequests", "name": "Pull Requests", "when": "codev.hasWorkspace" },
{ "id": "codev.recentlyClosed", "name": "Recently Closed", "when": "codev.hasWorkspace" },
{ "id": "codev.team", "name": "Team", "when": "codev.teamEnabled && codev.hasWorkspace" },
{ "id": "codev.status", "name": "Status", "when": "codev.hasWorkspace || codev.ideMode" }
{ "id": "codev.pullRequests", "name": "Pull Requests", "when": "codev.hasWorkspace", "visibility": "collapsed" },
{ "id": "codev.recentlyClosed", "name": "Recently Closed", "when": "codev.hasWorkspace", "visibility": "collapsed" },
{ "id": "codev.team", "name": "Team", "when": "codev.teamEnabled && codev.hasWorkspace", "visibility": "collapsed" },
{ "id": "codev.status", "name": "Status", "when": "codev.hasWorkspace || codev.ideMode", "visibility": "collapsed" }
],
"codevPanel": [
{ "id": "codev.placeholder", "name": "Codev", "when": "codev.panelContainerEmpty", "visibility": "collapsed" },
Expand Down
20 changes: 20 additions & 0 deletions packages/vscode/src/__tests__/contributes-view-gating.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const PKG = JSON.parse(
interface ViewContribution {
id: string;
when?: string;
visibility?: string;
}
interface ViewsWelcomeContribution {
view: string;
Expand Down Expand Up @@ -72,6 +73,25 @@ describe('workspace-bound views are gated on codev.hasWorkspace', () => {
});
});

describe('default view visibility (#1169: reclaim sidebar vertical space)', () => {
// `visibility` is a first-render-only default string VS Code reads from the
// manifest — no compile error catches a dropped "collapsed", and it only
// affects fresh installs, so a regression would silently ship. Pin it.
it.each(['codev.pullRequests', 'codev.recentlyClosed', 'codev.team', 'codev.status'])(
'lower-priority view %s defaults to collapsed',
(id) => {
expect(viewById(id).visibility).toBe('collapsed');
},
);

it.each(['codev.workspace', 'codev.agents', 'codev.backlog'])(
'primary view %s stays expanded (no visibility override)',
(id) => {
expect(viewById(id).visibility).toBeUndefined();
},
);
});

describe('viewsWelcome (empty-window surfaces)', () => {
const loadingWelcome = viewsWelcome.find(w => w.when === '!codev.stateKnown');
const quadrantWelcomes = viewsWelcome.filter(w => w !== loadingWelcome);
Expand Down
Loading