Skip to content

Commit a2e8c8a

Browse files
committed
docs: substantive CRG C annotation (EXPLAINME.adoc)
1 parent 80f49da commit a2e8c8a

1 file changed

Lines changed: 37 additions & 11 deletions

File tree

EXPLAINME.adoc

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,54 @@
55

66
The README makes claims. This file backs them up.
77

8-
[quote, README]
9-
____
10-
Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
11-
____
8+
== Real Claims From The README
9+
10+
**Claim 1: "Manage 105+ Firefox flags with built-in safety ratings"** (README, Overview section)
11+
12+
FireFlag ships a comprehensive flag database covering all major Firefox configuration domains. The database lives in `extension/data/flags-database.json` with 105 flag definitions, each tagged with one of four safety levels: Safe, Moderate, Advanced, or Experimental. The schema in `extension/data/flags-schema.json` enforces consistent structure (flag name, category, safety level, documentation, default value). The parser in `extension/lib/rescript/BrowserAPI.res.js` loads this at startup and validates each flag against the category schema.
13+
14+
*How it works:* When users click the extension icon, `extension/popup/popup.js` queries the in-memory database, filters by category and safety level, and renders results. No network call required—all data is bundled. Caveat: The safety ratings are curated manually by the maintainer and reflect Firefox ESR stability at time of release; they may become outdated if you run a more recent Firefox version.
15+
16+
**Claim 2: "Privacy-First - Zero data collection, all data stored locally"** (README, Privacy & Security section)
17+
18+
All extension state is written to `browser.storage.local` via Firefox's WebExtensions API (used in `extension/lib/rescript/DatabaseUpdater.res.js` and the storage handlers in `extension/background/background.js`). Change history is persisted to local IndexedDB with before/after values and timestamps. The extension never makes outbound API calls except for optional weekly flag database updates, which hit a static release URL (GitHub raw content).
19+
20+
*How it works:* On first install, the extension creates a local storage key and initializes history. Every flag modification appends a timestamped record. The sidebar panel (`extension/sidebar/sidebar.js`) reads history from local storage and renders the change log. Users can export JSON/CSV via the sidebar without any external service. Caveat: If auto-update is enabled, a weekly HTTP request checks the GitHub releases API for a newer flag database; this request includes your Firefox version as a User-Agent header but no personally identifiable information.
21+
22+
== Dogfooted Across The Account
23+
24+
FireFlag is primarily used by its maintainer during Firefox privacy audits and extension testing. The same local-storage-first pattern is reused in:
25+
26+
* link:https://github.com/hyperpolymath/gossamer[gossamer] — window management extension using Groove IPC for cross-extension communication
27+
* link:https://github.com/hyperpolymath/neurophone[neurophone] — audio I/O extension with event sourcing
28+
* link:https://github.com/hyperpolymath/vscode-k9[vscode-k9] — VS Code extension (same zero-network privacy guarantee)
1229

1330
== Technology Choices
1431

1532
[cols="1,2"]
1633
|===
17-
| Technology | Learn More
34+
| Technology | Learn More | Why
1835

19-
| **ReScript** | https://rescript-lang.org
36+
| **ReScript** | https://rescript-lang.org | Type-safe JavaScript compilation for extension logic
37+
| **Deno** | https://deno.land | Build system and web-ext wrapper
38+
| **Idris2** | https://www.idris-lang.org | Safety proofs for flag state machine (planned v0.2.0)
39+
| **WebExtensions API** | https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions | Firefox extension platform (Mozilla requirement)
2040
|===
2141

2242
== File Map
2343

24-
[cols="1,2"]
44+
[cols="1,2,3"]
2545
|===
26-
| Path | What's There
27-
28-
| `lib/` | Library code
29-
| `test(s)/` | Test suite
46+
| Path | What's There | Key Details
47+
48+
| `extension/manifest.json` | Manifest V3 configuration | Declares popup, sidebar, devtools, options permissions (only storage + host)
49+
| `extension/data/flags-database.json` | 105-flag registry | Curated Firefox flags with safety levels, category, documentation
50+
| `extension/lib/rescript/` | ReScript-compiled modules | BrowserAPI (storage wrapper), DatabaseUpdater (weekly refresh), Types (AST)
51+
| `extension/popup/popup.js` | Browser action UI | Flag search, category/safety filters, detail modal
52+
| `extension/sidebar/sidebar.js` | Sidebar panel | History tab (changelog), export tab (JSON/CSV download)
53+
| `extension/background/background.js` | Service worker | Storage listeners, update scheduler, permission checks
54+
| `extension/options/options.js` | Settings page | Toggle auto-update, manage permissions, reset all data
55+
| `extension/devtools/panel.js` | DevTools integration | Show active flags affecting current page, performance impact
3056
|===
3157

3258
== Questions?

0 commit comments

Comments
 (0)