Skip to content

Chat memory leak fixes - #308591

Merged
roblourens merged 3 commits into
mainfrom
roblou/standard-hoverfly
Apr 8, 2026
Merged

roblourens merged 3 commits into
mainfrom
roblou/standard-hoverfly

Conversation

@roblourens

Copy link
Copy Markdown
Member

Co-authored-by: Copilot copilot@github.com

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 19:18
@roblourens roblourens self-assigned this Apr 8, 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

Addresses suspected chat-related memory leaks by ensuring more UI/template references and chat-editing entries are released, and by adding regression coverage in the ChatService test suite.

Changes:

  • Add ChatService tests to exercise session switching / reference release scenarios.
  • Adjust ChatListItemRenderer.updateViewModel() ordering and cleanup to avoid retaining rendered template elements/pool items.
  • Dispose removed chat-editing entries when deleting a file from a ChatEditingSession.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts Adds regression tests around chat model reference lifecycle and session switching behavior.
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts Clears additional template bookkeeping and fires view-model update before clearing pools; clears currentElement to release references.
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts Disposes the removed modified-file entry on delete to avoid retaining resources.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 2

roblourens and others added 2 commits April 8, 2026 12:58
Co-authored-by: Copilot <copilot@github.com>
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 2d7de178 Current: b7eed4ad

Removed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/ClaudeHarness/Dark

baseline

chat/aiCustomizations/aiCustomizationManagementEditor/ClaudeHarness/Light

baseline

@roblourens
roblourens marked this pull request as ready for review April 8, 2026 21:16
@roblourens
roblourens enabled auto-merge (squash) April 8, 2026 21:16
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Johannes Rieken (@jrieken)

Matched files:

  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts

@roblourens
roblourens merged commit 3be9f92 into main Apr 8, 2026
23 checks passed
@roblourens
roblourens deleted the roblou/standard-hoverfly branch April 8, 2026 21:26
@vs-code-engineering vs-code-engineering Bot added this to the 1.116.0 milestone Apr 8, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 23, 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