- rewrite README and add CONTRIBUTING guide for the new workflow - delete devcontainer setup and AGENTS notes no longer needed - point the Margin generator ID at the new GitHub repository
···11-# Agent Notes
22-33-- Relocated the project Dockerfile into `.devcontainer/Dockerfile` so GitHub Codespaces can pick it up automatically.
44-- Added `.devcontainer/devcontainer.json` pointing to the Dockerfile, sets remote user `app`, and recommends necessary VS Code extensions.
55-- Dropped the Rust Analyzer recommendation per project requirements; keep the list lean to essentials.
66-- Remember to mirror any environment dependency updates in both the Dockerfile and devcontainer definition.
+65
CONTRIBUTING.md
···11+## Contributing to ATProto Social
22+33+### Development install (temporary)
44+55+1. Open `about:debugging#/runtime/this-firefox`.
66+2. Click **Load Temporary Add-on…** and choose `manifest.json` inside the
77+ `extension/` directory.
88+3. Pin the "ATProto Social" toolbar button if you want quick access.
99+1010+> This method is ideal while iterating; Firefox forgets the add-on on restart.
1111+1212+### Development tips
1313+1414+- Inspect background/service-worker logs from `about:debugging` → **Inspect**.
1515+- The UI scripts (`popup.js` and `options.js`) log to the DevTools console
1616+ attached to their respective documents.
1717+- When packaging for distribution, zip the contents of the `extension/`
1818+ directory (see workflow below).
1919+- Licensed under the [Apache License 2.0](./LICENSE).
2020+2121+### Implementation notes
2222+2323+- The background worker discovers the user's PDS by resolving the handle
2424+ (`com.atproto.identity.resolveHandle` + PLC lookup).
2525+- Sessions are refreshed automatically via `com.atproto.server.refreshSession`
2626+ when the access JWT expires.
2727+- All data stays in `browser.storage.local`; nothing is transmitted to
2828+ third-party services beyond the ATProto endpoints.
2929+- Margin records use the `at.margin.annotation` and `at.margin.highlight`
3030+ lexicons with a `TextQuoteSelector` for text targeting.
3131+- Maximum lengths follow the current Frontpage limits (120 characters for the
3232+ title, 2048 for URLs).
3333+3434+### Self-distribution pipeline
3535+3636+This repository includes `.github/workflows/package-extension.yml` which builds
3737+(and optionally signs) the add-on using
3838+[`web-ext`](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/).
3939+4040+1. Configure `AMO_JWT_ISSUER` and `AMO_JWT_SECRET` repository secrets with your
4141+ AMO API credentials if you want automatic signing. Without the secrets, the
4242+ workflow still produces an unsigned ZIP you can download.
4343+2. Trigger the workflow manually (`Actions` → **package-extension** →
4444+ **Run workflow**).
4545+3. Download the artifacts:
4646+ - `frontpage-extension-unsigned` contains the ZIP that `web-ext build`
4747+ generates.
4848+ - `frontpage-extension-signed` (only when secrets are present) contains the
4949+ signed `.xpi` from AMO for self-hosting.
5050+4. Each run also publishes a GitHub Release (tagged `v<version>-<run-id>`) that
5151+ ships the same ZIP/XPI assets, so you can share a permanent download link.
5252+ - Mozilla requires every signed upload to have a unique version number. Bump
5353+ `version` in `extension/manifest.json` before rerunning the workflow if you
5454+ need a new signed package.
5555+5656+These artifacts can be hosted directly for self-distribution as described in the
5757+[Mozilla documentation](https://extensionworkshop.com/documentation/publish/self-distribution/).
5858+5959+### Tangled mirror
6060+6161+The `mirror-to-tangled.yml` workflow pushes every commit on `main` to Tangled, a
6262+federated Git hosting platform built on ATProto. Browse the mirror at
6363+<https://tangled.org/anton.galiglobal.com/frontpage_firefox_plugin>. Add a
6464+deploy key with write access as the `TANGLED_DEPLOY_KEY` repository secret so
6565+the mirror stays up to date.
+62-62
README.md
···11## ATProto Social — Firefox extension
2233-A Firefox WebExtension for publishing to ATProto-based social platforms directly from your browser.
33+A Firefox WebExtension for publishing to ATProto-based social platforms directly
44+from your browser.
4555-> ℹ️ This repository is hosted on [tangled](https://tangled.org/anton.galiglobal.com/frontpage_firefox_plugin) (PRs, issues) and [GitHub](https://github.com/antonmry/frontpage_firefox_plugin) (CI/CD, releases).
66+> ℹ️ This repository is hosted on
77+> [tangled](https://tangled.org/anton.galiglobal.com/frontpage_firefox_plugin)
88+> (PRs, issues) and [GitHub](https://github.com/antonmry/atproto_firefox_plugin)
99+> (CI/CD, releases).
610711### Features
81299-- **Margin tab** — select text on any page and publish it as a highlight or annotation to [margin.at](https://margin.at):
1313+- **Margin tab** — select text on any page and publish it as a highlight or
1414+ annotation to [margin.at](https://margin.at):
1015 - No comment → creates an `at.margin.highlight` record.
1111- - With comment → creates an `at.margin.annotation` record (`motivation: commenting`).
1212- - Uses the W3C `TextQuoteSelector` (exact text + surrounding context) for precise targeting.
1313-- **Frontpage tab** — share the current tab to [frontpage.fyi](https://frontpage.fyi) by creating a `fyi.frontpage.feed.post` record on your ATProto account.
1616+ - With comment → creates an `at.margin.annotation` record
1717+ (`motivation: commenting`).
1818+ - Uses the W3C `TextQuoteSelector` (exact text + surrounding context) for
1919+ precise targeting.
2020+- **Frontpage tab** — share the current tab to
2121+ [frontpage.fyi](https://frontpage.fyi) by creating a `fyi.frontpage.feed.post`
2222+ record on your ATProto account.
1423 - Auto-fills the active tab's title and URL.
1524 - Title length indicator (120 character limit).
1616-- Background service worker handles ATProto login, token refresh, and record creation for both services.
2525+- Background service worker handles ATProto login, token refresh, and record
2626+ creation for both services.
1727- Options page for storing your handle, app password, and optional PDS override.
18281929### Prerequisites
20302131- An ATProto account (Bluesky or self-hosted PDS).
2222-- An app password for that account (create one at <https://bsky.app/settings/app-passwords> or via your own PDS).
3232+- An app password for that account (create one at
3333+ <https://bsky.app/settings/app-passwords> or via your own PDS).
23342424-### Install a packaged build
3535+### Install on Firefox (desktop)
25362626-1. Visit the [Releases](https://github.com/antonmry/frontpage_firefox_plugin/releases) page and download the latest `frontpage-submitter-<version>.xpi` (signed) or `.zip` (unsigned) asset.
2727-2. In Firefox, open `about:addons`, click the gear icon, and choose **Install Add-on From File…**.
2828-3. Select the downloaded `.xpi` (preferred) or `.zip` to complete the installation and approve the permissions prompt.
3737+1. Visit the
3838+ [Releases](https://github.com/antonmry/atproto_firefox_plugin/releases) page
3939+ and download the latest `frontpage-submitter-<version>.xpi` (signed) or
4040+ `.zip` (unsigned) asset.
4141+2. In Firefox, open `about:addons`, click the gear icon, and choose
4242+ **Install Add-on From File…**.
4343+3. Select the downloaded `.xpi` (preferred) or `.zip` to complete the
4444+ installation and approve the permissions prompt.
4545+4646+### Install on Firefox for Android
4747+4848+Firefox for Android requires enabling the **"Install from file"** option first:
4949+5050+1. Open Firefox for Android → tap the three-dot menu → **Settings** →
5151+ **About Firefox**.
5252+2. Tap the Firefox logo **5 times** to unlock debug options.
5353+3. Go back to **Settings** — a new **Install extension from file** option now
5454+ appears at the bottom.
5555+4. Download the signed `.xpi` from the
5656+ [Releases](https://github.com/antonmry/atproto_firefox_plugin/releases) page
5757+ to your device.
5858+5. Tap **Install extension from file**, select the downloaded `.xpi`, and
5959+ approve the permissions prompt.
6060+6161+> The extension must be signed by Mozilla. Unsigned `.xpi` files are rejected on
6262+> Android. Use the signed asset from the releases page.
29633064### Configure credentials
31653232-1. Open the add-on pop-up and press the gear icon (or use `about:addons` → **Preferences**).
3333-2. Enter your handle and app password. Supply a PDS URL only if you run a custom server.
3434-3. Click **Save credentials**. A success message confirms that the session tokens are stored locally.
3535-4. Use **Log out** at any time to remove stored tokens (you can also revoke the app password server-side).
6666+1. Open the add-on pop-up and press the gear icon (or use `about:addons` →
6767+ **Preferences**).
6868+2. Enter your handle and app password. Supply a PDS URL only if you run a custom
6969+ server.
7070+3. Click **Save credentials**. A success message confirms that the session
7171+ tokens are stored locally.
7272+4. Use **Log out** at any time to remove stored tokens (you can also revoke the
7373+ app password server-side).
36743775### Publish a highlight or annotation (Margin)
387639771. Select text on any webpage.
4040-2. Open the ATProto Social pop-up — the **Margin** tab opens by default with the selected text pre-filled.
7878+2. Open the ATProto Social pop-up — the **Margin** tab opens by default with the
7979+ selected text pre-filled.
41803. Optionally add a comment (turns a highlight into an annotation).
42814. Click **Highlight on Margin** or **Annotate on Margin**.
43824483### Submit a link (Frontpage)
458446851. Browse to the page you want to share.
4747-2. Open the ATProto Social pop-up and switch to the **Frontpage** tab; the title and URL are pre-filled.
8686+2. Open the ATProto Social pop-up and switch to the **Frontpage** tab; the title
8787+ and URL are pre-filled.
48883. Adjust the text if necessary and click **Post to Frontpage**.
4949-4. On success, the pop-up reports the record URI returned by `com.atproto.repo.createRecord`.
5050-5151-### Implementation notes
5252-5353-- The background worker discovers the user's PDS by resolving the handle (`com.atproto.identity.resolveHandle` + PLC lookup).
5454-- Sessions are refreshed automatically via `com.atproto.server.refreshSession` when the access JWT expires.
5555-- All data stays in `browser.storage.local`; nothing is transmitted to third-party services beyond the ATProto endpoints.
5656-- Margin records use the `at.margin.annotation` and `at.margin.highlight` lexicons with a `TextQuoteSelector` for text targeting.
5757-- Maximum lengths follow the current Frontpage limits (120 characters for the title, 2048 for URLs).
5858-5959-### Development tips
6060-6161-- Inspect background/service-worker logs from `about:debugging` → **Inspect**.
6262-- The UI scripts (`popup.js` and `options.js`) log to the DevTools console attached to their respective documents.
6363-- When packaging for distribution, zip the contents of the `extension/` directory (see workflow below).
6464-- Licensed under the [Apache License 2.0](./LICENSE).
6565-6666-### Development install (temporary)
6767-6868-1. Open `about:debugging#/runtime/this-firefox`.
6969-2. Click **Load Temporary Add-on…** and choose `manifest.json` inside the `extension/` directory.
7070-3. Pin the "ATProto Social" toolbar button if you want quick access.
7171-7272-> This method is ideal while iterating; Firefox forgets the add-on on restart.
7373-7474-### Self-distribution pipeline
7575-7676-This repository includes `.github/workflows/package-extension.yml` which builds (and optionally signs) the add-on using [`web-ext`](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/).
8989+4. On success, the pop-up reports the record URI returned by
9090+ `com.atproto.repo.createRecord`.
77917878-1. Configure `AMO_JWT_ISSUER` and `AMO_JWT_SECRET` repository secrets with your AMO API credentials if you want automatic signing.
7979- Without the secrets, the workflow still produces an unsigned ZIP you can download.
8080-2. Trigger the workflow manually (`Actions` → **package-extension** → **Run workflow**).
8181-3. Download the artifacts:
8282- - `frontpage-extension-unsigned` contains the ZIP that `web-ext build` generates.
8383- - `frontpage-extension-signed` (only when secrets are present) contains the signed `.xpi` from AMO for self-hosting.
8484-4. Each run also publishes a GitHub Release (tagged `v<version>-<run-id>`) that ships the same ZIP/XPI assets, so you can share a permanent download link.
8585- - Mozilla requires every signed upload to have a unique version number. Bump `version` in `extension/manifest.json` before rerunning the workflow if you need a new signed package.
8686-8787-These artifacts can be hosted directly for self-distribution as described in the [Mozilla documentation](https://extensionworkshop.com/documentation/publish/self-distribution/).
8888-8989-### Tangled mirror
9090-9191-The `mirror-to-tangled.yml` workflow pushes every commit on `main` to Tangled, a federated Git hosting platform built on ATProto.
9292-Browse the mirror at <https://tangled.org/anton.galiglobal.com/frontpage_firefox_plugin>.
9393-Add a deploy key with write access as the `TANGLED_DEPLOY_KEY` repository secret so the mirror stays up to date.
9292+See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup, build pipeline,
9393+and implementation notes.