Skip to content

[Routine - VT] fix(extension): refresh treeView description after workspace folder changes - #115

Merged
winterdrive merged 1 commit into
mainfrom
routine/vt-fix-scope-description-stale-260813
Aug 16, 2026
Merged

[Routine - VT] fix(extension): refresh treeView description after workspace folder changes#115
winterdrive merged 1 commit into
mainfrom
routine/vt-fix-scope-description-stale-260813

Conversation

@winterdrive

Copy link
Copy Markdown
Owner

1. Pre-flight Check

Checked open PRs and active routine/* branches before selecting a target (see full list below). This PR touches only src/extension.ts, which is not touched by any currently open PR:

PR Files touched
#114 src/core/ProjectExplorer.ts, src/test/unit/projectExplorerMaxResults.test.ts
#113 src/sendTo.ts
#112 src/core/FileEntryMatcher.ts, src/test/unit/fileEntryMatcher.test.ts
#111 src/core/GroupManager.ts, src/test/unit/groupManagerNonArrayConfig.test.ts
#110 mcp-server/package*.json, package*.json (dependency bump only)
#109 src/mcp/SkillGenerator.ts
#108 src/dragAndDrop.ts, src/test/unit/dragIsDescendantCycleGuard.test.ts
#107 src/core/AutoGrouper.ts, src/test/unit/autoGrouperBookmarks.test.ts
#106 i18n/*.json, src/provider.ts
#105 src/commands.ts, src/i18n.ts, src/test/unit/copyGroupName.test.ts
#104 mcp-server/src/server.ts

No open PR or active routine branch touches src/extension.ts, so this change does not overlap with any in-flight work.

2. Changes

onDidChangeWorkspaceFolders in src/extension.ts calls provider.reinitializeScopes(), which prunes activeScopeIds entries for any scope whose workspace folder was just removed. However the TreeView.description string (set once at activate() time from provider.computeScopeDescription()) was never recomputed after that prune, so the panel header could keep showing a stale scope label/count (e.g. still say "2 scopes" after one of the active scopes' folders was removed from the workspace).

Fix: recompute and re-assign treeView.description right after reinitializeScopes(), mirroring the same pattern already used in src/commands.ts for the scope-selection commands.

This PR does not modify any VS Code command registrations, contributed configuration keys (package.json), dependencies, or the tab-group serialization/storage format. It is a 3-line, single-file change.

3. Safety Verification

Commands run locally, all passed:

  • npx tsc -p ./ — no type errors
  • npm run test (tsc -p ./ && jest --runInBand) — 31 test suites / 203 tests passed

No lint or format:check script exists in package.json, so those steps were skipped.

4. CI / Release Gate Note

This is a daily routine Draft PR. Package version bump and CHANGELOG.md updates are intentionally deferred to the weekend release/integration PR. If CI fails solely due to the repository's version-bump gate, that is expected release-readiness behavior for a routine PR, not a code validation failure.

…hanges

reinitializeScopes() prunes activeScopeIds for scopes whose workspace
folder was removed, but the panel description text (set once at
activation) was never recomputed, so it could keep showing a stale
scope name/count after a folder add/remove.
@winterdrive winterdrive added the routine Daily automated maintenance PR label Aug 13, 2026
@winterdrive
winterdrive marked this pull request as ready for review August 16, 2026 15:32
@winterdrive
winterdrive merged commit 6f26ba9 into main Aug 16, 2026
7 checks passed
@winterdrive winterdrive mentioned this pull request Aug 16, 2026
2 tasks
winterdrive added a commit that referenced this pull request Aug 16, 2026
Pre-release batch (odd minor) bundling 11 routine bug-fix PRs (#104-#109,
#111-#115) plus a dependabot dependency bump (#110), all independently
reviewed before merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

routine Daily automated maintenance PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant