diff --git a/.claude/skills/testing-the-userscript/SKILL.md b/.claude/skills/testing-the-userscript/SKILL.md index 150e9a2..1267d5f 100644 --- a/.claude/skills/testing-the-userscript/SKILL.md +++ b/.claude/skills/testing-the-userscript/SKILL.md @@ -14,7 +14,7 @@ parsers, helpers. UI, network, and storage behaviour are verified on-device. ```bash node --check userscript/manga-bookmark.user.js # parse check, silent on success -node --test userscript/test/logic.test.js # 14 tests as of 2026-07-28 +node --test userscript/test/logic.test.js # 35 tests as of 2026-08-10 ``` Run both before every commit that touches the userscript. diff --git a/README.md b/README.md index 5a293a4..adcdee1 100644 --- a/README.md +++ b/README.md @@ -261,8 +261,10 @@ an API. ## Adapter reference (verified live 2026-07-24) -The site adapters key everything off URL regex, with `title`/`cover` from -`og:title` / `og:image`. Confirmed against live pages via Playwright: +The site adapters key everything off URL regex, with `title` from `og:title` +(or the page's own heading where a site ships none). No adapter reads a cover: +the backend acquires, stores and serves every Cover from its own origin +(ADR-0007). Confirmed against live pages via Playwright: | Site | Series URL | Chapter URL | `series_id` | |------|-----------|-------------|-------------| diff --git a/backend/internal/api/handlers.go b/backend/internal/api/handlers.go index c48b489..dba1eeb 100644 --- a/backend/internal/api/handlers.go +++ b/backend/internal/api/handlers.go @@ -51,11 +51,11 @@ func (h *Handler) Put(w http.ResponseWriter, r *http.Request) { return } // A body may carry a cover, and it is discarded here rather than - // rejected: every installed userscript still sends one, and ADR-0004's - // compatibility argument depends on those scripts continuing to work. The - // Cover is acquired server-side (ADR-0007), so the field is permanently - // inert - not pending removal, and not a value any later code should - // start reading. + // rejected: an older installed userscript may still send one, and + // ADR-0004's compatibility argument depends on those scripts continuing + // to work. The Cover is acquired server-side (ADR-0007), so the field is + // permanently inert - not pending removal, and not a value any later code + // should start reading. b.Cover = "" // Path key is authoritative; derive site/series_id from it when the body diff --git a/userscript/test/logic.test.js b/userscript/test/logic.test.js index 589d912..f095de3 100644 --- a/userscript/test/logic.test.js +++ b/userscript/test/logic.test.js @@ -41,9 +41,6 @@ globalThis.document = { const v = metaTags[m[1]]; return v == null ? null : { getAttribute: () => v }; }, - querySelectorAll() { - return []; - }, addEventListener() {}, get title() { return docTitle;