Skip to content

Canvases: Verify canvas extension toggle outcomes - #344904

Merged
Joaquín Ruales (jruales) merged 9 commits into
mainfrom
jruales-canvas-extension-readiness
Oct 29, 2026
Merged

Joaquín Ruales (jruales) merged 9 commits into
mainfrom
jruales-canvas-extension-readiness

Conversation

@jruales

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

Copy link
Copy Markdown
Contributor

Fixes #344909

This change makes Canvas extension toggles resilient to aggregate runtime reconciliation failures:

  • verify a requested enable against a fresh live inventory after reconciliation fails
  • accept the enable only when every matching target reached running
  • preserve failed disable reconciliation because disabled inventory state does not prove runtime cleanup completed
  • conservatively combine duplicate extension identities with conflicting live states
  • refresh saved extension state even when Canvas listing fails, without showing a duplicate error notification
  • preserve toggle focus across successful and failed asynchronous refreshes
  • describe live failures as an extension that could not be started or stopped in the current chat, while explicitly stating whether it was enabled or disabled in settings

This preserves the saved preference while preventing an unrelated extension lifecycle failure from incorrectly reporting that a successfully running extension failed to enable.

Validation:

  • npm run compile — passed
  • npm run build-fast -- --client-only — passed
  • ./scripts/test.sh --reporter dot --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts — 966 passed, 1 pending
  • npm run test-browser-no-install -- --run src/vs/workbench/contrib/chat/test/browser/aiCustomization/copilotCustomizationsWidget.test.ts --browser chromium — 22 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/browser/aiCustomization/copilotCustomizationsWidget.ts src/vs/workbench/contrib/chat/test/browser/aiCustomization/copilotCustomizationsWidget.test.ts — passed
  • npm run typecheck-client — passed
  • Live Code OSS validation with an intentionally failed project:repro-failure extension — enabling healthy checkers-canvas reached Enabled, produced no enable or refresh error, and retained focus on the checked switch; disabling remained an explicit reconciliation error while refreshing the saved off state

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

Copilot AI balanced review requested due to automatic review settings October 29, 2026 06:28

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.

🟢 Approval recommended

No active review issues were identified in the Canvas extension-toggle resilience changes.

No open issues 🎉

What changed in this PR

This PR makes Canvas extension toggles resilient to unrelated runtime reconciliation failures while preserving genuine failures and saved preferences.

Changes:

  • Verify failed reconciliation against fresh live inventory, accepting the toggle only when every matching target reaches the requested state.
  • Deduplicate extension inventories by source-qualified runtime identity and refresh the Canvases UI after both successful and failed toggles.
  • Add regression tests and document the behavior.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​aiCustomization/​copilotCustomizationsWidget.test.ts Tests UI refresh and saved enablement after reconciliation fails.
src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​copilotCustomizationsWidget.ts Refreshes canvases after either toggle outcome.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgent.test.ts Tests inventory deduplication and reconciliation verification scenarios.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Deduplicates inventories and verifies target state after reconciliation errors.
src/​vs/​platform/​agentHost/​AGENTS.md Documents extension identity and toggle verification behavior.

Review effort: Balanced

@jruales
Joaquín Ruales (jruales) merged commit d342bbf into main Oct 29, 2026
55 checks passed
@jruales
Joaquín Ruales (jruales) deleted the jruales-canvas-extension-readiness branch October 29, 2026 09:13
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.0 milestone Oct 29, 2026
@jruales Joaquín Ruales (jruales) changed the title chat: Verify canvas extension toggle outcomes Canvases: Verify canvas extension toggle outcomes Oct 29, 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 extension toggle reports failure after preference is saved

3 participants