close
Skip to content

Adopt CodeAction type for built-in css server#310055

Merged
aeschli merged 2 commits intomicrosoft:mainfrom
yogeshwaran-c:fix/css-server-adopt-codeaction-type-237858
Apr 15, 2026
Merged

Adopt CodeAction type for built-in css server#310055
aeschli merged 2 commits intomicrosoft:mainfrom
yogeshwaran-c:fix/css-server-adopt-codeaction-type-237858

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

What this PR does

The CSS language server already returns proper CodeAction objects (with edit) via doCodeActions2 (see extensions/css-language-features/server/src/cssServer.ts). The client, however, still registered a legacy _css.applyCodeAction command that was used by the older Command-style code actions and is no longer invoked from the server.

This PR removes the now-dead client-side glue:

  • Drop the _css.applyCodeAction command registration and its applyCodeAction helper in extensions/css-language-features/client/src/cssClient.ts.
  • Drop the unused commands and window imports that were only used by that helper.
  • Drop the onCommand:_css.applyCodeAction activation event in extensions/css-language-features/package.json so the extension no longer activates on a command nobody fires.

No behavior change is expected: code actions continue to flow through the standard CodeAction.edit path that the editor applies directly.

Fixes #237858

Remove the now-dead `_css.applyCodeAction` command handler and its
activation event. The CSS server already returns proper `CodeAction`
objects with `edit` via `doCodeActions2`, so the legacy command-based
fallback is no longer reached.

Fixes microsoft#237858
aeschli
aeschli previously approved these changes Apr 15, 2026
@aeschli aeschli enabled auto-merge (squash) April 15, 2026 08:08
@aeschli
Copy link
Copy Markdown
Contributor

aeschli commented Apr 15, 2026

Thanks @yogeshwaran-c , nice change.
I reverted the package.json change as, for security reasons, these can only be made by contributors. I will make a follow-up PR.

@aeschli aeschli merged commit 03dd400 into microsoft:main Apr 15, 2026
26 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 15, 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.

Adopt CodeAction type for built-in css server

4 participants