8000 feat(clipper): build the web clipper for Firefox by adeelahmad · Pull Request #282 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content 1 8000

feat(clipper): build the web clipper for Firefox - #282

Merged
adeelahmad merged 8 commits into
mainfrom
claude/project-thread-4bp7m5
Oct 10, 2026
Merged

adeelahmad merged 8 commits into
mainfrom
claude/project-thread-4bp7m5

Conversation

@adeelahmad
@adeelahmad adeelahmad commented Oct 10, 2026 •
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the web clipper (#277) built only for Chrome.

After: npm run build also produces dist/firefox, which loads in Firefox 128+ through about:debugging. CI checks it with Mozilla's own linter and packages an upload-ready zip. On a release, if the AMO_JWT_ISSUER / AMO_JWT_SECRET secrets are set, Mozilla signs the self-hosted build (dist/firefox-selfhosted, from #294) as an unlisted add-on, and the release gets lens-clipper-firefox.xpi. That copy updates itself through the lens-clipper-firefox-updates.json the Browser extension workflow attaches.

How:

  • extensions/browser/targets/firefox.json: background scripts instead of service_worker, gecko id lens-clipper@adeelahmad.github.io, strict_min_version 128 (for MV3 optional_host_permissions), and data_collection_permissions: none (clips go only to the user's own Lens).
  • New .github/workflows/browser-extension-firefox.yml: build the firefox target, run web-ext lint (fails on errors), run web-ext build, and on release rebuild with EXT_UPDATE_BASE and run web-ext sign --channel unlisted on dist/firefox-selfhosted.
  • release.yml starts the new workflow alongside browser-extension.yml.
  • A Firefox section in docs/web-clipper.md. No core files changed.

Steps to reproduce

cd extensions/browser && npm ci && npm run build -- --target firefox, then about:debugging → This Firefox → Load Temporary Add-on → dist/firefox/manifest.json.

Checked locally with web-ext 10.7.0:

  • lint on dist/firefox: 0 errors, 5 warnings. data_collection_permissions is newer than Firefox 128, which ignores it. Three are innerHTML notes: two inside Mozilla's Readability, and one writes into an inert document.
  • lint --self-hosted on dist/firefox-selfhosted: 0 errors.
  • The 22 clipper tests pass, and actionlint passes on both workflows.

Types of changes

  • New feature (non-breaking change which adds functionality)

🤖 Generated with Claude Code

https://claude.ai/code/session_016VFSmxk1DTu5en8qADgXzE

A MV3 extension in extensions/browser: clip the page (Readability), the
selection or a picked element to Markdown with MarkDownload-style
templates, and send it to Lens through a namespace's import webhook.
Shared core for the Firefox, Edge and Safari targets; CI builds a zip
per target and attaches them to releases.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018uA6PhZXrmpgsbfDh2W23u
Adds the firefox target (background scripts, gecko id, Firefox 128+), a workflow
that runs web-ext lint and build on dist/firefox and signs an unlisted xpi on
release when AMO API secrets exist, and Firefox notes in the clipper docs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VFSmxk1DTu5en8qADgXzE
@adeelahmad adeelahmad self-assigned this Oct 10, 2026
Base automatically changed from claude/project-thread-sin0jk to main October 10, 2026 20:18
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VFSmxk1DTu5en8qADgXzE
Merges main (with the self-hosted builds) and signs dist/firefox-selfhosted, so
the release's lens-clipper-firefox.xpi updates itself from the newest release.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VFSmxk1DTu5en8qADgXzE
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VFSmxk1DTu5en8qADgXzE
The release bumped the backend version without regenerating openapi.json, so
pre-commit's generate-openapi-schema hook fails on main and every PR.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VFSmxk1DTu5en8qADgXzE
Copy link
Copy Markdown
Owner Author

pre-commit was failing at generate-openapi-schema for a reason outside this PR. The v0.7.0 release commit (a6b3905) bumped the backend version but didn't regenerate nextjs-frontend/openapi.json, so main is red the same way. This PR now includes that regeneration, made with the repo's generator: a one-line info.version change, 0.6.0 → 0.7.0. Once the same change lands on main it adds nothing.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VFSmxk1DTu5en8qADgXzE
@adeelahmad
adeelahmad merged commit 7f46367 into main Oct 10, 2026
13 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-4bp7m5 branch October 10, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4B4F Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0