Skip to content

sessions - when applying changes, offer action to open - #298718

Merged
Benjamin Pasero (bpasero) merged 2 commits into
mainfrom
ben/copilot-worktree-2026-03-02T10-54-44
Mar 2, 2026
Merged

Benjamin Pasero (bpasero) merged 2 commits into
mainfrom
ben/copilot-worktree-2026-03-02T10-54-44

Conversation

@bpasero

Copy link
Copy Markdown
Contributor

No description provided.

@bpasero Benjamin Pasero (bpasero) added this to the March 2026 milestone Mar 2, 2026
Copilot Bot review requested due to automatic review settings March 2, 2026 14:24
@bpasero
Benjamin Pasero (bpasero) enabled auto-merge (squash) March 2, 2026 14:24

ghost 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

Adds an “Open in VS Code” follow-up action after applying session changes to the parent repository in the Sessions window, improving the workflow from “apply” to “continue working in desktop VS Code”.

Changes:

  • Adds an “Open in VS Code” notification action after successful/partial apply-to-parent-repo operations.
  • Switches apply result notifications to notificationService.notify(...) to support actions.
  • Introduces opener/product service usage to build and open a vscode://file/... URL.

Comment on lines +151 to +168
run: () => {
const scheme = productService.quality === 'stable'
? 'vscode'
: productService.quality === 'exploration'
? 'vscode-exploration'
: 'vscode-insiders';

const params = new URLSearchParams();
params.set('windowId', '_blank');
params.set('session', activeSession.resource.toString());

openerService.open(URI.from({
scheme,
authority: Schemas.file,
path: repoRoot.path,
query: params.toString(),
}), { openExternal: true });
}

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openFolderAction.run calls openerService.open(...) but doesn't await or return the promise. If the open fails (e.g. protocol handler missing), the rejection can go unobserved and the notification action may appear to succeed. Make run async (or return the promise) and await openerService.open(...).

Copilot uses AI. Check for mistakes.
Comment on lines +152 to +156
const scheme = productService.quality === 'stable'
? 'vscode'
: productService.quality === 'exploration'
? 'vscode-exploration'
: 'vscode-insiders';

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The protocol scheme is derived from productService.quality and defaults to 'vscode-insiders' for any other value. This can produce an incorrect protocol in non-standard builds (e.g. code-oss) and duplicates logic that IProductService.urlProtocol already provides. Prefer using productService.urlProtocol for the scheme here.

Suggested change
const scheme = productService.quality === 'stable'
? 'vscode'
: productService.quality === 'exploration'
? 'vscode-exploration'
: 'vscode-insiders';
const scheme = productService.urlProtocol;

Copilot uses AI. Check for mistakes.
@bpasero
Benjamin Pasero (bpasero) deleted the ben/copilot-worktree-2026-03-02T10-54-44 branch March 2, 2026 14:37
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants