Skip to content

feat: enhance session changeset handling with deferred refresh logic#318733

Merged
DonJayamanne merged 2 commits into
mainfrom
agents/watch-the-recording-users-donjaya-f0d6a2e3
May 28, 2026
Merged

feat: enhance session changeset handling with deferred refresh logic#318733
DonJayamanne merged 2 commits into
mainfrom
agents/watch-the-recording-users-donjaya-f0d6a2e3

Conversation

@DonJayamanne
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 28, 2026 11:54
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

Adds a deferred-refresh path for session-wide ("static") changesets that mirrors the existing uncommitted-refresh deferral: when a subscriber arrives before the session's working directory is known, the refresh is queued and drained on session materialization/restore, and dropped if the last subscriber leaves first.

Changes:

  • New _pendingSessionRefreshes set with _triggerSessionRefresh helper, drained alongside uncommitted refreshes and cleared on disposal / last-subscriber.
  • Both onFirstSubscriber Session-kind and Uncommitted fall-through paths now route through the new helper instead of calling refreshSessionChangeset directly.
  • Added two unit tests covering deferred refresh on materialization and drop-on-unsubscribe.
Show a summary per file
File Description
src/vs/platform/agentHost/node/agentHostChangesetCoordinator.ts Adds deferred session-changeset refresh queue, helper, drain/cleanup; updates docstrings (one got corrupted)
src/vs/platform/agentHost/test/node/agentHostChangesetCoordinator.test.ts Adds tests for defer-until-materialized and drop-on-last-subscriber behaviors

Copilot's findings

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

Comment thread src/vs/platform/agentHost/node/agentHostChangesetCoordinator.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@DonJayamanne DonJayamanne marked this pull request as ready for review May 28, 2026 12:12
@DonJayamanne DonJayamanne enabled auto-merge (squash) May 28, 2026 12:12
@DonJayamanne DonJayamanne merged commit c448461 into main May 28, 2026
25 checks passed
@DonJayamanne DonJayamanne deleted the agents/watch-the-recording-users-donjaya-f0d6a2e3 branch May 28, 2026 12:55
@vs-code-engineering vs-code-engineering Bot added this to the 1.123.0 milestone May 28, 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