You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Canvases: UI for opening Canvases from Editor Window - #341597
add a final Canvas submenu under the Editor Window's New Chat split button when the active initialized Chat view has applicable canvases
keep brand-new provisional chats lazy: no canvas discovery and no Canvas submenu before the provider chat is initialized
list registered extension canvases by their actual names, refresh them with runtime registry changes, and exclude definitions that require another input flow
use stable instance IDs so selecting the same canvas refocuses or reopens its existing tab, while avoiding duplicate entries for registered defaults
share canvas definition labeling, filtering, ordering, and stable-ID helpers with the Agents Window implementation
document the submenu and keyboard navigation in Chat Accessibility Help
Related to microsoft/vscode-internalbacklog#10058.
Actual runtime evidence
Captured from this branch through the production path:
core agent-host-copilotcli session opened by the workbench
first request sent through Agent Host using VS Code's smoke-test mock LLM transport
project canvases registered by a real @github/copilot-sdk/extension provider
menu populated through listSessionCanvases
Chess opened through openSessionCanvas into the real canvas editor
The mock LLM only makes the model response deterministic; it does not contribute UI, menu items, chat state, or canvases.
Before the first message: the provisional chat has no Canvas item.
After the real Agent Host response: the registered canvas names appear under the final Canvas submenu.
Opening Chess: the real canvas editor opens beside its owning chat.
actual-agenthost-canvas-menu.mp4
Validation
npm run build-fast -- --client-only — passed
npm run typecheck-client — passed
changed-TypeScript ESLint — passed
npm run test-browser-no-install -- --browser chromium --run src/vs/workbench/contrib/canvases/test/browser/editorCanvasActions.test.ts --reporter dot — 1 passing; covers menu registration, refresh, stable-instance behavior, disabled canvases, and absence for an uninitialized chat without canvasContext
live production-path run — verified no Canvas before initialization, Cache Stats / Chess / Token Pac-Man after the first Agent Host response, real Chess canvas open, and one stable Chess tab after repeat selection
Joaquín Ruales (jruales)
changed the title
Canvases: Add Canvas submenu to Editor Window New Chat menu
Canvases: UI way of opening Canvases from Editor Window
Oct 14, 2026
Joaquín Ruales (jruales)
changed the title
Canvases: UI way of opening Canvases from Editor Window
Canvases: UI for opening Canvases from Editor Window
Oct 14, 2026
If a user closes a stable canvas instance and its source becomes unavailable, selecting its definition calls openCanvas without clearing the dismissal. This can occur during a runtime configuration refresh, which preserves canvas channels but removes their URLs. When the same source recovers, CanvasService still suppresses the tab: reopening requires either an explicit reveal or a new successful model open_canvas request, neither of which this call supplies. Preserve the user's reveal intent until the live instance is available, while respecting owner visibility and enablement. Add a regression covering a dismissed, unavailable instance that recovers after selection.
Refresh canvas definitions after cancelled snapshot replays changes
The successful-snapshot notification does not cover a failed refresh. BaseAgentSubscription.cancelSnapshotRefresh() replays buffered actions through _reconcile() but emits neither event observed here. If a ChatCanvasesChanged action was buffered and the chat owner stays unchanged, the subscription updates without refreshing definitions, leaving removed canvases selectable and new ones absent. Notify definition consumers when cancellation replays registry changes, without refreshing on ordinary streamed updates, and add a regression that buffers a registry change before cancelling the refresh.
Addressed the two "Previously missed" Copilot findings in f3d198ccaf0:
Selecting a registered definition now records explicit reveal intent even when the stable canvas instance temporarily has no source. If the source recovers, the dismissed tab reopens; the provider open request still runs to restore the source.
Cancelled snapshot refreshes now report the buffered actions they replayed. Canvas definition invalidation filters that signal to successful ChatCanvasesChanged actions, so failed reconnect recovery refreshes the menu without reacting to ordinary streamed updates.
Validation: 88 focused browser tests passed, 15 CanvasService Electron tests passed, client type-check passed, ESLint passed, and pre-commit hygiene passed.
Tracks the Editor Window Canvas menu feature implemented by #341597. The corresponding Agents Window feature is microsoft/vscode-internalbacklog#10058, under the broader microsoft/vscode-internalbacklog#9997 work.
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
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
Related to microsoft/vscode-internalbacklog#10058.
Actual runtime evidence
Captured from this branch through the production path:
agent-host-copilotclisession opened by the workbench@github/copilot-sdk/extensionproviderlistSessionCanvasesopenSessionCanvasinto the real canvas editorThe mock LLM only makes the model response deterministic; it does not contribute UI, menu items, chat state, or canvases.
Before the first message: the provisional chat has no Canvas item.
After the real Agent Host response: the registered canvas names appear under the final Canvas submenu.
Opening Chess: the real canvas editor opens beside its owning chat.
actual-agenthost-canvas-menu.mp4
Validation
npm run build-fast -- --client-only— passednpm run typecheck-client— passednpm run test-browser-no-install -- --browser chromium --run src/vs/workbench/contrib/canvases/test/browser/editorCanvasActions.test.ts --reporter dot— 1 passing; covers menu registration, refresh, stable-instance behavior, disabled canvases, and absence for an uninitialized chat withoutcanvasContextnpm run test-browser-no-install -- --browser chromium --run src/vs/workbench/contrib/chat/test/browser/accessibility/chatAccessibilityHelp.test.ts --reporter dot— 50 passingnpm run valid-layers-check— passednpm run check-cyclic-dependencies— passedCache Stats/Chess/Token Pac-Manafter the first Agent Host response, real Chess canvas open, and one stable Chess tab after repeat selection