Skip to content

refactor: update session management to use onDidDispose for cleanup and lock folder group for existing sessions#312562

Merged
TylerLeonhardt merged 1 commit intomainfrom
tyler/silent-quokka
Apr 25, 2026
Merged

refactor: update session management to use onDidDispose for cleanup and lock folder group for existing sessions#312562
TylerLeonhardt merged 1 commit intomainfrom
tyler/silent-quokka

Conversation

@TylerLeonhardt
Copy link
Copy Markdown
Member

Simplifying the options logic sets us up for success to add worktree support.

…nd lock folder group for existing sessions

Simplifying the options logic sets us up for success to add worktree support.
Copilot AI review requested due to automatic review settings April 25, 2026 21:32
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) April 25, 2026 21:32
@TylerLeonhardt TylerLeonhardt self-assigned this Apr 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors Claude chat session input-state lifecycle management to use ChatSessionInputState.onDidDispose for deterministic cleanup, and adjusts “folder” option locking behavior to be driven by sessionResource (locking for existing/started sessions).

Changes:

  • Replaced WeakRef/FinalizationRegistry-based cleanup with state.onDidDispose-driven disposal of per-input-state reactive pipelines.
  • Updated session-start/locking logic so the folder option group locks when getChatSessionInputState is called with a sessionResource.
  • Updated unit test coverage and internal documentation (AGENTS.md) to match the new lifecycle + locking behavior.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/vscode-node/claudeChatSessionContentProvider.ts Removes GC-based cleanup + markSessionStarted; disposes per-state autoruns via onDidDispose and locks folder group based on sessionResource.
extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeChatSessionContentProvider.spec.ts Updates expectations to validate folder-locking behavior for existing sessions via sessionResource.
extensions/copilot/src/extension/chatSessions/claude/AGENTS.md Updates design notes to document onDidDispose lifetime management and revised session-start signal behavior.

Copilot's findings

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

@TylerLeonhardt TylerLeonhardt merged commit 4a3156a into main Apr 25, 2026
44 of 45 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/silent-quokka branch April 25, 2026 22:12
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants