Skip to content

chat: Attribute Canvas refresh failures to the failing extension - #345297

Merged
Joaquín Ruales (jruales) merged 9 commits into
mainfrom
jruales/canvas-reconcile-attribution
Oct 31, 2026
Merged

Joaquín Ruales (jruales) merged 9 commits into
mainfrom
jruales/canvas-reconcile-attribution

Conversation

@jruales

@jruales Joaquín Ruales (jruales) commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #345296

When changing a canvas extension triggers reconciliation and another extension fails to start, identify the unrelated failed extension from the fresh live inventory. Notifications consistently describe the user action, the incomplete chat update, the extension that blocked it, and the possibility that the running chat does not match saved settings.

Message changes

Situation Before After
The selected chat stops or is replaced after enabling Canvas extension '{extension}' was enabled in settings, but couldn't be started in this chat. The selected chat stopped or was replaced before its extension state could be updated. After enabling '{extension}', the canvas extension change couldn't be confirmed because the selected chat stopped or was replaced. '{extension}' is enabled in settings.
The selected chat stops or is replaced after disabling Canvas extension '{extension}' was disabled in settings, but couldn't be stopped in this chat. The selected chat stopped or was replaced before its extension state could be updated. After disabling '{extension}', the canvas extension change couldn't be confirmed because the selected chat stopped or was replaced. '{extension}' is disabled in settings.
Enabling leaves the requested extension consistently starting and one unrelated extension is confirmed failed Canvas extension '{extension}' was enabled in settings, but couldn't be started in this chat. {runtime reason} After enabling '{extension}', this chat couldn't finish updating canvas extensions because '{failed extension}' failed to start. This chat may not match your canvas extension settings.
Disabling is confirmed and one unrelated extension is confirmed failed Canvas extension '{extension}' was disabled in settings, but couldn't be stopped in this chat. {runtime reason} After disabling '{extension}', this chat couldn't finish updating canvas extensions because '{failed extension}' failed to start. This chat may not match your canvas extension settings.
Enabling leaves the requested extension consistently starting and multiple unrelated extensions are confirmed failed Canvas extension '{extension}' was enabled in settings, but couldn't be started in this chat. {runtime reason} After enabling '{extension}', this chat couldn't finish updating canvas extensions because other canvas extensions failed to start. This chat may not match your canvas extension settings.
Disabling is confirmed and multiple unrelated extensions are confirmed failed Canvas extension '{extension}' was disabled in settings, but couldn't be stopped in this chat. {runtime reason} After disabling '{extension}', this chat couldn't finish updating canvas extensions because other canvas extensions failed to start. This chat may not match your canvas extension settings.
The requested extension is confirmed failed after enabling Canvas extension '{extension}' was enabled in settings, but couldn't be started in this chat. {runtime reason} After enabling '{extension}', this chat couldn't finish updating canvas extensions because '{extension}' failed to start. This chat may not match your canvas extension settings.
The requested extension is not confirmed disabled after disabling Canvas extension '{extension}' was disabled in settings, but couldn't be stopped in this chat. {runtime reason} After disabling '{extension}', this chat couldn't finish updating canvas extensions because '{extension}' couldn't be stopped. This chat may not match your canvas extension settings.

Enabling already produced no error notification when the requested extension was confirmed running despite an unrelated reconciliation failure; that behavior is intentionally unchanged.

Attribution is limited to structured lifecycle failures and live extensions in the failed state. Non-lifecycle reconciliation errors, extensions that are still starting, and completed disables without a visible failing extension retain the runtime's original reason. The original lifecycle error is logged before a user-facing attributed error replaces it.

Single- and multiple-failure messages are complete localization strings rather than sentences assembled from translated fragments. Inventory-verification and disposed-session failures retain the existing conservative fallback.

Screenshot of the locally reproduced scenario, with the full notification expanded:

Expanded canvas extension reconciliation error

Validation:

  • npm run build-fast -- --client-only — passed
  • ./scripts/test.sh --reporter dot --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts — 987 passed, 1 pending
  • npm run test-browser-no-install -- --run src/vs/workbench/contrib/chat/test/browser/aiCustomization/copilotCustomizationsWidget.test.ts --browser chromium — 23 passed
  • npm run eslint -- src/vs/platform/agentHost/node/copilot/copilotAgent.ts src/vs/platform/agentHost/test/node/copilotAgent.test.ts src/vs/workbench/contrib/chat/test/browser/aiCustomization/copilotCustomizationsWidget.test.ts — passed
  • npm run typecheck-client — passed

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

Copilot AI balanced review requested due to automatic review settings October 30, 2026 22:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The test fails type-checking due to an unguarded union-property access, and disposal during the extension lookup can incorrectly let the enable operation succeed after the session is no longer live.

2 open issues
What changed in this PR

This PR addresses #345296 by using fresh live extension inventory to identify unrelated Canvas startup failures when disabling an extension, rather than blaming the changed extension.

Changes:

  • Adds reconciliation error details that identify other extensions that failed to become ready.
  • Updates notifications to name the blocker and confirm the requested extension is disabled in settings.
  • Updates agent and widget test expectations for the revised message.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​aiCustomization/​copilotCustomizationsWidget.test.ts Updates notification expectations after a failed refresh.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgent.test.ts Checks attribution of an unrelated extension failure.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Inspects live extension states and builds the revised failure message.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The disposal test exits at the first guard because listed is set before reconciliation, so it passes even if the post-await disposal guard is removed.

1 open issue
2 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The error guard can incorrectly blame a target without a confirmed failed state and discard the runtime’s original error reason.

1 open issue
1 resolved since last review

Review effort: Balanced

@jruales
Joaquín Ruales (jruales) marked this pull request as ready for review October 31, 2026 00:47
@jruales
Joaquín Ruales (jruales) merged commit aaffed1 into main Oct 31, 2026
55 checks passed
@jruales
Joaquín Ruales (jruales) deleted the jruales/canvas-reconcile-attribution branch October 31, 2026 01:00
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.0 milestone Oct 31, 2026
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.

Canvas toggle error blames changed extension when another extension fails

3 participants