Skip to content

fix(vscode): load webview stylesheets through CORS - #13117

Open
uuzzrm wants to merge 1 commit into
continuedev:mainfrom
uuzzrm:codex/fix-firefox-codeserver-css
Open

fix(vscode): load webview stylesheets through CORS#13117
uuzzrm wants to merge 1 commit into
continuedev:mainfrom
uuzzrm:codex/fix-firefox-codeserver-css

Conversation

@uuzzrm

@uuzzrm uuzzrm commented Aug 10, 2026

Copy link
Copy Markdown

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 generated vscode-resource host 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

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

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 --check
  • pnpm exec tsc -p ./ --noEmit was attempted but is currently blocked by missing generated/local workspace package outputs such as @continuedev/config-yaml and @continuedev/fetch, producing existing repository-wide errors unrelated to this change.

@uuzzrm
uuzzrm requested a review from a team as a code owner August 10, 2026 17:45
@uuzzrm
uuzzrm requested review from sestinj and removed request for a team August 10, 2026 17:45
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@uuzzrm

uuzzrm commented Aug 10, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@uuzzrm

uuzzrm commented Aug 10, 2026

Copy link
Copy Markdown
Author

The PR Checks workflow is currently blocked by the unrelated jetbrains-tests job. The failing test is Autocomplete > testAutocomplete() in the IntelliJ integration suite; the job reports 1 test completed, 1 failed and then fails :testIntegration.

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 (gh run rerun requires repository admin rights), so could a maintainer rerun or triage the JetBrains job?

@uuzzrm

uuzzrm commented Aug 10, 2026

Copy link
Copy Markdown
Author

The remaining required failure is still the unrelated IntelliJ Autocomplete > testAutocomplete() integration test; all VS Code, core, lint, build, and cross-platform checks for this PR pass. I attempted to rerun the failed workflow, but GitHub requires repository admin permission. Could a maintainer rerun or triage the JetBrains job?

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.

CSS won't load on Firefox v149 in code-server

1 participant