Skip to content

Sessions: Add cross-app trust note to all workspace trust dialogs#312882

Merged
sandy081 merged 1 commit intomainfrom
sandy081/sessions-workspace-trust-note
Apr 27, 2026
Merged

Sessions: Add cross-app trust note to all workspace trust dialogs#312882
sandy081 merged 1 commit intomainfrom
sandy081/sessions-workspace-trust-note

Conversation

@sandy081
Copy link
Copy Markdown
Member

When trusting a folder or workspace from the Sessions (Agents) window, users had no indication that the trust decision also persists to the parent VS Code install. This adds an explanatory note to all trust dialog paths.

Changes

  • Shared getSessionsWindowTrustNote() function — derives the parent app name from productService.quality (stable → "Visual Studio Code", insider → "…Insiders", exploration → "…Exploration", fallback → productService.nameLong). Returns undefined when not in the sessions window, making it a no-op for regular VS Code.
  • WorkspaceTrustRequestHandler — injects IWorkbenchEnvironmentService and IProductService; appends the trust note to:
    • Resources trust dialog (onDidInitiateResourcesTrustRequest)
    • Workspace trust request dialog (onDidInitiateWorkspaceTrustRequest)
  • WorkspaceTrustUXHandler — refines IEnvironmentServiceIWorkbenchEnvironmentService; appends the trust note to:
    • Startup trust modal (onDidInitiateWorkspaceTrustRequestOnStartup)
    • Add workspace folder confirmation (onWillChangeWorkspaceFolders)

Resulting extra line, e.g.:

Trusting this folder will also mark it as trusted in Visual Studio Code.

Supersedes approach in #312449 — uses quality-derived names instead of embedded.nameShort, and covers all four trust dialog paths including the add-folder confirmation.

Copilot AI review requested due to automatic review settings April 27, 2026 19:28
When trusting a folder or workspace from the Sessions (Agents) window,
users had no indication that the trust decision also persists to the
parent VS Code install. This adds an explanatory note to all four trust
dialog paths:

- Resources trust dialog (requestResourcesTrust)
- Workspace trust request dialog (onDidInitiateWorkspaceTrustRequest)
- Startup trust modal (onDidInitiateWorkspaceTrustRequestOnStartup)
- Add workspace folder confirmation (onWillChangeWorkspaceFolders)

The note derives the parent app name from productService.quality
(stable/insider/exploration) with a fallback to productService.nameLong.

A shared getSessionsWindowTrustNote() function avoids duplication across
all dialog handlers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081 sandy081 force-pushed the sandy081/sessions-workspace-trust-note branch from a6ee527 to 64ac456 Compare April 27, 2026 19:29
@sandy081 sandy081 enabled auto-merge (squash) April 27, 2026 19:29
@sandy081 sandy081 self-assigned this Apr 27, 2026
@sandy081 sandy081 added this to the 1.118.0 milestone Apr 27, 2026
@sandy081 sandy081 added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Apr 27, 2026
@vs-code-engineering
Copy link
Copy Markdown
Contributor

This PR will be automatically cherry-picked to release/1.118 when merged.

@sandy081 sandy081 removed the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Apr 27, 2026
@sandy081 sandy081 merged commit 76cfc09 into main Apr 27, 2026
40 of 41 checks passed
@sandy081 sandy081 deleted the sandy081/sessions-workspace-trust-note branch April 27, 2026 20:02
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.

2 participants