Skip to content

Agents - fix edge cases for primary action in the Changes view#315389

Merged
lszomoru merged 1 commit into
mainfrom
lszomoru/electrical-warbler
May 8, 2026
Merged

Agents - fix edge cases for primary action in the Changes view#315389
lszomoru merged 1 commit into
mainfrom
lszomoru/electrical-warbler

Conversation

@lszomoru
Copy link
Copy Markdown
Member

@lszomoru lszomoru commented May 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 8, 2026 22:29
@lszomoru lszomoru enabled auto-merge (squash) May 8, 2026 22:29
@lszomoru lszomoru self-assigned this May 8, 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

This PR adjusts how the Agents window “Changes” view decides which primary actions to surface by introducing a new sessions.hasBranchChanges context key and updating action when clauses to better handle cases where git state and session-provided change lists don’t align.

Changes:

  • Add sessions.hasBranchChanges context key and plumb it from the Changes view model into the view’s scoped context.
  • Update “Mark as Done” visibility logic to distinguish “no changes” vs. merge/PR-completed states.
  • Update Copilot extension primary-action menu gating for “Create PR” / “Create Draft PR” to use sessions.hasBranchChanges.
Show a summary per file
File Description
src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts Refines “Mark as Done” action visibility based on branch-change presence and merge/PR state.
src/vs/sessions/contrib/changes/common/changes.ts Adds new ActiveSessionContextKeys.HasBranchChanges context key.
src/vs/sessions/contrib/changes/browser/changesViewModel.ts Computes hasBranchChanges as part of active session state.
src/vs/sessions/contrib/changes/browser/changesView.ts Binds/updates the new HasBranchChanges context key in the scoped Changes view context.
extensions/copilot/package.json Switches Copilot CLI “Create PR” menu when clauses to depend on sessions.hasBranchChanges.

Copilot's findings

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

Comment thread src/vs/sessions/contrib/changes/browser/changesViewModel.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

blocks-ci screenshots changed

Replace the contents of test/componentFixtures/blocks-ci-screenshots.md with:

Updated blocks-ci-screenshots.md
<!-- auto-generated by CI — do not edit manually -->

#### editor/codeEditor/CodeEditor/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/67bfb687fd2818bd53771a60660541b9ed6f38b80d37da0aac15d267ecaeacec)

#### editor/codeEditor/CodeEditor/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/0469dd8d0a587d94a1eaec514c79917b93b9a38694ef2b767bb1892819ae0a55)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/97162fc53c861ee13dc78a18e41fe3a25a42f62dc52a560510ebf084a418e1c3)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/3b7e2eb5cc9ba727e2bc1c5113c3e17d8e9a6ce9a37b77519be3716ceb9a9afa)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/97162fc53c861ee13dc78a18e41fe3a25a42f62dc52a560510ebf084a418e1c3)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/3b7e2eb5cc9ba727e2bc1c5113c3e17d8e9a6ce9a37b77519be3716ceb9a9afa)

@lszomoru lszomoru merged commit 9c6b952 into main May 8, 2026
28 of 29 checks passed
@lszomoru lszomoru deleted the lszomoru/electrical-warbler branch May 8, 2026 22:46
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 8, 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