Repository navigation
Only track server-created work done progress reporters - #1907
Merged
Dirk Bäumer (dbaeumer) merged 1 commit intoOct 22, 2026
Merged
Conversation
WorkDoneProgressReporterImpl added every reporter to a static Instances map, including those attached to client-provided workDoneTokens, and removed it only in done(). Handlers that never call done() leaked one entry per request carrying a workDoneToken. Only reporters from createWorkDoneProgress() can be cancelled via window/workDoneProgress/cancel, so move the map to WorkDoneProgressServerReporterImpl. Also drop the unreachable NullProgressServerReporter check in the cancel handler; those reporters were never in the map.
There was a problem hiding this comment.
🟢 Approval recommended
The focused change removes the reported retention path while preserving progress delivery and server-created reporter cancellation.
No open issues 🎉
What changed in this PR
Fixes #1906 by preventing request-associated work done progress reporters from being retained when handlers omit done().
Changes:
- Track only server-created reporters, preserving their cancellation and cleanup behavior.
- Simplify cancellation handling by removing the unreachable null-reporter check.
| File | Description |
|---|---|
server/src/common/progress.ts |
Moves reporter tracking to the server-created subclass and updates cancellation lookup. |
Review effort: Balanced
Dirk Bäumer (dbaeumer)
approved these changes
Oct 22, 2026
Dirk Bäumer (dbaeumer)
enabled auto-merge
October 22, 2026 15:21
Dirk Bäumer (dbaeumer)
disabled auto-merge
October 22, 2026 15:21
Dirk Bäumer (dbaeumer)
enabled auto-merge (squash)
October 22, 2026 15:21
Alex Ross (alexr00)
approved these changes
Oct 22, 2026
Federico Brancasi (federicobrancasi)
approved these changes
Oct 22, 2026
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.
Fixes: #1906
WorkDoneProgressReporterImplkept every reporter in a staticInstancesmap untildone(), so handlers that ignore their reporter leaked one entry per request carrying a clientworkDoneToken.InstancestoWorkDoneProgressServerReporterImpl; only reporters fromcreateWorkDoneProgress()can be cancelled viawindow/workDoneProgress/cancel, so only those are tracked.NullProgressServerReportercheck in the cancel handler.