Skip to content

[VSCodeSweeper MVP — test only] extension.extensionKind is wrong for extensions not running on the host#4

Draft
egamma wants to merge 2 commits into
mainfrom
vscodesweeper/fix-148160
Draft

[VSCodeSweeper MVP — test only] extension.extensionKind is wrong for extensions not running on the host#4
egamma wants to merge 2 commits into
mainfrom
vscodesweeper/fix-148160

Conversation

@egamma

@egamma egamma commented Jul 8, 2026

Copy link
Copy Markdown
Owner

⚠️ VSCodeSweeper MVP — test only. This draft PR was generated by an AI experiment
(vscodesweeper) inside a personal fork. It is
not intended for microsoft/vscode and is not a contribution proposal.

Upstream issue: microsoft#148160

Change summary

extension.extensionKind returns Workspace for all extensions in allAcrossExtensionHosts, even those running on the local/UI host.

Validation

Use the test extension at https://github.com/aeschli/ext-all-extensions in a remote window and verify that extensions with vscode-local URIs report ExtensionKind.UI, not Workspace. A unit test can mock extensionInfo with a foreign extension and assert the returned Extension.extensionKind is the opposite of the host's kind.


Branch vscodesweeper/fix-148160 · generated fix · review loop runs separately (codex review).

@egamma egamma added the vscodesweeper-mvp VSCodeSweeper MVP test PR (fork-only) label Jul 8, 2026
@egamma

egamma commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

🤖 codex review — round 1

VSCodeSweeper MVP codex cross-review of a copilot-generated fix (fork-only experiment).

The change fixes the simple local/remote case but misclassifies extensions from other local extension hosts as Workspace. This affects the proposed cross-extension-host API in normal desktop configurations where the web-worker extension host is enabled.

Review comment:

  • [P2] Preserve UI kind for foreign local extension hosts — src/vs/workbench/api/common/extHost.api.impl.ts:598-600
    When this code runs in any non-remote extension host, foreignExtensionKind is always set to Workspace, but not every foreign host is remote: desktop can also have a LocalWebWorker extension host, and a web-worker host can see LocalProcess extensions. In those cases getExtension(..., true) and allAcrossExtensionHosts now report local UI/web-worker extensions as Workspace, regressing the previous UI value and giving extensions incorrect host-kind information.

@egamma

egamma commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

🔧 Round 1: pushed commits addressing the review above; re-reviewing.

@egamma

egamma commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

🤖 codex review — round 2

VSCodeSweeper MVP codex cross-review of a copilot-generated fix (fork-only experiment).

The change improves the extensionKind reported for extensions from other extension hosts by deriving it from the extension location scheme, and I did not find a discrete regression in the modified code.

@egamma

egamma commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

✅ Round 2: no actionable findings — the review loop converged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vscodesweeper-mvp VSCodeSweeper MVP test PR (fork-only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant