Skip to content

Firefox support - #17

Merged
pascalbaljet merged 35 commits into
masterfrom
firefox
Aug 19, 2026
Merged

Firefox support#17
pascalbaljet merged 35 commits into
masterfrom
firefox

Conversation

@pascalbaljet

@pascalbaljet pascalbaljet commented Aug 13, 2026

Copy link
Copy Markdown
Member

This PR adds Firefox support to the Inertia.js DevTools extension while keeping both browsers on the same sources. Firefox cannot run the MV3 service worker used by Chrome, so it loads the same background bundle as an event page and receives its own generated manifest with a stable Gecko ID, minimum version, and AMO data-collection declaration. It also accounts for Firefox’s missing DNR enum objects, revocable per-site permissions, and different DevTools panel path resolution. CI validates both builds, and releases now contain separate Chrome and Firefox archives.

The E2E suite required a larger rewrite because Playwright can only load extensions in Chromium, while its bundled Firefox does not reliably inject extension content scripts. Playwright still handles test discovery, assertions, and reporting, but Selenium now starts and drives a fresh Chrome or Firefox session for every test and installs the corresponding extension.

Fixes #12

pascalbaljet and others added 30 commits August 7, 2026 13:29
Both browsers now build from the same sources. `manifest.config.ts` generates the
manifest per target and `vite.config.ts` requires `EXTENSION_TARGET` to name one, so
the two targets are peers: `build:chrome` writes `dist-chrome/`, `build:firefox`
writes `dist-firefox/`, and there is no bare `pnpm build` that quietly favours one
browser. The version comes from package.json at build time, so the hand-maintained
manifest.json is gone.

Firefox has no MV3 service worker, so it loads the same background bundle as an event
page, which the existing dependency-free bundling already allowed. It also ships none
of the declarativeNetRequest enum objects, so the tab header rule is written with the
wire strings both browsers accept, and host permissions are revocable per site there,
which the panel now detects and reports in a banner instead of looking like an app
without a recorder. devtools.html moved to the root of the build because Firefox
resolves the panel path against that page's own URL.

Firefox gets one automated smoke test on top of that, as its own Playwright
project. It cannot use the Chrome fixtures, since Playwright loads extensions in
Chromium only, so it installs the add-on over Firefox's Remote Debugging Protocol and
reads the background page and the panel through the same channel: Playwright never
attaches to a privileged moz-extension page, not even one the extension opens itself.
CI also runs web-ext lint over the Firefox build, which is what AMO validates on
submission.

BROWSERS.md documents where the two targets differ, what the smoke test does and does
not cover, the manual checklist for the rest and what each store needs at submission.
@pascalbaljet
pascalbaljet merged commit cdbec06 into master Aug 19, 2026
7 checks passed
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.

Features Request: Support Firefox Browser

1 participant