thunderbird-patch-review

Easy-to-use patch review interface for Thunderbird

Contribute: ~marcc/thunderbird-review-plugin@lists.sr.ht

git clone git://mccd.space/thunderbird-patch-review

AGENTS.md (1908B)

      1 # Agent Notes
      2 
      3 ## Commits
      4 
      5 Commits must be **atomic**: each commit is a single, self-contained change
      6 that builds and passes the tests on its own. Do not bundle unrelated edits
      7 into one commit, and do not leave a change half-finished across commits. If
      8 a task touches more than one concern, split it into a series of small
      9 commits, each with a focused message describing exactly that concern.
     10 
     11 Scope of "atomic" here:
     12 
     13 - One logical change per commit (a fix, a feature, a refactor — not mixed).
     14 - The extension still loads and `tests/run.mjs` still passes after every
     15   commit, not only at the tip of the series.
     16 - The commit message subject line summarizes the single concern; the body,
     17   when needed, explains why.
     18 
     19 ## Repository layout
     20 
     21 - `extension/` — the Thunderbird MailExtension (manifest v2, no build step).
     22   - `review/review.{html,css,js}` — the review tab UI.
     23   - `modules/` — pure modules: diff parsing, intraline highlight, reply
     24     formatting, review storage, series collection, sourcehut.
     25   - `api/patchHost/` — the privileged WebExtension Experiment (schema +
     26     implementation) behind Apply, Browse..., and Open editor. The only
     27     chrome-privileged code in the add-on; everything else is sandboxed.
     28   - `background.js` — background page driving the experiment and tabs.
     29 - `tests/` — `run.mjs` exercises the pure modules and the experiment's
     30   manifest wiring against fixtures; generate fixtures with
     31   `gen-fixtures.sh`.
     32 
     33 ## Running the tests
     34 
     35 ```
     36 node tests/run.mjs
     37 ```
     38 
     39 ## Rebuilding the .xpi
     40 
     41 Always rezip `patch-review.xpi` after touching the extension so the user can
     42 install and test the current tree:
     43 
     44 ```
     45 ( cd extension && zip -qrX ../patch-review.xpi . )
     46 ```
     47 
     48 (When `zip` is unavailable, fall back to `python3 -m zipfile -c
     49 patch-review.xpi extension/*` — but the archive must keep `manifest.json` at
     50 its root, not under `extension/`.) The `.xpi` is gitignored.