Route terminal output sources through active parts - #332472
Merged
Dmitriy Vasyura (dmitrivMS) merged 6 commits intoAug 26, 2026
Merged
Route terminal output sources through active parts#332472Dmitriy Vasyura (dmitrivMS) merged 6 commits into
Dmitriy Vasyura (dmitrivMS) merged 6 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
August 25, 2026 02:23
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
August 25, 2026 02:24
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Routes terminal output-source registration through active progress parts, avoiding service-wide listener accumulation.
Changes:
- Removes the shared output-source event.
- Directly notifies active rows, with per-row session filtering.
- Adds duplicate-row regression coverage.
Show a summary per file
| File | Description |
|---|---|
terminalChatService.test.ts |
Tests notification of duplicate matching rows. |
terminalChatService.ts |
Routes registrations through active progress parts. |
terminal.ts |
Updates terminal chat interfaces. |
chatTerminalToolProgressPart.ts |
Filters and attaches matching output sources. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
|
الجامد بزيادة |
Collaborator
Author
|
Copilot resolve the merge conflicts in this pull request |
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Contributor
Anthony Kim (anthonykim1)
previously approved these changes
Aug 26, 2026
Christof Marti (chrmarti)
previously approved these changes
Aug 26, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
dismissed stale reviews from Christof Marti (chrmarti) and Anthony Kim (anthonykim1)
via
August 26, 2026 08:24
38f0983
Dirk Bäumer (dbaeumer)
approved these changes
Aug 26, 2026
Dmitriy Vasyura (dmitrivMS)
deleted the
dev/dmitriv/chat-terminal-output-source-listener-leak
branch
August 26, 2026 09:40
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.
Summary
onDidRegisterOutputSourceevent fromITerminalChatServiceRoot cause
Every output-only terminal row subscribed to one service-wide
onDidRegisterOutputSourceemitter. Tool-heavy Agent Host chats accumulated one listener per rendered row until the leak detector crossed its threshold.Recent Insiders logs identify this path directly:
The output-source event had no consumers other than terminal progress rows.
TerminalChatService.registerOutputSource()now updates the source map and directly notifies its existing active-progress-part registry. The event and its emitter are removed from the service contract.Validation
npm run transpile-clientTerminalChatServicesuite: 7 passedgit diff --checkRelated issues
Related to #311225
Related to #294050
These reports contain multiple independent renderer and extension-host retention paths, so the references are intentionally non-closing.