Sessions: Add cross-app trust note to all workspace trust dialogs#312882
Merged
Sessions: Add cross-app trust note to all workspace trust dialogs#312882
Conversation
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>
a6ee527 to
64ac456
Compare
Contributor
|
This PR will be automatically cherry-picked to |
lostintangent
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
getSessionsWindowTrustNote()function — derives the parent app name fromproductService.quality(stable→ "Visual Studio Code",insider→ "…Insiders",exploration→ "…Exploration", fallback →productService.nameLong). Returnsundefinedwhen not in the sessions window, making it a no-op for regular VS Code.WorkspaceTrustRequestHandler— injectsIWorkbenchEnvironmentServiceandIProductService; appends the trust note to:onDidInitiateResourcesTrustRequest)onDidInitiateWorkspaceTrustRequest)WorkspaceTrustUXHandler— refinesIEnvironmentService→IWorkbenchEnvironmentService; appends the trust note to:onDidInitiateWorkspaceTrustRequestOnStartup)onWillChangeWorkspaceFolders)Resulting extra line, e.g.:
Supersedes approach in #312449 — uses quality-derived names instead of
embedded.nameShort, and covers all four trust dialog paths including the add-folder confirmation.