Skip to content

Agents - Fix session diff statistics for inactive folder sessions - #342099

Merged
Ladislau Szomoru (lszomoru) merged 1 commit into
mainfrom
lszomoru/agents/fix-session-diff-statistics-regression
Oct 16, 2026
Merged

Ladislau Szomoru (lszomoru) merged 1 commit into
mainfrom
lszomoru/agents/fix-session-diff-statistics-regression

Conversation

@lszomoru

Copy link
Copy Markdown
Member

This pull request addresses a regression where the diff statistics for folder sessions were only displayed while the session was active. The issue arose because the client was not storing a zero summary for inactive sessions, leading to a fallback on branch changes that only loaded when the session was active.

Changes made:

  • Updated the setChangesSummary method to properly handle zero summaries by normalizing incoming summaries and ensuring that a reported zero replaces an unset summary.
  • Added a regression test to verify that zero summaries are correctly handled for both active and inactive folder sessions.

Key points:

  • The fix ensures that folder sessions with no tracked edits show no diff stats in both the list and hover, regardless of their active state.
  • The active session's title bar and changes pill remain unaffected, still displaying the focused chat's changes.
  • All relevant tests have been updated and pass successfully, confirming the fix.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 15:53

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.

🟢 Approval recommended

The narrow fix has focused regression coverage and no identified actionable defects; tests were not executed during this review.

0 open findings

What changed in this PR

Fixes inactive folder-session diff statistics by preserving reported zero summaries instead of treating them as missing.

Changes:

  • Normalizes summaries before comparison, distinguishing zero from unset values.
  • Adds regression coverage for zero summaries received through session listing and notifications.
File Description
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​localAgentHostSessionsProvider.test.ts Tests zero-summary retention and statistics lookup.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​baseAgentHostSessionsProvider.ts Stores authoritative zero summaries to prevent fallback.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 3629e03c Current: 75ba3650

Changed (1)

sessions/sessionActivityBar/sessionActivityBar/SubmenuOpen/Light
Before After
before after

@lszomoru
Ladislau Szomoru (lszomoru) merged commit 9769783 into main Oct 16, 2026
81 of 83 checks passed
@lszomoru
Ladislau Szomoru (lszomoru) deleted the lszomoru/agents/fix-session-diff-statistics-regression branch October 16, 2026 18:25
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 16, 2026
Henning Dieterichs (hediet) added a commit that referenced this pull request Oct 26, 2026
…342131)

The Session Activity Bar `SubmenuOpen` fixture produces flaky screenshot
comparisons. Mark it as `animated` across all themes so it stays
available in Component Explorer but is excluded from automated
screenshot capture.

The same
`sessions/sessionActivityBar/sessionActivityBar/SubmenuOpen/Light` image
pair appears in these screenshot reports:

- [#342109 — Honor side placement for agent-session links in editor
windows](#342109 (comment))
- [#342081 — Support opening links directly from Quick
Open](#342081 (comment))
- [#342099 — Fix session diff statistics for inactive folder
sessions](#342099 (comment)),
with the before/after images reversed.
- [#342079 — Update distro for Copilot BYOK voice speech
proposal](#342079 (comment))

Validation: editor diagnostics and `git diff --check` passed. No runtime
tests were run for this metadata-only change.

Fixes #342130
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