Skip to content

debt - fix some leaks found by copilot - #293685

Merged
Benjamin Pasero (bpasero) merged 1 commit into
mainfrom
ben/robust-marten
Feb 7, 2026
Merged

Benjamin Pasero (bpasero) merged 1 commit into
mainfrom
ben/robust-marten

Conversation

@bpasero

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 7, 2026 19:18
@vs-code-engineering vs-code-engineering Bot added this to the February 2026 milestone Feb 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses event-listener and event-subscription leaks across several workbench components by ensuring subscriptions are properly registered with the owning DisposableStore/Disposable lifecycle.

Changes:

  • Dispose DOM event listeners in WalkThroughPart via the existing addEventListener + DisposableStore pattern.
  • Register remote terminal channel event subscriptions with _register so they are disposed with the backend.
  • Ensure editor/widget-scoped event subscriptions in Interactive Editor, Edit Sessions UI, and Server services are disposed appropriately (including DPR monitor cleanup).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.ts Ensures the click handler is disposed with this.disposables using the existing disposable DOM-listener helper.
src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts Registers remote channel event listeners with _register to avoid leaking backend subscriptions.
src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts Moves previously untracked editor/config subscriptions into _widgetDisposableStore so they’re cleared on input changes.
src/vs/workbench/contrib/editSessions/browser/editSessions.contribution.ts Disposes the extension-change listener with the quick pick’s DisposableStore.
src/vs/server/node/serverServices.ts Ensures the log level change listener is disposed via the passed-in disposables.
src/vs/base/browser/pixelRatio.ts Disposes the matchMedia listener on DevicePixelRatioMonitor disposal to prevent lingering window listeners.

@roblourens roblourens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@bpasero
Benjamin Pasero (bpasero) merged commit a4b17ff into main Feb 7, 2026
23 of 24 checks passed
@bpasero
Benjamin Pasero (bpasero) deleted the ben/robust-marten branch February 7, 2026 19:38
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants