Skip to content

Reset notebook controller language restrictions - #347068

Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
microsoft:mainfrom
sameerihs:reset-notebook-controller-languages
Nov 9, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 1 commit into
microsoft:mainfrom
sameerihs:reset-notebook-controller-languages

Conversation

@sameerihs

Copy link
Copy Markdown
Contributor

Fixes #347067

Normalise an undefined supported-language update to [] in the transport DTO so the main thread clears the old restriction. The public getter retains the assigned undefined.

The real JSON API-bridge regression and public notebook execution regression fail before the fix; explicit-empty-array controls pass. The public regression also reproduces in installed 1.145.2. Validation passes 33 unit/service tests and 14 API tests with one existing skip, plus client typechecking, API extension compilation and targeted ESLint.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 17:31

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 for the change to clear notebook language restrictions when supported languages are reset.

No open issues 🎉

What changed in this PR

Fixes #347067 by ensuring that resetting NotebookController.supportedLanguages to undefined clears language restrictions on the main thread while preserving undefined in the public getter.

Changes:

  • Normalize undefined supported languages to [] in update transport data.
  • Add API-bridge regression coverage for both undefined and empty-array resets.
  • Add public API tests confirming cell execution succeeds after either reset.
File Description
src/​vs/​workbench/​api/​test/​browser/​extHostNotebookKernel.test.ts Verify resets clear main-thread restrictions and preserve public getter values.
src/​vs/​workbench/​api/​common/​extHostNotebookKernels.ts Send [] for undefined supported languages in kernel updates.
extensions/​vscode-api-tests/​src/​singlefolder-tests/​notebook.kernel.test.ts Verify previously excluded cells execute after language restrictions are reset.

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.

🟢 Approval recommended

No actionable review findings remain for the notebook language-restriction reset fix, though validation was not rerun during this review.

No open issues 🎉

Review effort: Max

@dmitrivMS

Copy link
Copy Markdown
Collaborator

Thank you for the fix!

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit d2d03ef into microsoft:main Nov 9, 2026
52 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants