fix(vscode): load webview stylesheets through CORS - #13117
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
The PR Checks workflow is currently blocked by the unrelated All checks covering this change are green, including the VS Code checks, lint, unit tests, cross-platform tests, and VSIX build. The patch only changes the VS Code webview stylesheet link helper and its unit test. I don't have permission to rerun the repository workflow ( |
|
The remaining required failure is still the unrelated IntelliJ |
Description
Fixes #12135.
Firefox 149 sends the stylesheet request from Continue's VS Code webview with
Sec-Fetch-Mode: no-cors. In code-server, that request skips the service worker and the generatedvscode-resourcehost cannot be resolved. The script request already uses CORS and continues to load.This adds
crossorigin="anonymous"to the stylesheet link generated for both the main and console webviews. The link markup is shared through a small helper so both providers keep the same behavior.This change was developed with AI assistance and reviewed manually against the webview code path and the issue's request details.
AI Code Review
Not requested; this PR is from an external contributor.
Checklist
Screen recording or screenshot
Not applicable for this focused webview markup fix.
Tests
pnpm exec vitest run src/util/util.vitest.ts(4 tests passed)pnpm exec eslint src/ContinueGUIWebviewViewProvider.ts src/ContinueConsoleWebviewViewProvider.ts src/util/util.ts src/util/util.vitest.ts --ext ts(0 errors; two pre-existing warnings remain)git diff --checkpnpm exec tsc -p ./ --noEmitwas attempted but is currently blocked by missing generated/local workspace package outputs such as@continuedev/config-yamland@continuedev/fetch, producing existing repository-wide errors unrelated to this change.