Skip to content

Commit 2555dfc

Browse files
NagyViktNagyVikt
andauthored
Default Active Agents tree toward raw details view (#401)
Collapse Overview and Working now by default so the tree opens on Advanced details, matching the requested scan flow. Keep the template extension aligned, add explicit collapsible-state assertions, and bump the manifest version required for extension edits. Constraint: Active Agents extension edits must bump manifest version above the base branch Rejected: Expand nested raw subtrees too | larger UX shift than requested Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep workspace and template Active Agents defaults synchronized or installs will drift Tested: node --test test/vscode-active-agents-session-state.test.js Not-tested: Manual VS Code sidebar smoke test Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
1 parent 613f792 commit 2555dfc

5 files changed

Lines changed: 16 additions & 3 deletions

File tree

templates/vscode/guardex-active-agents/extension.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3049,13 +3049,15 @@ class ActiveAgentsProvider {
30493049
}),
30503050
], {
30513051
description: '1',
3052+
collapsedState: vscode.TreeItemCollapsibleState.Collapsed,
30523053
}),
30533054
];
30543055

30553056
const workingNowItems = buildWorkingNowNodes(element.sessions);
30563057
if (workingNowItems.length > 0) {
30573058
sectionItems.push(new SectionItem('Working now', workingNowItems, {
30583059
description: String(workingNowItems.length),
3060+
collapsedState: vscode.TreeItemCollapsibleState.Collapsed,
30593061
iconId: 'loading~spin',
30603062
}));
30613063
}
@@ -3096,7 +3098,7 @@ class ActiveAgentsProvider {
30963098
if (advancedItems.length > 0) {
30973099
sectionItems.push(new SectionItem('Advanced details', advancedItems, {
30983100
description: String(advancedItems.length),
3099-
collapsedState: vscode.TreeItemCollapsibleState.Collapsed,
3101+
collapsedState: vscode.TreeItemCollapsibleState.Expanded,
31003102
iconId: 'list-tree',
31013103
}));
31023104
}

templates/vscode/guardex-active-agents/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "GitGuardex Active Agents",
44
"description": "Shows live Guardex sandbox sessions and repo changes in a dedicated VS Code Active Agents sidebar.",
55
"publisher": "recodeee",
6-
"version": "0.0.18",
6+
"version": "0.0.19",
77
"license": "MIT",
88
"icon": "icon.png",
99
"engines": {

test/vscode-active-agents-session-state.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ function createMockVscode(tempRoot) {
410410
TreeItemCollapsibleState: {
411411
None: 0,
412412
Expanded: 1,
413+
Collapsed: 2,
413414
},
414415
StatusBarAlignment: {
415416
Left: 1,
@@ -2123,6 +2124,11 @@ test('active-agents extension shows grouped repo changes beside active agents',
21232124
const workingSection = await getSectionByLabel(provider, repoItem, 'Working now');
21242125
const unassignedSection = await getSectionByLabel(provider, repoItem, 'Unassigned changes');
21252126
const advancedSection = await getSectionByLabel(provider, repoItem, 'Advanced details');
2127+
const overviewSection = await getSectionByLabel(provider, repoItem, 'Overview');
2128+
2129+
assert.equal(overviewSection.collapsibleState, vscode.TreeItemCollapsibleState.Collapsed);
2130+
assert.equal(workingSection.collapsibleState, vscode.TreeItemCollapsibleState.Collapsed);
2131+
assert.equal(advancedSection.collapsibleState, vscode.TreeItemCollapsibleState.Expanded);
21262132

21272133
const { worktreeItem, sessionItem } = await getOnlyWorktreeAndSession(provider, workingSection);
21282134
assert.equal(worktreeItem, null);
@@ -2251,6 +2257,7 @@ test('active-agents extension surfaces live managed worktrees from AGENT.lock fa
22512257
'Advanced details',
22522258
]);
22532259
const workingSection = await getSectionByLabel(provider, repoItem, 'Working now');
2260+
const overviewSection = await getSectionByLabel(provider, repoItem, 'Overview');
22542261
const [projectFolder] = await provider.getChildren(workingSection);
22552262
assert.equal(projectFolder.label, 'gitguardex');
22562263
assert.equal(projectFolder.description, '1 agent · 1 file');
@@ -2264,6 +2271,9 @@ test('active-agents extension surfaces live managed worktrees from AGENT.lock fa
22642271
assert.match(sessionItem.tooltip, /Snapshot nagyviktor@edixa\.com/);
22652272

22662273
const advancedSection = await getSectionByLabel(provider, repoItem, 'Advanced details');
2274+
assert.equal(overviewSection.collapsibleState, vscode.TreeItemCollapsibleState.Collapsed);
2275+
assert.equal(workingSection.collapsibleState, vscode.TreeItemCollapsibleState.Collapsed);
2276+
assert.equal(advancedSection.collapsibleState, vscode.TreeItemCollapsibleState.Expanded);
22672277
const activeAgentTree = await getSectionByLabel(provider, advancedSection, 'Active agent tree');
22682278
const rawWorkingSection = await getSectionByLabel(provider, activeAgentTree, 'WORKING NOW');
22692279
const [rawProjectFolder] = await provider.getChildren(rawWorkingSection);

vscode/guardex-active-agents/extension.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3069,6 +3069,7 @@ class ActiveAgentsProvider {
30693069
if (workingNowItems.length > 0) {
30703070
sectionItems.push(new SectionItem('Working now', workingNowItems, {
30713071
description: String(workingNowItems.length),
3072+
collapsedState: vscode.TreeItemCollapsibleState.Collapsed,
30723073
iconId: 'loading~spin',
30733074
}));
30743075
}

vscode/guardex-active-agents/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "GitGuardex Active Agents",
44
"description": "Shows live Guardex sandbox sessions and repo changes in a dedicated VS Code Active Agents sidebar.",
55
"publisher": "recodeee",
6-
"version": "0.0.18",
6+
"version": "0.0.19",
77
"license": "MIT",
88
"icon": "icon.png",
99
"engines": {

0 commit comments

Comments
 (0)