Expose src/lib/slug.js as a web accessible resource - #1
Merged
Conversation
The in-page panel dynamically imports src/lib/settings.js, which reaches src/lib/slug.js through settings-schema.js and template.js. slug.js was missing from web_accessible_resources, so Chrome blocked that last hop and the panel's settings read failed. Traced the full transitive import graph from every content-script entry point; slug.js was the only file missing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The in-page panel dynamically imports
src/lib/settings.js, which reachessrc/lib/slug.jsviasettings-schema.js→template.js. Becauseslug.jswas missing fromweb_accessible_resources, Chrome blocked that last hop:The panel still rendered but its settings read failed. Surfaced while capturing screenshots of the extension.
Audit
Traced the full transitive import graph from every content-script entry point rather than patching the one file:
src/content/panel-host.js→ dynamicimport(settings.js)settings.js→settings-schema.js→template.js→slug.js← the missing hopmarkdown.js→vendor/turndown*.js(glob-covered)src/content/*.jsadapters → withinsrc/content/*, plusvendor/readability.jsandlib/markdown.js(already listed)slug.jswas the only file missing; everything else was already covered. No glob was needed, so the web-accessible surface stays minimal.Verification
npm test→ 386/386 passnpm run lint→ cleannpm run release:check→ "Release validation passed for Markdown Clipper 1.1.0."🤖 Generated with Claude Code