From 0288294c9cda87a2a1830b64ef208a430276175e Mon Sep 17 00:00:00 2001 From: "@permadeath.com" Date: Sat, 8 Aug 2026 16:01:43 -0400 Subject: [PATCH] docs: describe reinjection and the detection queue in the README Co-Authored-By: Claude Fable 5 --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36a9998..9c53e3b 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,14 @@ npm test # vitest unit tests (src/lib/*.test.ts; no network) ``` `npm run dev` watches both build environments (`scripts/dev.mjs`). After an -edit, reload the extension from `chrome://extensions`; the popup and content -script pick up the new build on next open / page load. +edit, reload the extension from `chrome://extensions`; the popup picks up the +new build on next open, and the worker re-injects the content script into +open tabs itself (`chrome.runtime.onInstalled`), since manifest injection +only happens at document load and a reload or store update would otherwise +leave every open tab orphaned until navigation. The resulting burst of +per-tab detection runs is smoothed by a small queue +(`src/lib/scheduler.ts`): a few run at once, the newest request per tab +wins, and popup/active-tab requests jump ahead. `./deploy-ext.sh` packages a Chrome Web Store release: it refuses a dirty tree, runs the typecheck and tests, asserts `package.json` and -- 2.51.2