[WIP] Add compatible canvases to the Agents window - #335951
Draft
Ulugbek Abdullaev (ulugbekna) wants to merge 6 commits into
Draft
[WIP] Add compatible canvases to the Agents window#335951Ulugbek Abdullaev (ulugbekna) wants to merge 6 commits into
Ulugbek Abdullaev (ulugbekna) wants to merge 6 commits into
Conversation
Integrate runtime-owned canvases through AHP with isolated native presentation, exact-owner approval, no-turn retention, and explicit recovery. Keep the source-built local preview disabled by default with separate SDK/runtime release and enablement gates. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Ulugbek Abdullaev (ulugbekna)
September 12, 2026 10:30
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
External views can survive renderer restoration and canvas icon updates are not projected into canonical state.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced
Findings: 2
Open findings (2)
What changed in this PR
Adds an opt-in native canvas preview to the Agents window, integrating provider-owned canvases across Agent Host protocol state, Sessions UI, and isolated Integrated Browser presentation.
Changes:
- Adds canvas discovery, lifecycle, persistence, action routing, and SDK compatibility support.
- Adds native canvas editors with accessibility, theming, permissions, and file-trust handling.
- Adds targeted unit, integration, and smoke coverage.
| File | Description |
|---|---|
build/npm/copilotSdkCanvasPatch.ts |
Validates and applies the SDK backport. |
src/vs/platform/agentHost/common/agentHostCanvasValidation.ts |
Validates canvas protocol data. |
src/vs/platform/agentHost/common/agentHostCanvases.ts |
Defines canvas service contracts. |
src/vs/platform/agentHost/common/agentHostExtensionProtocol.ts |
Adds explicit initialization negotiation. |
src/vs/platform/agentHost/common/ahpJsonlLogger.ts |
Redacts transient canvas sources. |
src/vs/platform/agentHost/common/state/protocol/channels-canvas/* |
Adds generated canvas protocol state and operations. |
src/vs/platform/agentHost/node/agentHostCanvasOperationLedger.ts |
Handles bounded, idempotent operations. |
src/vs/platform/agentHost/node/agentHostCanvasesService.ts |
Implements authoritative canvas lifecycle. |
src/vs/platform/agentHost/node/copilot/copilotCanvases.ts |
Adapts Copilot SDK canvases. |
src/vs/platform/agentHost/node/protocolServerHandler.ts |
Routes canvas protocol requests. |
src/vs/sessions/contrib/canvases/README.md |
Documents ownership and isolation. |
src/vs/sessions/contrib/canvases/common/sessionCanvasPresentation.ts |
Coordinates state and native presentation. |
src/vs/sessions/contrib/canvases/electron-browser/sessionCanvasActions.ts |
Adds canvas commands and pickers. |
src/vs/sessions/contrib/canvases/electron-browser/sessionCanvasEditor.ts |
Implements the canvas editor and accessibility. |
src/vs/sessions/contrib/canvases/electron-browser/sessionCanvasService.ts |
Manages canvas inputs and leases. |
src/vs/sessions/contrib/canvases/electron-browser/sessionCanvases.contribution.ts |
Registers settings, editors, and actions. |
src/vs/sessions/contrib/providers/agentHost/browser/agentHostSessionCanvases.ts |
Projects Agent Host canvases into Sessions. |
src/vs/workbench/contrib/browserView/electron-browser/browserCanvasTheme.ts |
Maps workbench themes into canvas guests. |
src/vs/workbench/contrib/browserView/electron-browser/browserFileTrustWidget.ts |
Adds trusted-file recovery UI. |
src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts |
Creates isolated external browser views. |
src/vs/workbench/contrib/browserView/electron-browser/overlayManager.ts |
Recognizes accessible-view overlays. |
src/vs/workbench/contrib/browserView/electron-browser/webContentsViewHost.ts |
Shares native view hosting behavior. |
src/vs/platform/browserView/electron-main/browserSessionFileAccess.ts |
Enforces trusted file roots. |
src/vs/platform/browserView/electron-main/browserViewMainService.ts |
Enforces native canvas isolation. |
src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.ts |
Forwards canvas operations remotely. |
src/vs/workbench/contrib/browserView/test/** |
Covers isolation, themes, overlays, and trust. |
src/vs/sessions/contrib/canvases/test/** |
Covers canvas ownership and lifecycle. |
src/vs/platform/agentHost/test/** |
Covers protocol and provider behavior. |
test/smoke/src/areas/browserView/browserView.test.ts |
Exercises accessibility help integration. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Preserve canvas initialization, retention, transport ownership and early SDK events alongside upstream artifact removal, workspace trust, sandbox and steering updates. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply canonical icon changes without replaying provider effects and release orphan native presentations before renderer restoration. Bind CI dependency caches to SDK postinstall inputs, preserve native-only capability coverage, and validate canonical session disposal requests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Match the existing mock chat-surface override pattern so the canvas creation fixtures pass the define-class-fields check without changing their initialization or cancellation assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
Base:
|
Apply the byte-verified package delta with Git line-ending conversion disabled for that subprocess. Cover autocrlf true, input, and false with a CRLF preference without changing package hashes or user Git configuration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Read already-hydrated exact-owner membership when resolving a logical input. Preserve later observable title updates and cover both hydration orderings without source pulls, provider effects, or native allocation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

Summary
Adds a default-off, source-built local desktop preview of runtime-owned canvases in the Agents window. Existing Copilot canvas extensions keep their original source directories, runtime, HTTP/SSE interaction and provider-owned data; VS Code supplies exact-chat ownership and isolated native editor presentation.
This is the original-directory compatibility implementation, separate from #335902. It does not modify or supersede that parallel implementation's PRs.
Included
The presentation setting
sessions.experimental.canvases.enableddefaults to false. Actual canvas support additionally requires a non-built development environment and an explicitly selected compatible runtime throughVSCODE_AGENT_HOST_CANVAS_RUNTIME_PATH.Review and CI corrections
{ channel }disposal calls and class-field-safe test fixtures while preserving production eligibility gates.Both original inline review findings were answered and resolved in their original threads. Changes are ordinary signed commits; no force push, signing bypass or hook bypass was used.
Related dependency work
861f7794. P2 makes ordinary generation reproducible using guarded canonical experimental schema inputs. Its Node source candidate remains distinct from this PR's unchanged installed 1.0.13+B3 image.5b4262ca. Native qualification uses the recorded R6 development build with R6.1's corpus-only source delta; this is not a published runtime release.cd05c63c, including revisioned icon change/removal and the required-null serialization correction.These are candidate contracts, not published SDK/runtime releases. The protocol import is regenerated from the identified canonical revision, not independently hand-edited.
Qualification
Current source:
77c3fd860388f02b4738823c238b1cb258b864f8. Real Code OSS 1.139.0 Dev on macOS arm64 passed 43 steps across four native process generations using the original Counter and Triage extensions:All four generations exited normally within the unchanged ten-second deadline, with no forced signals or model requests. Independent reconciliation found no survivors among 135 owned PID/birth identities and reverified all 360 frozen product fingerprints, 20 source/output pairs, both complete B3 installations and the selected runtime source/build image. Earlier failures remain recorded rather than relabeled. Earlier bounded runs cover original Perfetto presentation, file trust, browser permissions, accessibility/themes and native-view withdrawal; those are explicitly historical evidence, not new full-matrix coverage.
Current Code OSS CI passed all 21 jobs, including all five Windows lanes. Component Fixtures attempt 2 passed 43 tests, rendered 2,213 fixtures without errors and matched all 178 blocking hashes. Its first attempt's unchanged chat-input fixture differed only in 12 antialiasing samples; one bounded rerun at the identical head and merge commit returned exactly to the committed PNG. No baseline was accepted, assertion waived or underlying rasterizer fix claimed. The PR has 33 successful checks; the remaining VS Code PR Check is an ordinary collaborator-approval gate, not executable CI.
Draft gates and limits
Trying the local preview
Use an isolated Code OSS development profile with the compatible runtime selected explicitly and the canvas presentation setting enabled. Initialize/open canvases for the represented chat through the Canvases menu, completing normal source consent and any separate browser/file-trust prompts. An ordinary published CLI is not a substitute for the required runtime candidate.
See
src/vs/sessions/contrib/canvases/README.mdfor the ownership and interaction contract, andbuild/npm/copilot-sdk-canvas.mdfor the temporary dependency carrier and its release boundary.