Skip to content

fix(ext): CSP-compliant sidepanel — no inline scripts (Closes #189) - #197

Merged
gHashTag merged 1 commit into
mainfrom
fix/csp-sidepanel-189-v2
Apr 21, 2026
Merged

gHashTag merged 1 commit into
mainfrom
fix/csp-sidepanel-189-v2

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

Problem

  1. sidepanel.html has inline <script type="module"> → Chrome MV3 CSP blocks → белый экран (🦀 P0 EPIC: trios-ext FULL Rust→WASM rewrite — fix CSP inline-script + DELETE all handwritten .js (детальный план для агента) #189)
  2. extension/trios_ext_bg.wasm — stale 27KB duplicate (real: 96KB in dist/wasm/)

Fix (2 files, clean diff)

  • Remove inline <script> → <script type="module" src="dist/bootstrap.js">
  • Delete stale extension/trios_ext_bg.wasm

Before: CSP violation → white screen
After: External script → CSP compliant → extension loads

Verify

find extension -name "*.js" -not -path "*/dist/*"  → empty
grep function extension/sidepanel.html             → none
cargo clippy -p trios-ext --target wasm32-unknown-unknown -- -D warnings → 0

Closes #189

- Remove inline <script type='module'> from sidepanel.html
- Use external dist/bootstrap.js (Chrome MV3 CSP compliant)
- Delete stale extension/trios_ext_bg.wasm (27KB, real one in dist/wasm/)
- Zero JS outside dist/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant