feat(extension): Firefox and Edge web clipper support#644
Merged
Conversation
WXT already shares all clipper logic via browser.* + @memry/article-extract, so Firefox and Edge become build targets of the same extension, not new apps. - wxt.config: gecko id + MV3 floors (FF 140 / Android 142) + data_collection_permissions:[none] for AMO; Firefox builds force --mv3 so browser.action/host_permissions match the Chrome source unchanged. - package.json: dev/build/zip scripts for :firefox and :edge. - capture server: accept moz-extension:// (Firefox) origins during pairing. The /pair/request and claimPairing guards were hardcoded to chrome-extension://, so Firefox's moz-extension:// origin was rejected and the popup showed 'Approve the Memry extension, then try again.' Factored the check into isExtensionOrigin() in auth.ts (single source of truth) and added regression tests. Edge uses chrome-extension://, so it needed no server change. - README: load/build instructions for Firefox (temp add-on) and Edge.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
What
Firefox and Edge join Chrome as targets of the same WXT web-clipper build — no new app, no duplicated code. All clipper logic already uses the cross-browser
browser.*API and shares@memry/article-extract, so the browsers are build targets, not forks.Changes
Extension (
apps/extension)wxt.config:geckoid + MV3 floors (Firefox 140 / Android 142) +data_collection_permissions: [none]for AMO. Firefox builds force--mv3sobrowser.action/host_permissionsmatch the Chrome source unchanged.package.json:dev/build/zipscripts for:firefoxand:edge.README: load + build instructions for Firefox (temporary add-on) and Edge.Desktop capture (
apps/desktop/src/main/capture)moz-extension://(Firefox) origins during pairing. The/pair/requestandclaimPairingguards were hardcoded tochrome-extension://, so Firefox's origin was rejected and the popup showed "Approve the Memry extension, then try again." Factored the check intoisExtensionOrigin()inauth.ts(single source of truth) + regression tests. Edge useschrome-extension://, so no server change was needed.Docs
capturing.md: the extension runs on Chrome, Edge, and Firefox 140+.Verification
build:firefox→ MV3 manifest (action,host_permissions,background.scripts); AMO upload validates (0 errors), and a reproducible source zip rebuilds byte-identical.pnpm --filter @memry/desktop test:main→ 3288 passed (incl. new Firefox pairing cases).typecheck+lintclean;docs:impact --strict+docs:buildpass.Note
Overlaps with #643 (safari-clipper): both extend
isExtensionOrigin— this addsmoz-extension://, #643 addssafari-web-extension://. Trivial merge: combine the two prefixes.