Skip to content

Sessions - refactor and fix bug with file tracking#4665

Open
lszomoru wants to merge 1 commit intomainfrom
lszomoru/fiscal-scallop
Open

Sessions - refactor and fix bug with file tracking#4665
lszomoru wants to merge 1 commit intomainfrom
lszomoru/fiscal-scallop

Conversation

@lszomoru
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 21:26
@lszomoru lszomoru enabled auto-merge March 24, 2026 21:26
@lszomoru lszomoru self-assigned this Mar 24, 2026
@lszomoru lszomoru added this to the 1.114.0 milestone Mar 24, 2026
Copy link
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 repository-change tracking for Copilot CLI Sessions to avoid stale/incorrect trackers and simplify lifecycle management, addressing a bug in file/change tracking while sessions are active.

Changes:

  • Remove per-session Disposable tracking of repository trackers in CopilotCLIChatSessionParticipant, and instead rely on the shared ChatSessionRepositoryTracker to manage tracker lifecycle.
  • Update ChatSessionRepositoryTracker.trackRepositoryChanges to be Promise<void> and replace stale trackers when the underlying RepositoryState instance changes.
  • Adjust the unit test mock to match the new trackRepositoryChanges return type.

Reviewed changes

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

File Description
src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts Updates the repository tracker mock to return void instead of Disposable.None.
src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts Removes per-session tracker disposal bookkeeping and calls repository tracking without storing a disposable.
src/extension/chatSessions/vscode-node/chatSessionRepositoryTracker.ts Refactors repository tracking to be internally managed, and adds logic to detect/replace stale trackers based on RepositoryState identity.

@lszomoru lszomoru added this pull request to the merge queue Mar 24, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 24, 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