Skip to content

Agents - clear changes when switching between sessions, but not when siwtching between changesets#323918

Merged
lszomoru merged 1 commit into
mainfrom
lszomoru/concrete-swordfish
Jul 1, 2026
Merged

Agents - clear changes when switching between sessions, but not when siwtching between changesets#323918
lszomoru merged 1 commit into
mainfrom
lszomoru/concrete-swordfish

Conversation

@lszomoru

@lszomoru lszomoru commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 1, 2026 18:32
@lszomoru
lszomoru enabled auto-merge (squash) July 1, 2026 18:32
@lszomoru lszomoru self-assigned this Jul 1, 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

Refines the Sessions “Changes” view loading behavior so the UI can distinguish between (a) switching sessions vs (b) switching changesets, enabling the view to clear the list on session switches while keeping the previous list during changeset transitions.

Changes:

  • Split loading state into granular observables (activeSessionChangesetsLoadingObs, activeSessionChangesetLoadingObs) and a combined activeSessionLoadingObs.
  • Refactored active session state computation to depend on the combined loading observable.
  • Updated the Changes view rendering logic to only early-return (preserve current list) when switching changesets, not when switching sessions.
Show a summary per file
File Description
src/vs/sessions/contrib/changes/common/changesViewService.ts Updates the service interface to expose granular + combined loading observables.
src/vs/sessions/contrib/changes/browser/changesViewService.ts Implements new loading observables and refactors active session state derivation accordingly.
src/vs/sessions/contrib/changes/browser/changesView.ts Adjusts UI rendering logic to preserve list during changeset loading but clear on session switch; updates to new loading observable name.
src/vs/sessions/contrib/changes/browser/changesMultiDiffSourceResolver.ts Switches loading checks to the renamed combined loading observable.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread src/vs/sessions/contrib/changes/browser/changesView.ts
@lszomoru
lszomoru merged commit 59253d3 into main Jul 1, 2026
30 checks passed
@lszomoru
lszomoru deleted the lszomoru/concrete-swordfish branch July 1, 2026 20:17
@vs-code-engineering vs-code-engineering Bot added this to the 1.128.0 milestone Jul 1, 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