Skip to content

Canvases: share definition refresh logic across Editor and Agents windows #341696

Closed

Description

The Editor Window Canvas menu added by #341597 and the Agents Window Add Tab → Canvas menu added for microsoft/vscode-internalbacklog#10058 currently maintain separate canvas-definition refresh implementations. The broader Agents Window customization work originated in microsoft/vscode-internalbacklog#9997.

Both implementations independently handle:

  • active owner/chat identity;
  • asynchronous definition listing;
  • preserving the current list during same-owner refreshes;
  • structural equality for content-identical results;
  • coalescing repeated invalidations;
  • stale request and disposal guards;
  • clearing definitions when the owner changes or canvases become unavailable.

The surface-specific adapters and menu placement should remain separate, but the common refresh lifecycle could live in a Workbench-owned helper so both vs/workbench and vs/sessions can consume it without reversing the layer dependency.

A possible shape is a CanvasDefinitionStore that accepts an owner key, invalidation signal, and asynchronous list callback, and exposes an observable definition list. Editor and Agents Window code would continue to own their context/session routing, menu IDs, ordering, and open actions.

Acceptance criteria

  • Introduce a Workbench-layer canvas-definition refresh abstraction reusable by Editor and Agents windows.
  • Preserve existing behavior for owner changes, unavailable canvases, failed refreshes, reconnects, and open native menus.
  • Keep surface-specific menu contribution and canvas-opening behavior outside the shared helper.
  • Retain focused regression coverage for stable commands, refresh coalescing, stale requests, and structurally identical results.
  • Avoid visible UX changes.

Related implementation and fixes: #341495, #341498, #341597, and #341658.

🤖 Written by GitHub Copilot on behalf of Joaquín Ruales (@jruales).

Activity

  1. added
    feature-requestRequest for new features or functionality
    debtCode quality issues
    canvasesIssues related to Copilot canvases
    and removed
    feature-requestRequest for new features or functionality
    on Oct 15, 2026
  2. added a commit that references this issue on Oct 15, 2026
    710a276
  3. added this to the 1.143.0 milestone on Oct 15, 2026
  4. added
    unreleasedPatch has not yet been released in VS Code Insiders
    insiders-releasedPatch has been released in VS Code Insiders
    and removed
    unreleasedPatch has not yet been released in VS Code Insiders
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

canvasesIssues related to Copilot canvasesdebtCode quality issuesinsiders-releasedPatch has been released in VS Code Insiders

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions