Skip to content

Fix "Disable" not reactivating built-in TypeScript extension#3652

Merged
andrewbranch merged 2 commits intomainfrom
copilot/investigate-issue-3651
Apr 29, 2026
Merged

Fix "Disable" not reactivating built-in TypeScript extension#3652
andrewbranch merged 2 commits intomainfrom
copilot/investigate-issue-3651

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

PR #3516 registered the command typescript.selectTypeScriptVersion — the same ID used by the built-in TS extension in VS Code. On disable, the built-in extension's conditionalRegistration reacts to the config change immediately and tries to re-register its normal features including that command, but the native preview session is still alive (100ms debounce), so vscode.commands.registerCommand throws, and the entire built-in extension reactivation fails silently.

  • Renamed command back to typescript.native-preview.selectVersion to avoid the collision
  • Added a command palette entry for "TypeScript Native Preview: Select TypeScript Version..."

…ilt-in TS extension (#3651)

Agent-Logs-Url: https://github.com/microsoft/typescript-go/sessions/0310cf71-98eb-4c95-b7d4-142bb7eeb39f

Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>
@andrewbranch
Copy link
Copy Markdown
Member

@copilot add a command palette menu item for this in package.json. It should say "TypeScript Native Preview: Select TypeScript Version..."

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 28, 2026

@copilot add a command palette menu item for this in package.json. It should say "TypeScript Native Preview: Select TypeScript Version..."

Added in eaa2d48. The command palette will show "TypeScript Native Preview: Select TypeScript Version..." when the server is running.

Copilot AI requested a review from andrewbranch April 28, 2026 23:06
@andrewbranch andrewbranch marked this pull request as ready for review April 28, 2026 23:31
Copilot AI review requested due to automatic review settings April 28, 2026 23:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a VS Code command ID collision between the native preview extension and the built-in TypeScript extension that could prevent the built-in extension from reactivating after disabling native preview.

Changes:

  • Renames the version selection command to typescript.native-preview.selectVersion to avoid conflicting with typescript.selectTypeScriptVersion.
  • Updates the native preview “server menu” quick pick to invoke the renamed command.
  • Adds a contributed command so “TypeScript Native Preview: Select TypeScript Version...” appears in the command palette.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
_extension/src/session.ts Renames the registered version picker command and updates the menu entry to use the new command ID.
_extension/package.json Contributes the new command ID to VS Code so it shows up in the command palette (with proper enablement/category).

@andrewbranch andrewbranch added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 56ab4af Apr 29, 2026
25 checks passed
@andrewbranch andrewbranch deleted the copilot/investigate-issue-3651 branch April 29, 2026 01:24
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.

4 participants