[Routine - VT] fix(extension): dispose treeView listeners and pending reveal timer#77
Draft
winterdrive wants to merge 1 commit into
Draft
[Routine - VT] fix(extension): dispose treeView listeners and pending reveal timer#77winterdrive wants to merge 1 commit into
winterdrive wants to merge 1 commit into
Conversation
onDidExpandElement, onDidCollapseElement, onDidChangeVisibility, and the first onDidChangeSelection listener were registered without being added to context.subscriptions, so they were never explicitly disposed. Also clear the debounced reveal setTimeout on deactivation so it can't fire against a disposed treeView. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Jul 2, 2026
Draft
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Pre-flight Check
Open PRs at the time of this run:
chore: release v0.7.6(release/0.7.6-260701→main, not draft) — touches onlyCHANGELOG.md,package.json,package-lock.json.Active/remote branches inspected: various
origin/routine/vt-fix-*branches (all already merged intomain, confirmed viagit log --all), plus unrelated fork branches (Ferezoz/*,jianfulin/*) not touching this repo's open PR set.This PR only changes
src/extension.ts(treeView listener registration and a debounce-timer disposal), which does not overlap with PR #76's release-metadata-only diff or any other active branch.2. Changes
treeView.onDidExpandElement,treeView.onDidCollapseElement,treeView.onDidChangeVisibility, and the firsttreeView.onDidChangeSelectionlistener registrations incontext.subscriptions.push(...)so they are explicitly disposed on extension deactivation (previously only a second, duplicateonDidChangeSelectionlistener was disposed).revealTimeout(setTimeout) used for auto-revealing the active file, so a pending timer callback cannot fire against an already-disposedtreeViewafter deactivation.Confirmed this PR does not:
package.json.package.json/package-lock.json.3. Safety Verification
Commands run locally, all passed:
npx tsc -p ./→ passed, no errors.npm run test(runstsc -p ./ && jest --runInBand) → 25 suites / 175 tests passed.No
lintorformat:checkscript exists inpackage.json, so those steps were skipped per the routine-task instructions.4. CI / Release Gate Note
This is a daily routine Draft PR. Package version bump and
CHANGELOG.mdupdates are intentionally deferred to the weekend release/integration PR. If CI fails solely due to the repository's release-readiness/version-bump gate, that is expected behavior for a routine PR, not a code validation failure.