Skip to content

fix(extension): avoid fetching nonexistent overlay CSS - #403

Open
KennyMcSimpson wants to merge 1 commit into
Tencent:mainfrom
KennyMcSimpson:fix/inline-overlay-css
Open

KennyMcSimpson wants to merge 1 commit into
Tencent:mainfrom
KennyMcSimpson:fix/inline-overlay-css

Conversation

@KennyMcSimpson

Copy link
Copy Markdown

Summary

Fixes #398.

The overlay CSS is already imported with ?inline and supplied to createShadowRootUi. Setting cssInjectionMode: "ui" also makes WXT request content-scripts/content.css, which the production build does not emit.

Remove that setting and keep the existing inline stylesheet. The overlay continues to mount inside its ShadowRoot without the extra request.

Validation

  • pnpm ext:test: 2,421 passed, 122 skipped.
  • Extension production build and pnpm --filter @browser-skill/extension compile passed.
  • pnpm lint passed, including the plugin's 446 tests.
  • Executed the actual before/after production content-script bundles in Happy DOM with Chrome API stubs. The old bundle requested the missing CSS once; the updated bundle made no such request. Both mounted the recording controls and the same 32,322 characters of ShadowRoot CSS. Neither manifest added page-level content-script CSS.

A live Chrome smoke test could not run because this environment rejects Chrome's process-singleton socket creation. The bundle check does not cover browser rendering.

@KennyMcSimpson
KennyMcSimpson marked this pull request as ready for review October 6, 2026 08:24

This branch has not been deployed

No deployments
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.

Content script requests a stylesheet that is never emitted: chrome-extension://invalid/ net::ERR_FAILED on every page

1 participant