Skip to content

v2.8.1 - #1058

Merged
ajslater merged 533 commits into
mainfrom
develop
Nov 25, 2026
Merged

v2.8.1#1058
ajslater merged 533 commits into
mainfrom
develop

Conversation

@ajslater

Copy link
Copy Markdown
Owner

🐛 Fixed

  • Reading lists find every volume of a series name, not only the first.
  • Review suggests the likely comic for a missing reading list issue.

Closes #1053

ajslater and others added 30 commits September 28, 2026 11:50
…932)

* style(frontend): apply the autofixable pending ESLint rules

Re-enable the 29 rules from the pending-cleanup block whose findings all
had autofixes and apply them: switch-case braces, useless `undefined`,
ternaries and early returns, explicit length checks, `globalThis` over
`self`/`window`, numeric separators, `String.raw`, `node:` imports, split
limits, and the perfectionist import/module/set/switch-case sorters.

Checked before applying: the sorted Sets are only used for membership,
every sorted switch case ends in `break`, and the `main.js` import sort
leaves the side-effect CSS imports first. Building with the old and new
`main.js` import order produces byte-identical CSS.

Hand fixes for what the autofix exposed: three bare `return;` left behind
by `return undefined`, and the CSRF cookie pattern becomes a regex literal
instead of a `RegExp()` call on a concatenated string.

`unicorn/single-line-block-comment-style` goes to the style block as off.
The code mixes one-line `/** x */` and starred three-line block comments,
and the rule's autofix mangles one or the other in both of its modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(frontend): add Unicode flags and named groups to regexes

Re-enable the five regex rules from the pending-cleanup block.

- Every regex gets a Unicode flag. Browser code uses `u`; tests and the
  Vite config, which run in Node, use `v`.
- The CSRF cookie, field-label and icon-name test patterns use a named
  group or `$&` instead of a numbered capture group.
- normalizeUrlPathPrefix trims slashes with two index loops instead of
  `/\/+$/`, which backtracks quadratically on long slash runs.
- The CORS escape class escapes the characters `v` mode reserves.

Each rewritten pattern was checked against the old one on sample inputs,
including every printable ASCII character for the escape class.

`regexp/require-unicode-sets-regexp` is off for browser code in a new
browser-floor block. The app already needs Safari/iOS 15.4 and nothing
newer. The `v` flag needs Safari 17, and the bundler compiles each `v`
literal into a RegExp() call, so the ones evaluated at startup would stop
the app loading on older iPads. The only `v` regex in the bundle today is
in pdf.js, in the lazily loaded PDF reader chunk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(frontend): fix the pending ESLint findings in specs

Mechanical rewrites that keep every assertion the same:

- Specific matchers: toBeNull(), toHaveLength(), toBeCloseTo() for the
  one float comparison, and test.each for three repeated stats-tab cases.
- Module-level `let` reassigned in hooks moves inside its describe, or
  becomes a `const` array cleared with `length = 0` where several
  describes share it.
- Helpers that capture nothing move to module scope.
- toSorted with explicit comparators, iterator helpers, :scope selectors,
  Promise.withResolvers, and await/try in place of .catch chains. Specs
  run in Node, so they may use APIs newer than the browser floor.

New getReaderRoute cases pin today's behavior: every reading direction
opens an unbookmarked comic at page 0, a bookmark page wins, and there is
no route without ids or for an unimported comic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(frontend): fix the remaining pending ESLint findings

Delete the pending-cleanup block from eslint.config.js. Every rule in it
is now either on and passing, or off in a named block with its reason.

Promise chains (unicorn/prefer-await, 149 sites):
- Awaited `.then().catch()` chains become try/await/catch. Promises the
  old callbacks returned are awaited inside the try, so the same errors
  are caught.
- Every action resolves to the same value as before. Where a `.then`
  returned `true` into an awaited-but-not-returned chain, that value never
  reached callers; the dead return is dropped, not promoted.
- Fire-and-forget chains in synchronous code keep their original shape
  behind `void`, so nothing is reordered and synchronous throws still
  propagate.
- main.js mounts with top-level await, which Vite now emits natively.
- The service worker hands waitUntil/respondWith an async IIFE's promise.
- dedupedFetch keeps its one-tick deferral in an async helper, so a
  fetcher that throws synchronously still can't strand its cache entry.

Other findings:
- Module-level mutable state (bookmark debounce, socket reconnect and
  heartbeat, CSRF cookie cache) is grouped into one object per module.
- Booleans are renamed; public option keys and positional callers are
  unchanged.
- parseInt/parseFloat become Number() only where every reachable input
  converts the same; null issue numbers and unmapped Metron ratings keep
  their NaN paths.
- Dynamic property checks become Object.hasOwn or explicit comparisons,
  chosen per site from what the map can hold.
- getReaderRoute loses a branch that never ran: its direction Set was
  built from the string "rtl", so it held r, t and l. Every book already
  opened at its bookmark or page 0, and still does.
- The metadata tags getter sorted store arrays in place; it sorts a copy.
- vite.config.js uses vite-plugin-checker's named export.

The browser-floor block also turns off no-array-sort, no-array-reverse
and prefer-promise-try for browser code. Their only fixes are APIs newer
than Safari 15.4, the most our own code requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ave (#933)

createRow and updateRow catch a rejected save and hand it to the common
store, so they resolved either way, and the dialog closed on every
settle. The server's field errors, like a duplicate username or group
name, landed in the store behind a closed dialog and were never seen.

Both actions now resolve true when the row saved and false when it
didn't, and the dialog closes only on true. Dialog content stays mounted
between opens, so opening it also clears errors left by an earlier
attempt. The other callers ignore the result or only need the action to
resolve, which it still does.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…934)

routeToDirectionOne, the single-page step used in two-page mode, wrote
`this.page += delta` before checking the bounds. On the first page,
"previous" left the reader's page at -1 without navigating, and each
further press drifted further out; the same happened past the last
page. The page display showed the bad value until the next real
navigation.

The step now computes the target page, checks it is inside the book,
and only then writes it and navigates. In-range steps are unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#935)

The reader debounces bookmark writes by a second. The pending write
read `books.current` when its timer fired, and a new write replaced a
pending one. Paging to a book's last page and moving straight on to the
next book therefore either dropped that book's final page and its
`finished` flag, or wrote them to the next book, depending on whether
the timer fired before the next book's first write.

The debounce now captures the book with the page when the write is
scheduled, and a pending write for a different book lands immediately
instead of being replaced. Page turns within one book still coalesce
into a single write.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…936)

Every reader settings action awaits the server and then writes to
whatever book or series scope is open at that moment. Changing a setting
and turning to the next book before the save returned wrote the old
book's settings onto the new one. A slow settings load for a book the
reader had already left could overwrite the settings of the book now
open, including its series settings.

updateComicSettings and clearComicSettings now apply only if the book
they saved is still current. loadAllSettings drops a response for a book
no longer open, since loadBooks starts a fresh load for every new book.
updateIntermediateSettings and clearIntermediateSettings apply only if
the same series, folder or arc scope is still open. Clearing the merged
settings cache stays unconditional, because it is keyed by book.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
loadGlobalSettings started its request in a fire-and-forget async IIFE
and resolved at once. reloadOnDefaultsChange awaits it when the admin
defaults change under an open reader, so it reported the reload done
before the new settings had arrived.

The action now awaits its own request. Callers that don't await it, the
reader view and loadBooks, are unaffected. Errors are still logged and
never reject.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…uests (#938)

_filterSettings built a pruned copy of `filters` and then returned the
original: Array#filter only reads its callback's result as a keep/drop
flag, so the pruned object was thrown away. Mark Read, Force Update and
metadata loads sent every empty filter list along with the ones in use.

It now builds the result directly, so `filters` carries only the filters
in use, and is still dropped when none are. The server reads every filter
with a default, and the filter serializer's fields are optional with no
default, so a missing filter already meant the same as an empty one.
Results don't change; the request gets smaller.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The dialog re-validates the form on every edit and set the submit button
from whichever async form.validate() settled last. It also validated
before the inputs re-rendered, so the check read each field's value from
before the edit: a group name entered in one input event was checked as
blank ("Name is required") and "Add Group" stayed disabled on a valid
form.

Wait a tick so the fields settle, and apply only the newest validation.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Anonymous browsing with Non-Users on logged "Authentication credentials
were not provided." on every load: the SPA sends the browser timezone
for kiosk sessions on purpose (app.vue's nonUsers watcher), but the
v4 cutover folded the v1.7 PUT /auth/timezone/ into PATCH /auth/profile,
whose IsAuthenticated policy 403s anonymous callers. The client was
right; the server regressed. CodexMiddleware activates the session
timezone on every request, anonymous or not, so the value is used.

Restore a dedicated PUT /api/v4/auth/timezone on the default
IsAuthenticatedOrEnabledNonUsers policy (what v1.7 used), point the
client at it, and drop timezone from the profile PATCH so there is one
write path. Relaxing ProfileView instead would have opened its GET and
username/email edits to anonymous callers.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The admin store's generic table engine (loadTable, loadTables, the row
writes and pending-delete revival) backs every admin tab, but the only
store specs covered OIDC and the site defaults. This adds a
characterization spec for it, with every TABLES request function mocked
and each table's real stateField kept.

It covers both response shapes loadTable accepts (a bare array and a
cursor page) and what happens to anything else, the 5 s sticky cache
per table, AgeRatingMetron never expiring, force bypassing the cache,
and loadTables filling each table's own field and resolving only when
all have landed.

It also pins which tables reload after a write: create, update and
delete force-reload only their own table, and a revive force-reloads
PendingDelete and Library, with nothing reloaded when the request
fails. The librarian-status diff keeps unchanged rows (and their
watchers) untouched, and non-staff visitors get no request and no
state change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
_validateTopCollection has needed five fixes and no test reached it: the
existing pipeline specs enter through _validateSearch and never take its
top-collection branches. This spec drives the live store through each of
them, with every case named for the route it runs on.

It covers the root guard and its folders/arcs exception, the switches that
keep the route, the in-place redirect for a parent top collection (whose
numeric page is what keeps _validateAndSaveSettings' "already there" check
from dropping it), the root redirect for a child, the moves to and from
folders and arcs, and the case where no browser route exists yet.

getTopCollection's walk up the hierarchy is pinned against settings.show,
and lowestShownCollection against both browse and non-browse top
collections. No production code changes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The browser store kept a top-level `zeroPad` that nothing reads; the
card subtitle reads the server's `page.zeroPad`. `deleteSavedSettings`
has had no caller since the saved-settings UI landed without a delete
button; the API function it wrapped stays for when one is added. The
misc settings drawer mapped `twentyFourHourTimeTitle`, which its
template never uses.

No behavior change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…om to top (#943)

* refactor(reader): drop reader store bindings no component uses

Eight reader components mapped store members they never read. Two of
them pointed at nothing: the pager mapped an `isBookVertical` action the
store doesn't have, and the books window defined `bookChangePrev` and
`bookChangeNext` computeds that called an unmapped `bookChangeShow` and
would have thrown if anything had rendered them. The rest were real
members left behind by earlier moves: the top toolbar's four navigation
actions, the download panel's `routeParams`, `isBTT` in the book-change
drawer and nav button, and the horizontal pager's `nextBook` and
`setBookChangeFlag`.

The vertical pager only reads `reactWithScroll`, so it maps it with
`mapState` instead of `mapWritableState`.

No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(reader): make the "b" shortcut set bottom to top reading

The reader settings drawer's "b" key wrote the reading direction "bbt",
which isn't a direction the server accepts, so the shortcut never
switched a book to bottom to top. It now writes "btt".

A new spec presses each direction and fit key and checks the values
sent against the reader choices the server generates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…944)

* fix(reader): stop a redundant settings request and a stale zoom fit

Opening a book asked the server for the global reader settings twice.
loadBooks fetched them on its own behind a settingsLoaded flag that
nothing has set since the flag's setter was removed, and then
loadAllSettings fetched the global, series and comic settings for the
same book. Every book open made the extra request. loadBooks now relies
on loadAllSettings for the global settings, and the dead flag is gone.
The reader view still loads the global settings on its own before a
book arrives.

loadAllSettings now also marks the global settings as loaded when they
arrive. The dropped request used to do that, and without it a site
default seed landing after the book's settings could overwrite the
stored global settings until the reader view's own load arrived.

Zooming a page with a double-click did not switch the page to its
original-size fit. The fit class is cached with each book's settings
and depends on the zoom level, but the zoom was the one reader setting
that did not drop that cache. A zoomed page kept its screen, width or
height fit and was magnified from the fitted size, off centre and
larger or smaller than the scroll area sized for it. The zoom now drops
the cache like every other settings change, so zooming in shows the
original size and resetting the zoom restores the chosen fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(reader): pin how book settings are masked and cached

Cover getBookSettings: the book over the series over the global scope,
empty values never overriding a lower scope while false and 0 do, two
pages forced off in vertical reading, the direction flags for all four
directions, the fit class when zoomed, the per-book cache, and every
action that must drop that cache, zoom included. Also pin that opening
a book makes one settings request that includes the global scope, and
that the settings it loads stop a later site default seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
)

The admin store's folder picker state used the key `root`, but the
server sends `rootFolder` and the picker reads `rootFolder`. Clearing
the Library path field reset the picker to `{ root, folders }`, so the
root folder read as empty until the follow-up folder load replaced the
whole object. The state and `clearFolders` now use `rootFolder`.

The libraries table also mapped a `clearErrors` action the admin store
doesn't have; that lives in the common store. It was never called, and
would have thrown if it had been.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ndles (#946)

The socket client lazy-imports the admin store so non-admins never
download it, but the metadata dialog's controls imported the online-tag
launcher statically, and the launcher imports the admin store. That put
the store in every browser and reader page load.

The controls now load the launcher with defineAsyncComponent, the same
way the metadata dialog already loads the tag edit panel. The launcher
only renders for admins, so only they fetch it.

Checked in the build manifest: the reader entry no longer reaches any
admin chunk, and the browser entry no longer reaches the admin store.
The browser still reaches the admin API client, which the card menu's
custom cover buttons import directly.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…948)

* test(admin): cover the table engine

The admin store's generic table engine (loadTable, loadTables, the row
writes and pending-delete revival) backs every admin tab, but the only
store specs covered OIDC and the site defaults. This adds a
characterization spec for it, with every TABLES request function mocked
and each table's real stateField kept.

It covers both response shapes loadTable accepts (a bare array and a
cursor page) and what happens to anything else, the 5 s sticky cache
per table, AgeRatingMetron never expiring, force bypassing the cache,
and loadTables filling each table's own field and resolving only when
all have landed.

It also pins which tables reload after a write: create, update and
delete force-reload only their own table, and a revive force-reloads
PendingDelete and Library, with nothing reloaded when the request
fails. The librarian-status diff keeps unchanged rows (and their
watchers) untouched, and non-staff visitors get no request and no
state change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(admin): share one sticky-cache test across the admin loads

The admin store's table loader and its six settings loaders each
repeated the same five-line check of a timestamp against the cache
window. They now call one isFresh helper, so the window's edges (a
never-loaded stamp is stale, and so is data exactly one window old) are
defined once.

No behavior change. A flat spec pins the helper. The table engine spec
and the OIDC and site defaults specs exercise three of the seven gates
through the store; the tagging defaults, tag-write errors, email and
throttle gates are the same one-line call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…950)

The browser card menu's Upload Cover and Remove Cover buttons imported
uploadCustomCover/removeCustomCover from @/api/v4/admin statically, so
the browser entry pulled the whole admin API chunk (~4.8 kB) on first
load for every user. Both buttons are admin-only (isUserAdmin gate,
AdminAPIView on the server), so load the client with a dynamic import
inside their handlers instead. The menu stays synchronous; the chunk is
fetched only when an admin actually uploads or removes a cover.

Adds unit tests for both buttons' admin flow and non-admin hiding.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
loadTable didn't check the order its responses came back in, and it
stamped each table when the response arrived. If a tab mounted with an
empty or expired cache, its read could still be in flight when the admin
saved a row. The save's forced reload landed the new rows, then the
older read landed late and put the pre-save rows back. It also restamped
the table, so every unforced read for the next five seconds was served
those stale rows from cache. A WebSocket-forced reload overlapping a
slower unforced read did the same thing.

Every loadTable call now takes a request number. Rows land only if no
later request for the same table has landed first. A later request that
fails doesn't block an earlier one. The table is stamped with the time
its request went out, because the rows are only as fresh as that moment.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
FIT_TO_CLASSES mapped "O" to "Original", so the Original Size setting
at the default zoom produced fitToOriginal / fitToOriginalTwo /
fitToOriginalVertical while page-img.vue and pdf-doc.vue only style
fitToOrig*. The zoomed-in path already used "Orig". Map "O" to "Orig"
and have the zoom path read the same entry so the two can't drift.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
None of pdf-doc.vue's four canvas rules had matched anything since the
Vuetify 3 port (Dec 2022). That port moved them from an unscoped block
into top-level :deep() selectors, which compile to
`[data-v-x] .vue-pdf-embed.X > div > canvas` and need a scoped ancestor.
The embed is the component's root, so it has none. vue-pdf-embed 2.x
also nests the canvas one div deeper than `> div > canvas`.

With the selectors fixed (`.pdfDoc.X :deep(canvas)`), each rule was
checked in a browser with Force vector at DPR 2:

- Fit to Height/Screen two-page `width: inherit` and Fit to Width
  two-page `height: inherit` did nothing. vue-pdf-embed already gives
  the canvas an aspect-correct inline size. Deleted.
- Original two-page `width/height: inherit` resolved to auto, so each
  canvas showed at its bitmap size, 2x on HiDPI (1023x1581 instead of
  512x790). Zoom uses these classes too. Deleted.
- Fit to Screen `object-fit: contain` did nothing, because the box
  already matched the bitmap. Kept, and paired with max-width
  100vw/50vw as page-img.vue does for images. Wide pages now fit the
  screen instead of overflowing it: a spread plus a page in two-page
  mode at 1024px went from a 1491px scroll width to 1024px, and a wide
  page on a 390px phone from 1092px to 390px.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…errors (#952)

loadTagWriteErrors had the race loadTable had before #949. The Tagging
tab and the settings button read the list unforced when they mount, and
the WebSocket forces a reload whenever it changes. If a slow mount read
landed after the forced reload, it put the older list back and stamped
it when it arrived, so every unforced read for the next 5 s was served
the stale list. clearTagWriteErrors wrote [] directly, so a read that
went out before the clear could put the cleared errors back the same way.

Both now use loadTable's request counter. #949's landing check moves into
a claimLanding(key, request) helper that all three share, keyed like
timestamps. The tag-write reads take a number when they go out, land only
if no later request has landed, and stamp the time they went out. The
clear takes a number when its DELETE goes out, so an older read can't
undo it, and a read that went out after it and already landed isn't
wiped by it.

The singleton settings loads (tagging defaults, email, OIDC, site
defaults, throttling) are unchanged. Nothing forces them, and their only
writer is the same tab's own Save. That can't realistically fire before
the tab's mount read comes back.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore: update devenv

- Retire the dead .circleci ignore lines (devenv's new retirement lists).
- eslint base config: presets apply again and Markdown code blocks are
  linted, which reformats the compose YAML example in docs/DOCKER.md.
- pyproject template: T201 exemption for bin/release_info.py.
- eslint-plugin-package-json bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: compose CI from devenv's building blocks

ci.yml is now a caller of devenv's CI building blocks (copied in by
`make update-devenv`) plus codex's own image jobs:

- ci: devenv-check.yml with ci-target codex-ci and the same four checks.
  Its gate runs the Release Preflight and, on a main push, reuses the
  python-dist of an earlier run that passed on the same git tree (keyed
  by tree hash, replacing the "last merged PR" lookup). One image job
  builds codex-ci and pushes it by digest; each check pulls it instead of
  building and loading its own. The required check becomes
  "CI / Lint, Test & Build Dist".
- build, deploy, deploy-hub: unchanged in substance, but they read
  deploy/version/final from ci's outputs instead of testing the event or
  grepping pyproject.toml. deploy publishes to PyPI through devenv-pypi
  (uv publish --check-url) after the manifest. deploy-hub now skips at the
  job level for alphas.
- release: devenv-release.yml (tag, GitHub Release, merge-back), after
  deploy and deploy-hub.

Removes .github/actions/ci-container (now devenv-ci-container) and the
release-engine tests, which devenv owns now; codex keeps its golden
NEWS.md tests. tests/test_ci_workflow.py pins how codex wires the blocks.
CLAUDE.md describes the new graph and the current Dockerfile stages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update deps

* fix(make): build the choices JSON before lint and fix

Since the ESLint preset fix (#931, #932), import-x/no-unresolved resolves
the frontend's `@/choices/*.json` imports, which bin/build-choices.sh
generates and git ignores. A checkout that never built them, such as CI's
fresh codex-ci container, fails `make lint` and `make fix` with 19
unresolved-import errors. Give lint and fix the same build-choices
prerequisite test-frontend and build already have.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…955)

* feat(browser): mark finished items with a check cap, not a thick bar

Issue 856 feedback: the 6px grey finished bar was hard to tell from the
3px reading bar when scanning a grid, and only really read when two cards
sat side by side. The dimmed caption was a second cue that made read
titles harder to read.

Every bar is now 3px. A finished comic or all-read collection ends its
bar in a 10px grey check circle, the same grey as the fill. The bar runs
under the cap to its centre so the two join with no gap. The check is
stroked in the page background instead of cut out, because a cut-out
would show the track through it. The fill is still the real bookmark
position, so a comic marked read but never opened is an empty track and
its cap.

Read titles and subtitles keep their normal colour.

The bar is now one component, ReadStateBar, used by both the browser
card and the metadata dialog. They had duplicated its CSS, and the cap
would have been a third copy to keep in sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(metadata): draw the read state under the cover, not behind it

The read state bar in the metadata dialog has been invisible since the
read state landed in v2.4.0. It sat 15px up over the cover's bottom edge,
where the old v-progress-linear used to be. That component is
positioned, so it painted over the cover. The plain div that replaced it
is not, and the absolutely positioned cover image painted over the bar.

It now sits 1px under the cover at every breakpoint, as on the browser
card, which moves the dialog's buttons down about 16px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ajslater and others added 26 commits November 19, 2026 12:06
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DEV ONLY (do not push): comicbox from the VerseDB worktree

Point uv at the unreleased comicbox checkout that adds VerseDB
(claude/vibrant-mayer-544fdb) and re-lock: comicbox 5.6.2 -> 5.6.3,
mokkari 5.1.0 -> 5.2.0, versedb 1.0.0 added.

Drop this commit and re-lock once that comicbox is on PyPI. Phase 0 of the
VerseDB plan is rebased off it to land on develop alone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Make the online-tag sources a backend registry

Codex derived its known sources from comicbox's SOURCE_NAMES, so a comicbox
that adds a source (comicbox 5.7 adds versedb) made it "known" before codex
could drive it: validating with no source raised KeyError (a 500), the
source passed default_sources and start-request validation, and tag-by-id
handed any non-Metron source Comic Vine's key.

codex/librarian/onlinetag/sources.py now registers each source codex drives:
its comicbox module and class (still imported lazily), key field, optional
url field, and which probe windows the validation chip shows.
SUPPORTED_SOURCES is SOURCE_NAMES filtered to the registry, in comicbox's
order, and an unregistered source is inert everywhere.

One build_credentials, configured_sources and source_credentials replace
the per-source copies in session_manager, explicit_id, credential_validator,
views/admin/onlinetag and tagging_validate. KNOWN_SOURCES, the tagging
choices, the BulkOnlineTagTask default and the start serializer's default
read the supported sources. identifier_parse builds its messages from them;
with two sources they read as before. The tagging defaults gain a read-only
configured_sources list.

No behaviour change for Metron and Comic Vine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drive the Tagging tab and Tag Online launcher from the source list

source-labels.js becomes the per-source descriptor (label, short label,
token page link, custom url or not); SUPPORTED_SOURCES is the backend's list
filtered to the sources it can describe. The Tagging tab renders one row per
source with per-source state keyed by source, and the launcher reads the
server's configured_sources instead of has<Source>Credentials. "Both
configured" becomes "two or more", detectSource loops the sources, and the
id field's placeholder, hint and bare-id warning are built from the list.

The run estimate's metron_requests_per_comic and comicvine_requests_by_effort
become one requests_per_comic[source][effort] table priced by comicbox, and
source_rates is built per source. The numbers are unchanged.

Rendered copy for Metron and Comic Vine is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say configured_sources is in comicbox's order, not run priority

The list follows SUPPORTED_SOURCES; run priority is defaultSources. The
browser check showed the two differ once an admin reorders the sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add VerseDB as a third online tagging source (backend)

Registers comicbox's VerseDB source: its API key is a new encrypted column
on ComicboxTaggingDefaults (migration 0061), and it joins the credential
check, the scan, the stored-id prepass, tag-by-id and the connection
release through the Phase 0 registry. Codex stores no VerseDB url: no
mirror exists.

- The credential check reports VerseDB's hourly window (RateLimitInfo
  gains ``hourly``); a spent daily cap reads as a request limit.
- Match-candidate covers load from https://media.versedb.com/uploads/,
  path-scoped like the other two CDNs.
- The choices emit VerseDB's hourly and daily caps and the credit its
  terms require ("Data from VerseDB"), both read from comicbox.
- The user-data sidecar carries the key; a sidecar without the column
  still restores.
- A VerseDB identifier, whose page comicbox cannot derive from the key,
  takes its link from the comic's own ``urls`` when one parses back to the
  same source, type and key.
- A comic a quota kept one source from, that another source wrote or
  deferred, is no longer also counted "left for the next run" (the same
  double count was there for Metron's quota reserve), and a deferred one
  is counted as deferred.
- Telemetry gains one boolean, ``has_versedb_credentials``.
- The migration tests return the database to the latest migration
  instead of 0060, so a later migration survives them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Show VerseDB in the Tagging tab, launcher, review dialog and metadata pane

- The VerseDB card links to its token page and spells out its free tier
  (300 requests an hour, 4,000 a day, about 3 per comic, read from the
  estimate JSON), its non-commercial terms, how its tags merge, and the
  "Data from VerseDB" credit.
- One SourceCredit component shows that credit under VerseDB's
  candidates in the review dialog and on the metadata pane of a comic
  with a VerseDB identifier, from tagging-attribution.json.
- The launcher reads versedb:ID and versedb.com urls as VerseDB, asks
  among three for a bare id, warns on VerseDB's hourly and daily caps,
  and says which active sources ignore effort (read off comicbox's
  pricing). "X and Y have no API key" now reads as a list.
- The validation chip prints an hourly window; the stats tab labels the
  new boolean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say "Non-commercial use only" on the VerseDB card

The card's budget line already opens "Free tier", so the terms no longer
repeat "Free". Seen in the browser check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test that a VerseDB pinned id reaches the start request

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update dpes

* Drop the VerseDB credit line from the metadata pane

The linked VerseDB identifier chip already credits the source there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drop the VerseDB credit from the Tagging tab card

A settings card shows none of VerseDB's data, and its token link already
points at versedb.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drop the review dialog's VerseDB credit line and its plumbing

Each VerseDB candidate already links to its versedb.com page under the
source's name, so the separate "Data from VerseDB" line repeated it. With
no credit line left anywhere, source-credit.vue, sourceAttribution,
tagging-attribution.json and SOURCE_ATTRIBUTION go too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update deps

* update deps

* Keep the run's source order when applying a deferred pick

In a Merge all sources run, answering a lower-priority source's prompt
fetched that source alone, so its single-valued tags overwrote what a
higher-priority source had already written to the comic.

A deferred prompt now records the run's source order and merge flag, and
each of its comics the issue ids other sources auto-wrote during the scan
(tagged_ids). Applying the pick fetches the higher-priority sources' ids
with it, in priority order, and comicbox merges them with the first
source winning. Ids come from the database, else from the scan's record:
the scan writes only when it ends, so the database often lacks them when
the answer arrives. A source with no id is left out and never searched.

build_explicit_id_config takes the order instead of always listing the
primary first. A replayed search still runs the pick's source alone, then
refetches the issue it landed on together with the higher-priority ids.
First-wins runs and prompts cached before this change apply as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say the source list's order decides who wins a merge

The Tagging tab's Online Tagging Sources hint now says the list is in
priority order, highest first, and that with Merge all sources on the
source higher in the list wins where sources disagree. The Tag Online
dialog's Merge all sources hint says the higher-priority source wins.

The VerseDB card's terms drop "Its tags fill gaps: where sources
disagree, Metron and Comic Vine win.", which the admin's order now
decides. Comments that called the order run priority only now say it is
merge precedence too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Outline the sources that decide a comic's tags on the Tagging tab

With Merge all sources off, the first enabled source in the Online
Tagging Sources list gets an outline: it is tried first, and its match
ends the lookup. With it on, one outline spans every enabled source.

The outline is an inset shadow in each row's padding, drawn in segments
across flush rows, so it takes no room and toggling it never shifts the
list. Rows order by the enabled sources alone, so a source that lingers
in the defaults without credentials sinks below and never splits the
box. canMerge counts the same list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: merge precedence, source outline and prompt fix

Under a new v2.8.0 heading, since v2.7.1 is tagged and develop has no
section above it. The version is a placeholder for AJ to confirm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Number the Tagging tab's sources and say what each does in a scan

The Merge all sources checkbox under the source list becomes a "First
match | Merge all sources" switch right above it. While fewer than two
sources are enabled, Merge all sources is disabled, and the hint under
the switch says to enable another source.

Each enabled source shows its priority as a number before its name, and
a tag for its role in the current mode: "Tried first" and "If no match"
with First match, "Wins conflicts" and "Fills gaps" when merging, or
"Only source" when it is the only one. On a phone the tag takes its own
line under the name.

This replaces the outline from 455638a: the numbers and tags say the
same thing more plainly. The rows go back to the plain gap layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: the numbered source list replaces the outline line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drag the Tagging tab's sources to reorder them

A grip between each enabled source's checkbox and its panel replaces the
up and down arrow buttons under the checkbox. Drag it with a mouse or a
finger: the ranks, role tags and row order follow the pointer, and the
new order saves once, on release. Escape or a cancelled pointer puts
everything back.

Pointer events, not a drag library: they serve mouse and touch alike,
and the rows reorder through their flex order, which a DOM-moving
sortable would fight. The grip captures the pointer and sets
touch-action: none, so a touch drag does not scroll the page.

Focused, the grip moves its source with the up and down arrow keys, and
a polite live region says where it went. Moves count only the enabled
sources, so one that lingers in the defaults without credentials no
longer swallows an arrow press.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: the source list reorders by drag

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Let the Online Tagging Status table shrink to fit a short batch

The comics table had a fixed 420px height, so a batch of a few comics
left a tall empty box above Tagging Defaults. It now has no height prop
and a 420px max-height on its scroll box instead: a short batch is only
as tall as its rows, and a long one stops at the same height and
scrolls. Vuetify's virtual scroller measures that box rather than
reading the prop, so a 60-comic batch still renders only the visible
rows, under a sticky header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update deps

* Note a queued pick's issue id on the comic's other prompts

In a Merge all sources run two sources can both defer on one comic.
Answering the higher one queues its write, but the database has the
issue id only after that write is re-imported, and the scan never saw
it written. The lower one answered next found neither, applied alone,
and its patch, queued last, overwrote the higher source's title.

Once an answer's write is queued, the issue id the written tags carry
is noted in tagged_ids (and the source in tagged_by) on that comic in
every other pending prompt, so the lower pick merges under it.
Followers are noted with their own ids, and a failed or unresolved
pick notes nothing. Answers given mid-scan leave the cache at once, so
the applier returns the ids and the deferred apply notes them on the
answers still held.

The note is a read-modify-write on the online tag thread, which runs
resolves only between scans, so it and a scan's persists take turns.
The answered-in-reverse order needs nothing: the higher pick is
written last and fetches only sources above it.

The shared fake sources move to tests/onlinetag_merge_fakes.py so the
new tests get their own file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Lock the online tagging state against the nightly janitor sweep

The janitor's tagging sweep, on the scribe thread, reads the pending
prompts, resolution record, resume descriptor and scan marker, asks the
database which comics still exist, and writes back what it kept. The
online tag thread writes the same keys, and the file cache has no
compare-and-set, so a write landing between the sweep's read and its
write-back was lost: a prompt added mid-sweep vanished, and a skip-all
or a fresh scan's cleared record could be written back over.

TAGGING_STATE_LOCK, a reentrant lock in session_cache, now covers every
writer of that state (the prompt map, the scan marker, the snapshot,
the resolution record and the resume descriptor), and the janitor holds
it for its whole sweep. The queries it runs under the lock only read.
Readers take no lock, as the file cache replaces an entry whole.

Lock order is one way: the sweep's scan-liveness check takes the
session manager's lock inside this one, and nothing holding the
manager's lock writes tagging state. A scan sets its marker before its
first publish, so a sweep clearing a stale marker finishes before the
new scan's snapshot lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin comicbox 5.7.0 and update deps

comicbox 5.7.0 is on PyPI with VerseDB and the run-order merge, so the
dev-only uv source that pointed at a local comicbox checkout goes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Keep make ty passing under ty 0.0.109

ty 0.0.109 checks the self argument of a method borrowed from another
class. TagWriterResultShapeTests borrowed _write_with_results from a
sibling test class, so the helper moves to the base both share. The FTS
stand-in borrows BrowserFilterView.force_inner_joins on purpose, as its
docstring says, so those three calls are marked instead.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* NEWS: VerseDB and the comicbox 5.7.0 requirement

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…ts, multi-pick filters (#1043)

* Adapt to comicbox 5.7.0

- Pin comicbox 5.7.
- Tag writes can keep a comic's other tag formats with comicbox's new
  `keep` write keyword: an admin default (Admin > Tagging) and a per-edit
  checkbox. Without it, naming one format deletes the others. Migration
  0061 adds ComicboxTaggingDefaults.keep_formats; the sidecar and the
  tagging telemetry carry it as a boolean.
- The tag editor kept the display form of a story arc ("Civil War:3") as
  its name and sent no number, and comicbox replaces the whole arcs map on
  an update, so a save renamed numbered arcs and dropped every arc
  number. The metadata payload now sends the arc's own name beside its
  number and the editor writes both back.
- parse_issue_parts splits with comicbox's IssueField.split_issue, so a
  typed "#-1" finds the -1 that comicbox 5.7 now imports as a number.
- Credential checks name Metron's 404 and 400, which comicbox 5.7 stops
  retrying, instead of the exception class.
- Match-mode hints mention the Metron cover match that careful, auto and
  eager now write and ask lists first.

Not done here: comicbox 5.7.0 is not on PyPI yet, so uv.lock still
resolves 5.6.1. Lock after it publishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists phase 0: lists behind the Story Arcs view

The browser's arcs collection reads reading lists instead of the story-arc
tag tables, which stay the importer's, the tag editor's, the story arc
filter's and search's. Behaviour is the same, with tags the first and only
source; the view is relabelled "Reading Lists" and the URL token stays
`arcs`.

- Models ReadingList (global when user is NULL, unique names per owner),
  ReadingListSource, ReadingListEntry, ReadingListSeriesMapping. None is
  importer-owned; the mapping's Series FK hides its reverse accessor so the
  janitor's reverse-relation map cannot keep orphaned series alive.
- Migration 0062 builds one global list per arc sort name in arc order
  (number, date, pk, NULLs first), remaps shelf items, saved routes and
  arc-scoped reader settings onto lists (newest row wins), and renames
  SettingsReader.story_arc to reading_list. Its reverse maps lists from
  tags back to an arc and drops what cannot go back.
- TagListSync runs as an importer post-phase (only when an arc link could
  have changed) and as a nightly janitor job after the FK cleanup. It
  digests each arc's (comic, number) pairs and rebuilds only changed lists;
  lists are never recreated, so shelf items, covers and reader settings
  pointing at one survive. A list with other sources or hand edits takes a
  recombine hook, filled in by phase 1.
- One visibility rule, global lists plus the viewer's own, applied by
  get_acl_filter(ReadingList), on the same join as the arcs pks in the
  collection filter, and in the cover route, the reader's arc menu, OPDS v2
  belongs-to and the metadata dialog.
- Lists are not merged by name the way arcs were: two curated orders of one
  event share a name.
- Reader orders a list by entry position restricted to the selected list
  (the old arc index read any arc's number). A comic in a list twice reads
  at its first place.
- Metadata gains readingLists (name, position, count, editable) and a
  Reading Lists row whose chips open the list; the story-arc chip row, whose
  links never resolved, is gone.
- Sidecar schema 4: an arcs identifier is [name, uuid]; old [name] backups
  resolve to the global list of that name.
- Telemetry reports reading_list_count among the collections. The Chronicle
  server needs that column, or it drops the value.

Not measured yet: the sync's cost on the browser perf harness library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists phase 1 backend: import, match, combine, review API

comicbox 5.7 parses, fetches, combines and compares lists; codex stores,
matches and shows them.

- Stored documents are comicbox's own JSON, read back through its model
  loader. The tags source's document is built from the tag tables.
- Matcher: saved series mappings, then comicbox's match_comics over
  candidates found in the database (issue-id hits and the comics of series
  whose name variants match), then series id with issue number. The rule is
  stored per entry; ambiguous or multi-series matches need review.
- Recombine runs comicbox's combine in source-rank order. Tag rows are their
  comics. Hand edits are an overlay keyed on (first identity key,
  occurrence): a picked comic and a hidden entry survive, hand-added entries
  go back after the entry they followed, and a hand reorder locks the order
  (current entries go first, new ones are flagged). Removing a source
  recomputes without it. The tag sync now recombines lists that have other
  sources or hand edits.
- Jobs: fetches run on the online-tagging thread (one comicbox session per
  job, cancellable from the router thread, progress as a status) and hand
  documents to scribe ReadingListImportTask; ReadingListRecombineTask and
  ReadingListRematchTask; a nightly JanitorRematchReadingListsTask. Failed
  fetches and imports are kept for the admin in the tagging cache.
- Admin API (/admin/reading-lists): table with sources, coverage and review
  counts; Metron and DieselTech catalog search; preview (uploads, URLs and
  catalog lists in full, Metron lists and Comic Vine arcs by header) that
  writes nothing; import; per-list refresh, complete-from-arc, rematch,
  recombine; bulk actions; source ranking and removal; combine with a dry
  run; suggestions from comicbox compare; series mappings; errors; abort.
  Only admins may submit URLs, because comicbox fetches any host.
- Owner API (/reading-lists): personal lists, add comics by hand, entries
  with review filters, pick, hide, reorder (locks the order), accept guesses,
  candidate search, duplicate, export to CBL, json-cbl (keeping the list's
  UUID) and comicbox YAML/JSON with the matched comics' ids.
- READING_LISTS_CHANGED notification for admins.
- AdminTagWriteView.post read each default by hand and ranked C; one helper
  resolves request value or admin default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists phase 1 UI: admin Reading Lists tab, grid sources

- Admin > Reading Lists: the lists table (name and type, source chips,
  coverage bar, review count, visibility, updated) with name, source,
  missing and review filters; row Review, Sources and a menu for refresh,
  rematch, complete from the database's arc, global/private and export;
  multi-select Combine, Refresh, Rematch, Complete and Delete; suggested
  combinations and fetch/import errors above the table.
- Add Lists dialog: Metron search, DieselTech catalog browse and search,
  files and URLs, any mix at once, then preview cards with coverage,
  warnings, a preselected combine suggestion, visibility and name.
- Review dialog (shared with personal lists): needs review / missing / all
  / hidden, find a comic, map a series, hide, remove a hand-added entry,
  accept all guesses, reorder by drag or typed position. Sources dialog:
  rank, refresh, remove, add. Combine dialog with a dry run.
- Browser: list cards name their sources ("Tags + Metron · CBRO"), set on
  the page's lists after pagination with one query; an All / Curated /
  From Tags toggle on the Reading Lists grid, stored as the
  reading_list_kind filter (Exists on sources, so counts are not
  multiplied).
- A row marked missing by hand stays missing through rematch and
  recombine. Name-only joins no longer flag rows whose comic is settled by
  its own arc tag.

Checked in the browser on a fresh worktree stack: tag lists appear after
the startup import, a CBL previews with 4 of 5 matched and a preselected
combine into the tag list, the import combines it, the review dialog
lists tiers and the missing row, the grid labels and Curated filter work,
and a comic's metadata names "Civil War, 2 of 5".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists phase 2: personal lists

Signed-in users make, rename, duplicate, export and delete their own
reading lists from a "Reading Lists" block in the browser settings
drawer, and edit a list's entries in the same review dialog admins use,
without series mappings.

The shelf menu gains a "Reading Lists" section, so every place that
opens it (card menus, the metadata dialog, the multi-select toolbar)
can add a selection to a list or to a new one. POST
/api/v4/reading-lists/<pk>/add resolves the selection's comics through
the browser's ACL and adds them in reading order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(admin): Jobs tab Abort buttons were rejected

The task endpoint's choices held the jobs and their variants but not the
aborts, so every Abort button in the Jobs tab got a 400 "not a valid
choice". The choices now include the group and job aborts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists phase 3: filter, numbered zip, OPDS continue, refresh

- A "Reading Lists" browser filter narrows any view to the comics of
  chosen lists. Its choices, matches and None choice only ever consider
  the lists the viewer may see. Saved filters keep their lists across a
  backup by uuid (migration 0063, sidecar column).
- A list downloads as a zip whose files are numbered in list order; a
  comic the list holds twice is in it twice.
- A list's OPDS feed leads with the next issue the user has not
  finished: a "Continue Reading" group in v2, and an entry into the
  unfinished issues in list order in v1.
- The nightly janitor refreshes the Metron, catalog and URL sources not
  fetched in a week. Metron waits for a key; a catalog list whose blob
  is unchanged is not downloaded; Comic Vine refreshes only by hand.
- The Jobs tab gains a Reading Lists group: sync from tags, match again,
  refresh sources, with an abort.
- The Add Lists dialog takes Metron and Comic Vine story arcs by id or
  Comic Vine address.

Fixes a phase 1 hole: a hidden entry still browsed, covered, counted,
read, filtered and appeared in OPDS. One helper now scopes every join to
shown entries in lists the viewer may see.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists phase 4: write a list into its comics' files

An admin "Write to Files" action, per list and in bulk, tags a global
list's matched comics with its story arc, numbered by first place in the
list when it has an order. It is comicbox's arc patch through the
existing BulkTagWriteTask: additive, in the admin's default formats,
keeping each comic's other arcs and tag formats. Read-only libraries
are skipped; a personal list is never written.

A list that already has the arc as its tags source just gains comics.
Otherwise the list is marked, and when the import brings the arc tags
back, the tag sync attaches that tags source to the list rather than
making a second list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS, README: reading lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update deps

* pyright ty ignore

* Reading lists: export only ComicRack CBL and json-cbl

Drop the Comicbox YAML and JSON export formats from the API and from
the admin and drawer export menus. Asking for one is now a 400.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: read only ComicRack CBL and json-cbl

Uploads, URLs and catalog fetches in comicbox's own YAML or JSON
reading list formats are refused with a clear error, in the preview and
on the online thread alike. Lists from Metron and Comic Vine have no
document format and are unaffected. The Files tab no longer offers
.yaml files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: Copy to My Lists from a list's card

A signed-in user copies any reading list they can see, global ones
included, into a list of their own from the card's action menu, to
reorder or trim it. The copy is a card in the reading lists grid, which
now refetches in place after a copy, and after the drawer's create,
rename, duplicate and delete too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Show reading list confirmations and errors in a notice snackbar

Reading list actions reported through the form's success and error
messages, which nothing shows outside a dialog's form, so adding comics
to a list, copying one and every admin reading list action succeeded or
failed in silence. A new app-wide notice snackbar shows them: a short
confirmation, or an error in red that stays up longer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: admins copy users' lists to global; Export submenu

An admin's "Copy to Global" makes a new global list from a user's
personal list, in its order, and leaves the user's list as it is.
"Make Global" now says that it moves the list instead. Copying shares
one copy_list() with Copy to My Lists.

Export moves into a submenu in the admin table and the settings drawer,
with json-cbl, the newer JSON standard, listed before ComicRack CBL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* development comicbox source

* Reading lists: hand edits survive new sources, recombines and combining

- The overlay of hand edits moves to its own module and finds an entry
  by any identity key it shares, not just the first. Adding a Metron
  source to a Comic Vine keyed list put Metron's id first and dropped
  every pick and hidden entry.
- An accepted best guess stays accepted when a recombine finds the same
  comic again.
- New match tier "marked_missing" for "the library does not have it".
  A hand pick or a hand-added comic whose file went away is no longer
  mistaken for it, so rematch and recombine find it again by reference.
- Combining lists keeps the absorbed lists' picks, hidden entries, marks
  and hand-added entries, the primary's winning where both edited one
  issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: one entry-visibility rule; export for every viewer; 400s

- access.shown_entries_q: an entry shows when it is not hidden and its
  comic, if any, is one the viewer may see. The entries view, export and
  Copy to My Lists use it, so a restricted user's copy or export of a
  global list no longer names comics they may not see. A missing issue
  shows to everyone who sees the list.
- Anyone who sees a list may export what they see of it; a signed-in
  non-admin could not export a global list.
- Creating a list with comics applies the comic ACL. Bad pks anywhere in
  the list and admin APIs, a taken name on the admin rename or "private"
  toggle, and a bad import "into" are 400s, not 500s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: Refresh fetches once and never empties a stored list

- The admin Refresh action queues the fetch only. The import that
  follows recombines a source that changed; queueing a recombine beside
  the fetch ran it twice.
- A refresh that comes back with no issues is reported in the errors
  panel and never replaces the stored document, in the fetcher and in
  refresh_source.
- refresh_source updates the curator link (attribution_url) too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: rematch after an import adds comics; batched matcher

- The importer's post-phase queues a ReadingListRematchTask when it
  added comics, so a list's missing issues are found the same day, not
  only by the nightly job.
- Series-mapping and series-id matches cost a fixed number of queries
  per list instead of one per entry.
- A preview of several lists shares one matcher, so the library's
  series index is built once per request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: back up and restore lists, sources, entries and mappings

Sidecar SCHEMA_VERSION 5 adds reading_lists, reading_list_sources,
reading_list_entries and reading_list_series_mappings. A dump keeps every
list a person made, imported or edited: header, sources with their
documents, entries with their comics by path and every hand edit. A
global list that only mirrors its story-arc tags is left out; the tag
sync rebuilds it.

Restore finds a list by UUID and writes it back whole, so it can run
twice. An entry whose comic is gone keeps its place as a missing issue
and is matched again by its reference. A tags-only list a rebuilt
database made for the same arc gives way to the restored list. Lists
restore before the shelf items and saved filters that point at them. A
backup without the tables restores as before.

Also splits ListMatcher._match_series_ids for the radon gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: private Metron lists preview private; no URLs with logins

- A Metron list its curator keeps private comes into the Add Lists
  preview as "Private to me"; the admin can still make it global.
- A list URL with a user name or password is refused in the preview,
  without fetching it: Codex keeps a source's URL, so it would store
  them. The error card names the URL without its login.
- The review dialog says "Marked missing" for an entry marked so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: READING_LISTS_CHANGED reaches everyone; tag syncs send it

- The notice carries no names, so it now goes to every browser, not
  only admins. A user's drawer and add-to-list menus reload their own
  lists; an admin's table reloads as before. Nothing never loaded is
  fetched.
- The importer's and the janitor's tag syncs send it when they changed
  a list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: one copy of each rule, label and kind map

- access.py holds who sees and changes a list: visible_lists,
  can_edit with its query form editable_lists_q, and get_visible_list,
  which the add-a-selection view now shares with the list views.
- ReadingListSourceKind moves to codex/choices/readinglists.py with its
  long and short labels; the frontend reads the labels from the
  generated reading-list-choices.json instead of a copy.
- One codex -> comicbox source kind map (documents.COMICBOX_KINDS),
  built from comicbox's SourceKind; comicbox's schema key constants
  replace copied strings in documents, service and export.
- The admin table and detail read sources with .defer("document").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: one concept — story arcs fold into Reading Lists

Story arcs and reading lists are one concept in the browser. "Story arc"
stays only as the name of the file tag.

- Filter: the Story Arcs filter is gone; Reading Lists offers every list
  the viewer may see. Migration 0061 folds each saved story-arc filter
  into the arc's list, its None choice ("no arc") becoming "in no list",
  and drops SettingsBrowserFilters.story_arcs (reverse gives them back).
  Saved views now validate reading list pks against visible lists.
- Reading Order under the Reading Lists filter sorts by place in the
  chosen lists, replacing the arc-number branch.
- Table column and sort: Story Arcs becomes Reading Lists, backed by
  shown entries of the lists the viewer may see, for comic rows, the
  collection-row intersections and the raw-SQL sort (ComicACL carries
  the viewer). Stored story_arcs sort keys, extras, sort memory and
  table columns rename in the migration and in old backups.
- Search: the story_arcs: field is reading_lists:, its old names kept
  as aliases; it searches the arc names in the index.
- OPDS v2: an arc's subject link filters by its reading list; series
  group links use series_groups (both keys were dropped before).
- Sidecar: an old backup's story-arc filter names restore as the global
  lists of those names; new dumps stop writing the column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: a shelf filter at the lists root shows the shelved lists

At the Reading Lists root a shelf filter matched every list that shared
an issue with a shelved one, because the arcs clause reached lists
through their comics. For the ReadingList model it now matches the
list's own pk; shelved comics, series and folders still light up the
lists that hold them. Tests cover a shelved curated and personal list,
the filter at the lists root and inside a volume, and a backup round
trip of the shelf items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: list types as people read them; one-concept wording

- A list's type reads "Story Arc", "Event", "Characters"… from one
  table in codex/choices/readinglists.py, exported with the source
  labels; lists from tags are Story Arcs. The admin table and the
  import preview show it; the details dialog will too.
- The tag editor's Story Arcs field says each one makes or joins the
  reading list of that name.
- "Complete Story Arcs" is "Complete from Metron or Comic Vine".
- README and comments speak of reading lists where people browse,
  filter and sort.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: missing issues as placeholders in the grid

Inside one list, in Reading Order, with no search or filter, the list's
missing issues show at their places among its comics, for everyone who
sees the list.

- The browser page carries missingEntries (pk, position, series, issue,
  year, type), missingCount and missingEditable. A page owns the
  positions after the previous page's last comic through its own last
  comic, first page from the start, last to the end, reversed order
  mirrored. Comic positions are read and paginated as the browser does
  (first place forward, last place reversed; the same orphans), so the
  two agree on page boundaries. The OPDS 7-tuple is untouched.
- New per-user setting Show Missing Issues, on by default (drawer,
  sidecar, migration 0061).
- Grid: a grey placeholder card with the stock cover, outside the
  selection and with no reader link; a run of more than 12 shows three
  and folds the rest into "N more missing", which opens. A list's
  editors get Find the Comic (the candidate picker, moved out of the
  admin folder) and Hide from List.
- Table: the same entries as greyed rows; comic rows in Reading Order
  carry their position.
- A comic's caption in Reading Order shows its place counting from 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: list details in the metadata dialog; Export Missing

- When the metadata dialog shows one reading list it leads with the
  list's details: type, years, description, sources with the curator
  and their link, "31 of 98 in the library, 12 read", the lists before
  and after it (linked when the library has them, by source, json-cbl
  UUID or name), Continue Reading and Export, with Export Missing when
  the list has gaps. Every count reads what the viewer sees.
- GET reading-lists/<pk>/continue returns the first comic in list order
  the viewer has not finished, at its bookmarked page. Continue Reading
  opens it with the list as the reader's reading order (the reader takes
  the list from the route once; its settings keep it).
- Export takes missing=1: only the issues the library lacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: "31 of 98" on the card of a list with gaps

A reading list card carries listInLibrary and listTotal, counted per page
in one query beside the sources caption, over the entries the viewer
sees. A list with gaps shows "31 of 98" under its sources; a complete
list says nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: Continue Reading and Export on a list's card menu

Everyone who sees a reading list gets Continue Reading (the first issue
of it they have not finished, opened with the list as the reading order)
and the Export submenu, json-cbl first, on its card's menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: kind toggle All / Mine / Curated / From Tags

- Curated now means "not from story arc tags alone", so a hand-made list
  with no source shows under it instead of vanishing under both Curated
  and From Tags.
- Mine shows the viewer's own lists; it is offered only to a signed-in
  user, and a session asking for it gets nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: the add-to-list menu offers lists you would add to

The menu listed every global list to an admin, one per story arc. It
now offers the user's own lists and, for an admin, the global lists not
made from tags alone (a list from tags follows its tags). Past eight
lists the menu grows a field that finds a list by name. tags_only_q is
shared with the kind toggle; the unused editable_lists_q goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: drop an always-false None check in the Mine filter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: Remove from List in place

Inside a list the viewer may change, a comic's card menu and the
multi-select toolbar remove comics from it. POST reading-lists/<pk>/remove
{comics} follows the entry DELETE: a hand-added entry goes, any other is
hidden, since its source would bring it back; the notice says which.
The page says whether its list is editable (listEditable), which the
missing-issue menu now reads too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: admin tab — details, mappings, progress, tags lists

- Edit Details (row menu): name and description, which then stay through
  refreshes and recombines. The table rows carry the description.
- A Series Mappings section lists the saved "this list series is that
  library series" answers and forgets one.
- Lists made from story arc tags alone are hidden unless "Show lists from
  tags" is ticked; it says how many there are.
- Reading list jobs (sync, fetch, import, match) show their progress on
  the tab.
- The table and its suggestions load together: after a review or
  sources change and on READING_LISTS_CHANGED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: Add Lists dialog opens on the catalog, says what's off

- Tabs run Catalog, Files, URL, Metron, Story Arcs, and the dialog opens
  on the first; the catalog lists itself on open.
- Metron and Comic Vine inputs are disabled without that site's key,
  saying so and where to add it (Admin › Tagging, Online Sources).
- A line beside the buttons sums what is picked across every tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: dialog fixes; notices say what happened

- Sources: "Fetch again" fetches that one source (new POST on the source
  route; a source with no remote is a 400 saying so). The dialog reads
  the table's live row and stays open across Add Source.
- Combine: the disabled button says why; it previews on every open, not
  only when the primary changes.
- Review: one fetch of every entry, narrowed in the browser, so switching
  filters is instant and nothing loads twice; a loading state; a switch
  to another list clears the old rows and a late answer cannot land on
  the new list.
- Notices say what a list action did ("Fetching 2 sources again…",
  "Copied 1 reading list to global lists.") instead of "Queued:
  copy_global", and a bulk Refresh or Complete that found nothing to do
  says why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: one label per concept

"Shelves & Lists" everywhere the shelf menu is named, "issues" for what
a list holds (Edit Issues, "No issue needs review", "No such issue in
this list"), and "Hide from List" / "Show in List" for hiding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: split the preview's per-source fetch for the radon gate; spelling

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: fixes from the browser walkthrough

- Remove from List, the toolbar's Remove and a placeholder's Find the
  Comic read the open list from a route param the router never sets
  (pks, not parentIds), so they never showed or used list 0. One
  routeReadingListPk helper reads it for all three.
- The details name an upload by its file: two uploads read alike.
- An empty admin table says why: the lists come from tags and the tags
  filter hides them, or no list matches the filters.
- A list's Shelves & Lists menu does not offer the list itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: NEWS v2.8.0 and README for the revision pass

NEWS gains placeholders, list details, Continue Reading, Export Missing,
remove in place, copy to my lists, shelves holding lists, backups keeping
lists, and the OPDS subject link fix; Changed names the folded filter,
column, sort and search field. README says a list shows its missing issues
and continues, and that user data backups hold imported and hand-made lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* advance to v2.8.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: picker reuses the series index; list replies carry the count

- The candidate picker built the library's series index, every series
  name normalized into its variants, on each open. One index is now kept
  per state of the series table (count, highest pk, latest update: series
  are added and deleted, never renamed in place), behind one aggregate
  query. List previews and match runs share it too. The index is frozen
  after building, since threads now share it.
- Creating, renaming and copying a list answered count: null; list_repr
  counts the shown entries when the menu's annotation is absent.
- The batched-matcher query counts warm the shared index first, so they
  measure the entries' own cost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: v2.8.0 lists every fix merged from develop

Develop's NEWS never listed #1038's fixes, and v2.8.0 is the release that
ships them, so its Fixed section keeps the abort and OPDS lines and adds
search expressions on tag fields and the page count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: the drawer's list controls move into one menu

In the browser drawer each of your lists had five buttons (Open, Edit
Issues, a More menu, Rename, Delete), which left the narrow row little
room for its name. A row now has one ⋮ menu: Open, Edit Issues,
Duplicate and Export, then Rename and Delete.

NameListEditor gives a parent that fills its new `menu` slot one menu per
row; the unused `actions` slot is gone. Shelves fill no menu, so their
rename and delete buttons stay as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update deps

* update deps

* Reading lists: copies keep their header; lists go only with their source

Bugs on the branch, each with a test that failed first:

- A copy, or any list no document or tags source feeds, takes a
  hand-made path in recombine: its entries, order and header stay, and a
  hand-added entry whose comic went is matched again in place. A copy
  lost its description, type and years on any recompute.
- A locked list whose current order holds nothing a source supplies no
  longer feeds comicbox an empty document, which flagged every entry of
  its first source for review.
- copy_list records the header it copied as edited.
- is_disposable(): only a global list with no source and no hand-added
  entry left goes with its last source. A person's list stays, empty or
  not. remove_source and the tags sync share it.
- The combine preview counts each list's own entries: an empty list no
  longer shifts the counts onto its neighbours.
- document_of exports only previous, next and tags, not Codex's own
  written_arc note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: logout forgets your lists; anyone sees a comic's lists

- Logging out clears the lists store, so the next account to sign in
  does not see the previous one's lists in the menus.
- The metadata Reading Lists row sat behind the Shelves row's login
  check. It now shows to anonymous viewers too, whenever the selection is
  in a list they may see; an untagged comic in no list still shows them
  no empty table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: schema for collection items

A list can hold a whole publisher, imprint, series, volume, folder or
another list as an item that stays current:

- ReadingListSourceKind.COLLECTION, a source with new columns
  `collection`, nullable `target_id` (NULL is dangling) and a `position`
  hint for an item with no comics.
- ReadingListEntry.live_source: the item that delivers an entry's comic,
  cascading; match tier `collection`.
- The (list, kind, ref) unique constraint exempts items, whose identity
  two folders in two libraries can share; items are unique by
  (list, collection, target_id) while bound.
- is_disposable takes the removed kind: no list goes with an item.

Folded into 0061's CreateModel operations; makemigrations --check is
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: live.py keeps collection items current

A list can now hold a whole publisher, imprint, series, volume, folder or
another list. reconcile_list() alone writes the comics such an item
delivers, as live entries: a full diff of every item against the rows,
written as the difference.

- Membership per kind: the comic's own column for publisher, imprint,
  series and volume; every ancestor folder; another list's shown comics
  in its order. A comic pending delete stays a member.
- A comic appears once: hand-added, sourced and hidden comics are not
  delivered again, and an earlier item wins over a later one.
- Placement: items sit at the end of a list with document or tags
  sources. On a hand-made list a block sits where it was put; its
  position hint places it while it has no comics.
- Identity without database ids (identifiers.py); a gone target leaves
  the item dangling and it binds again when a row of that identity
  returns. A bound item's identity follows a folder moved in place.
  The resolvers moved from restore.py into identifiers.py for this.
- Positions change in one UPDATE ... FROM json_each statement that
  writes only moved rows; a cached read follows it.
- List in list: no self, no cycle, no personal list in a global one, no
  other user's list. sync_live() orders lists targets first and leaves a
  cycle alone; reconcile_includers() follows a changed list outward; a
  deleted list queues a sync of the lists that held it.
- sync_live() reconciles only lists whose item digests changed, unless
  forced; sweep_live() drops live rows whose comic is gone.
- ReadingListLiveSyncTask (status RLL) runs it in the librarian;
  is_large() tells a caller to queue it above LIVE_INLINE_LIMIT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: recompute, copy, combine and edits leave live rows to live.py

- recombine neither reads nor deletes live entries or collection items:
  it recomputes the other entries, then reconcile_list() places the
  items' blocks and drops comics the list now holds otherwise; the lists
  holding it follow. A hand-made list keeps its items.
- rematch, its worker query and rebuild_from_tags skip live rows; a
  rematch that finds comics reconciles, so a matched comic stops coming
  from its series.
- copy_list copies items, not their rows, and syncs the copy; a global
  copy leaves out personal lists. combine_lists moves items (blank
  revision), drops one that would hold the primary, and points lists
  that held an absorbed list at the primary. rank_sources ranks only
  document and tags sources.
- Entries API: a live entry carries its item and takes its names from
  its comic; GET adds each item as one editor row. Picking, hiding,
  deleting or finding candidates for a live entry is refused, naming the
  item; Remove reports the comics it refused with their items. Adding by
  hand skips comics held by hand and never splits a block. Reorder moves
  an item's block whole on a hand-made list, keeps items at the end of a
  sourced list, and refuses to move a live row alone. Every edit syncs
  the list and the lists holding it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: one rule for missing and shown; items are no sources

- MISSING_Q and DANGLING_Q in models/readinglist.py define missing once:
  no comic, not hidden, not a live entry. A live entry whose comic went
  is dangling until the sweep drops it.
- entries_acl_q lets only non-live comicless entries through, so every
  read of shown entries leaves dangling rows out: the editor and its
  missing filter, the menu count, the details, the grid placeholders,
  the card coverage, the metadata row, the admin table counts and the
  arc numbers written into files. Each has a test that failed first.
- Export sources, the details' sources, the card caption and the admin
  table's source chips skip collection items, whose identity holds names
  and folder paths; the admin row and the details count items apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: triggers for the live sync; owner changes keep the rules

- The import post-phase syncs tag lists, then lists with collection
  items, on the counters that can change a collection's comics: comic,
  link, tags, comics and folders moved, comics and folders deleted. A
  revival-only import does not. One test per counter.
- The nightly run queues a forced live sync after the rematch, since the
  reaper, orphan cleanup and library deletes count nothing; its priority
  slot moved after the rematch so it runs after it.
- The reaper sweeps live rows its reaped comics left comicless.
- An admin cannot make a list personal while global or other people's
  lists hold it, nor global while it holds a personal list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: PATCH items replaces add and remove

PATCH /api/v4/reading-lists/<pk>/items {add, remove} keyed by
collection, the shelves contract on lists:

- Comics are entries added by hand; a publisher, imprint, series,
  volume, folder or list is a collection item that stays current.
  Adding twice adds nothing; a refused list item comes back with its
  reason; targets the user may not see are dropped silently. A large
  item is saved and its sync queued on the librarian.
- Removing comics keeps the entry DELETE's rule and refuses an issue a
  collection delivers, naming the collection; removing an item takes its
  live entries with it.
- The menu GET reports each list's direct items by collection, for the
  menus' toggles.
- Deleting a list takes it out of every stored Reading Lists filter.
- The <pk>/add and <pk>/remove routes and the selection view are gone;
  their tests are ported to the items route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: the shelves backend goes; OPDS lists your lists

Shelves fold into reading lists. Everything but the model and its filter
field, which go in 0061 with the data they hold, is removed or replaced:

- The shelves API, serializer, routes and the target-deleted signal: a
  list item dangles instead. The nightly orphan sweep job, its JRF
  status and admin job.
- Telemetry counts personal lists and collection items by kind
  (personal_list_count, personal_list_user_count, list_item_count,
  list_items, closed-vocabulary keys) instead of shelves.
- The browser's shelf filter, membership module, shelved column, sort
  and annotation, the metadata shelves row and saved-view shelf checks.
  The Reading Lists column is the editable one now. A request still
  sending a shelves filter matches nothing.
- At the lists root the Reading Lists filter shows the lists a list
  holds, not every list sharing an issue with it.
- OPDS start pages list your non-empty reading lists: v1 links each to
  the list's own feed, v2 previews it in reading order.
- The collection maps moved to codex/models/collection_models.py;
  restore maps the retired favorite and shelved sort keys to
  reading_lists.
- The browser and column picker no longer hide a column from anonymous
  visitors: the only one was Shelves.

Tests: the shelf API, filter, membership, effective-flag, cache, sums
and list-shelf tests are deleted, their behaviours ported to
test_reading_list_items_api, test_reading_list_filter_items (with the
cachalot shim test) and test_opds_reading_lists; telemetry, OPDS and
column-picker tests ported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: shelves become personal lists in 0061; backups follow

Migration 0061 makes each shelf a personal reading list of its name. Its
comics are entries added by hand; every other item is a collection item
whose comics are written in the same step, laid out as the live sync
lays them out, so the first sync finds nothing to change. Names are
cleaned and numbered as list names are; rows whose user, comic or row is
gone are dropped and logged. A shelves filter becomes a Reading Lists
filter, and the shelved sort key and column become reading_lists. The
reverse rebuilds shelves, best effort. The step lives in
_0061_shelves_to_lists.py, which the loader skips. Shelf, ShelfItem and
the shelves filter field are gone.

Sidecar schema 6: collection items are dumped by identity, live rows are
not, and a restore binds the items with one live sync. An older backup's
shelves, shelf items and favorites restore into personal lists, and its
shelves filter names into a Reading Lists filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: one list menu everywhere; the shelves frontend goes

The shelf menu and the reading list section become one Reading Lists
menu, on cards, table rows, the selection toolbar, the metadata dialog
and the reader. Each list the user may change is a row with a checkbox
that says whether the targets are in it directly; a click puts them in
or takes them out and keeps the menu open. The store's toggles are the
shelves store's: optimistic, one PATCH per change, rolled back on error,
in order per list, and a target the server refuses is put back with the
reason. A new list is made with the list name input, which suggests
names and refuses a taken one, in the menu and the drawer.

Removing an issue that is in a list through its series says so, and the
notice offers to remove the series. Notices can carry an action button.

The Reading Lists column takes the Shelves cell's menu button; the
metadata Reading Lists row takes the Shelves row's. The shelves drawer
block, filter sub-menu, metadata row, store and API client are gone, and
no "shelf" wording is left. The items PATCH answers the list's count,
refused items name their target, and the filter offers your own lists
first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: removing the last item closes the gap; own lists first

Found in the browser walkthrough on a database upgraded from 0060.

Removing a list's last collection item took its live rows with it and
left the hand entries after them at their old places: one issue showed
as place 8. reconcile_list returned early for a list with no items and
no live rows; it now renumbers what is left.

The Reading Lists filter sub-menu sorted the server's choices by title,
so your own lists no longer came first. It keeps the server's order, as
the Metron age ratings already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS and README: shelves are reading lists now

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Migration 0061: the shelves step freezes its sort name and identity

The step imported get_sort_name and the backup identity encoder from
live code, though its docstring says it reads historical models only.
Every database upgrading from v2.7.1 or earlier runs it, so a later
rename or change of either would break or silently change that upgrade.
It now carries private copies of the sort-name rule and of the identity
for the six item collections. A copy that later falls behind is
harmless: the live sync refreshes an item's identity while it is bound.

A test pins both copies to today's get_sort_name and
encode_identifier(identifier_for_browse_collection(...)) for every item
collection, so they are proven equal now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: one list opens whole whatever kind or list filter is picked

The kind filter and the Reading Lists filter's held-lists rule applied
whenever the model was ReadingList, which is also the model for one list's
page mtime, metadata and download. A kind or a list filter picked on the
grid then made another list's details and download "not found" and froze
its page mtime at the epoch. Both now apply on the grid of lists only.

The kind picks lists, not comics, so it no longer hides a list's missing
issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: the kind is a list-valued filter with server choices

The Reading List Kind is stored and sent as a list of kinds, the shape
every other filter has; the API ORs several. "All" is gone: cleared means
every list. One list_kind_q defines the kinds, which overlap on purpose:
Mine is the viewer's own lists (nothing when signed out), From Tags a list
made from story arc tags alone, Curated every other list.

On the grid of lists the filter menu offers the kinds that have lists
under the other filters, in the order Mine, Curated, From Tags. The kind
leaves itself out of its own probes, so a picked kind keeps the others
offered; the probes join the one availability query.

Backups store the kind like any filter column. A restore reads a
development build's single value and drops unknown kinds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: the kind filter applies in every view

Outside the grid of lists, Reading List Kind narrows to comics on a
visible list of the picked kinds: Mine in the Series view is every series
with an issue on one of your own lists. It is an IN subquery, never a
join, so counts and sums stay per comic. Inside one list it does nothing,
for browsing, the list's card, mtime and files, and the reader reading
through the list; reading through anything else, next and previous follow
it like any filter.

The filter menu offers a kind wherever comics here sit on lists of it,
probed with the kind itself left out. A cached Series view follows new
entries, lists and sources.

Measured on 20,000 comics against the Reading Lists filter on one list of
the same size: the Series page +6%, its filter menu +5%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: the kind toggle goes; Reading List Kind is in the filter menu

The All / Mine / Curated / From Tags buttons in the Reading Lists toolbar
are gone, so that toolbar is the same as every other view's. The kind is
an ordinary filter sub-menu, Reading List Kind, beside Reading Lists: it
lights the filters-active mark, Clear All Filters clears it, and its
choices keep the server's order, Mine, Curated, From Tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: filter by Reading List Kind

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filters: name the filters to leave out of a query

The Reading List Kind's own choices left it out with a kind_filter flag.
The choices for every filter now need the same, so the flag becomes
omit, a collection of filter names. It is kept apart from the filters
the grid of lists skips: leaving the Reading Lists filter out of a comic
query must never put the held lists' pks on the comics. No behaviour
change.

Restoring a bare kind string no longer trips basedpyright's needless
isinstance warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter choices: a filter's own value no longer narrows its own list

Several values in one filter match any of them, so a filter's choices
are built with its own filter left out: ticking Spider-Man no longer
shrinks Characters to his co-stars, where picking one would then widen
the result. The other filters still narrow it, and the two Age Rating
tabs leave out their own key only, so each still narrows the other.

A ticked value is always listed so it can be unticked, even when the
other filters leave it no comic. It is named only through what the
viewer may see: a tag through the comics the ACL lets them see, a list
through the lists they may see. A raw pk lookup would name a tag found
only on hidden comics, or another user's list. The extra query runs
only when a ticked value is missing, and merges by pk in Python.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading List Kind: each list is exactly one kind

The kinds overlapped: Curated took in the viewer's own lists, so with
several kinds tickable, Mine and Curated together said nothing new and
hiding the lists from tags took two picks that both showed your lists.
Now ownership decides first: the viewer's own lists are Mine, other
lists made from story arc tags alone are From Tags, and the rest are
Curated. Ownership can be given away, so a list from tags the viewer
owns is Mine. Signed out, Curated and From Tags are as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter menu: each choice is a checkbox that toggles

The choice list bound model-value and multiple on a VList, which has
neither: its model is selected and it selects one row at a time. So a
second pick replaced the first and a ticked row was disabled, so it
could not be unticked. Since March 2024.

Rows are now a checklist, as the released Shelves sub-menu was: a
leading read-only checkbox, role menuitemcheckbox with aria-checked,
and a click that works out the new filter from the whole filter, not
from the rows shown, so a ticked value the search box hides stays
ticked. The As-tagged tab keeps its standardized column after the
checkbox. Ticked rows come first when the list opens and stay put as
you tick; the age ratings and the reading list kinds keep their order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Browser store: ticks reload in place; an open menu keeps its choices

A tick in a filter sub-menu patches the filter at once and reloads the
page in place 200 ms after the last of a quick run of ticks: an aborted
request still runs to the end on the server, so cancelling per tick
saves nothing. Settings are saved once that load succeeds. The page
fetch is one path now, shared by the full load, the in-place refresh
and the tick reload.

Every page load emptied the menu's choices, so an open sub-menu fell
back to a spinner and lost its search text and tab, and a library
update with the menu open left the spinner until it reopened. The
three places that emptied them go through one helper: with the menu
open they are kept and marked stale; closing the menu empties stale
ones. The menu tells the store when it opens and closes.

A settings change no longer resets the sub-menu; the menu does it on
close, and Clear Filter returns to the filter list itself. A late
filter-choices answer no longer writes into emptied choices. A library
check that arrives while a page load is in flight or a tick is waiting
is skipped: a full load started then fell into loadSettings and
overwrote the ticks with the saved filters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter menu: ticking keeps the menu open on its sub-menu

A tick no longer closes the menu: the page reloads behind it and you
tick on. A bookmark pick still closes it, and closing returns it to the
filter list. The menu also tells the store it closed when it unmounts
open, so its choices are not kept stale for a menu nobody sees.

Lists a tick made stale refresh in place. Under Any a filter's own
value leaves its own list alone, so in a sub-menu only the other Age
Rating tab is refetched, once the page has reloaded. Back at the filter
list the availability is refetched once if anything went stale; it is
the slow request, so it is never sent per tick. Lists replaced while a
sub-menu is open load again instead of sticking on the spinner.

A letter key pressed on a choice row made Vuetify's select pick a
bookmark, which closed the menu; printable keys now stay in the
sub-menu, while Escape and the navigation keys go through.

The bookmark rows showed above an open sub-menu: the class meant to
hide them had no rule. It does now, in global.scss, since the rows are
teleported. Clear All Filters and the divider belong to the filter list
and give way to the sub-menu's own Clear Filter, which now keeps its
place, unseen, with nothing ticked; a first tick added both rows above
the list and moved every row down under the pointer.

The filter list shows how many values are ticked in each filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter menu: an arrow key steps one choice row

The choices list sits inside the select's own list, and a VList moves
focus on an arrow key without stopping it, so both lists moved and each
key stepped two rows (found in the browser check; it predates the
checklist). Once the choices list has moved one row, the key stops
there. At either end that list would wrap; focus goes back and the
menu's list steps out of the choices instead, to the header.

The tests give elements an offsetParent: Vuetify walks only rendered
rows, and happy-dom renders none, so without it no key moved focus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: multi-pick filters

Filters take several values with the menu open; arrow and letter keys
in a filter's choices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Browser store: a library check skips only a load in flight

The library-change check skipped whenever browserPageLoaded was false.
A page load that failed (not a redirect, not an abort) leaves it false
with nothing in flight, and the next library change was what recovered
it through loadBrowserPage and loadSettings; it was skipped for good,
so the spinner stayed until the viewer navigated. It now skips only
while a page fetch is in flight or a tick is waiting.

It checks again once the head request answers: a tick made while it
was out would otherwise have its fetch aborted by the full load, the
placeholder shown under the open menu, and its settings never saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter menu: ticked rows read at full strength

Rows are variant="plain", which Vuetify draws at 0.62 opacity unless
hovered or focused, so a ticked row read fainter than the row last
clicked (Iron Man ticked at 0.62 beside Wolverine ticked at 1). A
ticked choice now reads at full strength, focused or not, and so does
a filter-list row with ticks, which had the same fault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filters: store which filters match all ticked values

One more filters setting, match_all, names the filters set to All. It
is added to unreleased migration 0061 beside reading_list_kind, so the
reader, downloads, bulk tag-writing and metadata will follow it with
the filters, and it rides in backups under unreleased schema 6; restore
drops unknown names.

The tag-like filters are defined once, in codex.choices.browser, with a
test that they are the filters the model lets a comic hold several of,
plus Reading Lists. make build-choices exports them to the frontend;
the older hand-kept m2m key set folds into the same definition.

The names are values, which the API does not camel-case, so one field
converts them: camelCase on the wire, like every filter key, snake_case
inside. A single-valued filter, an unknown name or the server spelling
is refused.

It is no filter of comics: it narrows nothing on its own, does not hide
a list's missing issues, is left out of the OPDS subtitle, the filters
mark and the sub-menu names. The Reading List Kind and match_all
readers move out of restore.py into restore_filters.py, which keeps
restore.py's maintainability at A.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filters: All matches every ticked value

A filter named in match_all matches comics that hold every ticked
value: one IN subquery per value, ANDed, never a join, which would
repeat a comic per matching value and multiply the sums. No comic has
no value and a value, so None with another value matches nothing; None
alone is as under Any.

Reading Lists under All is one listed-comics subquery per list, ANDed;
a list the viewer may not see holds none of their comics. On the grid
of lists it is the lists every ticked list holds, still as a pk list so
cachalot sees an item change.

The mode is read from the filters inside get_all_comic_field_filters,
so the reader's next and previous, downloads, metadata and bulk tag
writing follow it with no change of their own. A cached browse follows
a tag change without a cache clear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter choices: under All a filter's own ticks narrow its list

Under Any a filter's own value is left out of its own choices; under
All it stays applied, so the list is what still occurs with the ticked
values: Spider-Man ticked offers only his co-stars. Ticked values are
still always listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter menu: a Match all ticked switch on tag-like filters

Characters, Credits, Genres, Identifier Source, Locations, Reading
Lists, Reprints, Series Groups, Stories, Tags, Teams and Universes get
one switch row in the sub-menu header, after the search box, always
shown so the list does not move. The list of tag-like filters comes
from the server's one definition through make build-choices.

Under All the open list refreshes in place once the page has reloaded
after a tick. A refresh never removes a row, which would move rows
under the pointer: a row that no longer occurs with the ticked values
stays in its place, dimmed and not tickable, and rows newly offered go
after; they drop out when the sub-menu opens again. A ticked row is
never dimmed. A line under the switch says why rows dim while All is
on. None cannot combine with All: its row is not tickable and says so,
and switching to All unticks it.

Clear Filter leaves the switch as set; Clear All Filters resets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter menu: turning All on no longer moves the menu

Found in the browser check: None's reason sat in a column of its own
and the hint under the switch ran wide, so turning All on widened the
menu, which moved left and took the switch out from under the pointer.
Both now wrap within the menu's width: None's reason under its title,
the hint under the switch. The menu's place and width, and the switch's,
are the same with All on and off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: tag filters can match all ticked values

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Filter menu: Clear Filter is an icon in the sub-menu's title row

AJ's choice: the labelled orange Clear Filter bar, and the blank band it
left unseen with nothing ticked, give way to a clear icon at the right
end of the title row, shown while the filter has anything ticked (Age
Rating counts both tabs). Primary colour, the same action as the Clear
All Filters bar, which stays on the filter list. It clears that
filter's values and returns to the filter list as before, and leaves
the Match all ticked switch as set.

The icon is always there, unseen and disabled with nothing ticked, so
it showing moves nothing: the title row is 48px and the menu the same
width either way. Its tap target is 48px, its negative margins keep it
in a 36px slot, and it starts after the title, the longest titles
included. The title row goes back when clicked, so the icon's click
and Enter or Space stop at the icon. It is named Clear Filter; from the
title row, the down arrow reaches it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update deps

* Admin Reading Lists: the Source filter is a checklist

The Show lists from tags checkbox and the Source select overlapped: the
select already offered File Tags, and picking it with the checkbox off
showed only lists that combined tags with another source. Source is now
a checklist, as the browser's filters are: tick any number of kinds and
a list shows if any of its sources is ticked; nothing ticked is every
list, the lists from tags included (AJ's choice). The checkbox goes.

The checklist offers the kinds some list has, with how many lists have
each, and keeps a ticked kind offered so it can be unticked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading lists: a tags source is named Story Arc Tags

The tags source kind read "File Tags", which suggested any tag could
make a list. Only story arc tags do: the sync that keeps one list per
arc name, and writing a list into files as a story arc. It is named for
them now, in the admin Source filter, source chips and the add-lists
choices. The value stays "tags", so telemetry and stored sources are
unchanged; the label is edited in unreleased migration 0061, which a
database that has run it does not need again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Admin Reading Lists: Source None, and a Visibility checklist

Source gains a None row for lists with no source: made by hand, or
holding only items. A Visibility checklist sits beside it: Global, then
each owner of a personal list, with how many lists each has. The table
lists every user's personal lists, so owners are offered by name rather
than as a Global or admin checkbox. Both work as the browser's filters
do: tick any number, nothing ticked is every list.

The selection shows the first ticked row's name: in Vuetify 4 a select's
selection slot gets the raw item. The filter fields wrap instead of
shrinking, which left the Name field unreadable on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Review dialog: arrows that move an issue the way they point

The position field was a number input, and its spinner's up arrow
counts the position up, which moves the issue down the list; its down
arrow moved it up. The field keeps typing a position, without the
spinner, and each row gets Move up and Move down arrows, as the Sources
dialog ranks its sources.

They step one place on the whole list, as dragging does, so they show
on the All filter only. A collection's own issues have none: they move
with their collection. A step down next to a collection's block clears
the whole block, as the server keeps a block whole; on a list with
sources an issue cannot step down into its collections, which stay
last. Server tests pin the positions the arrows send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Reading list cards: the name first and bold, its sources below in grey

A reading list's card led with its sources and ended with its name. Now
the name comes first, bold and white, and the sources and "31 of 98"
follow in the grey caption lines. Other cards keep their name last.

Several sources join with a comma, as other cover captions join several
values; no-break spaces keep a source and its attribution whole when
the caption wraps ("Tags, Metron · CBRO").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* update deps

* update deps

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
v2.7.1 shipped through 0060, so 0061 and 0062 have never reached a
release. Fold them into 0061_post_v2_7_1_schema, as #1034 did, so an
upgrading install applies one migration instead of two.

Operations keep their order: the VerseDB key column first, then the
reading-lists tables and data steps. The reading-lists migration is
renamed into place, and its shelves helper becomes
_0061_shelves_to_lists. No replaces, per the repo convention.

Verified on scratch databases: a fresh migrate of the fold and of the old
chain give identical sqlite_master schemas, as does an upgrade from 0060.
Rolling the fold back to 0060 gives the same schema as rolling the old
chain back. makemigrations --check reports no changes.

The migration tests now start from 0060 and end at the fold.

A dev database that already applied the old 0061 and 0062 needs
`migrate codex 0061_post_v2_7_1_schema --fake`. A renamed migration is
one the recorder has never seen, so it would re-apply and fail on a
duplicate column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…igration 0061 (#1044)

* chore(migrations): rename 0061 to reading_lists_and_versedb_key

0061 has not reached a release, so its name can still change. Name it for
what it does: the reading-list tables and data steps, and the VerseDB key
column.

A dev database that applied 0061_post_v2_7_1_schema needs
`migrate codex 0061_reading_lists_and_versedb_key --fake`. A renamed
migration is one the recorder has never seen, so it would re-apply.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Telemetry: count reading lists, filter use and the first tagging source

Shelves became reading lists, which dropped the count of single issues
people shelve, and the lists themselves reported little. Counts and
closed vocabularies only:

- usage: list_sources by source kind, list_entry_count,
  list_entry_missing_count and personal_list_entry_count.
- tagging: default_source_first. default_match_mode and
  default_prompts_mode report "other" outside their enum, as
  default_effort did, and the source buckets key off codex's registry.
- per_user: show_missing_issues, plus browser_filter_users and
  browser_match_all_users keyed by the filter's name. What a filter is
  set to is never selected.

Chronicle needs columns for the new keys before v2.8.0 ships.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* v2.8.0 review fixes: live sync dispatch, reader list, copy access, preview cache

Eight findings from the pre-release review, each with a test that failed
first.

- Dispatch ReadingListLiveSyncTask. It had a priority and a handler but
  no case in ScribeThread.process_item, so it never ran: a large
  collection added to a list stayed empty, and the nightly sync was
  skipped. A test now drives every ranked scribe task through the
  dispatcher.
- The reader reads the list it was asked for when a comic is on several,
  and falls back to the first in order, not to a set's hash order.
- Copy to My Lists copies only the collection items the copier may see,
  and list counts respect the comic ACL.
- Reading-list previews get a cache of their own, so its cull cannot
  drop pending tagging prompts. A token is deleted once imported.
- Duplicating a list whose name is near 128 characters no longer loops.
- A hand-added issue folds into the tag row that holds the same comic,
  so a list written into its comics' files reads back once.
- Migration 0061 pairs each list with the row bulk_create returns, so a
  story arc whose sort name cleans differently cannot abort the upgrade.
- A Tag Online task joins a running session only when nothing is pinned
  and its settings match, so it cannot inherit a Tag by ID run's issue.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Ryan Haines <ryanhaines@homelab.tail7d83f7.ts.net>
… restore (#1045)

* B3: a hidden list entry gives its list no cover or table cells

The card's cover subquery and every table-view intersection query joined
a list's entries without `ignored=False`, so a hidden comic could cover
the list and blank or skew its row's shared values. Both now carry the
shown-entries test in the same Q as the list relation, so it rides the
same join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B4: adding a comic a list holds hidden shows it again

`add_comics` skipped any comic the list already held, hidden entries
included, while the add-to-list menu reads only shown entries: the menu
offered the comic as absent and ticking it added nothing. A hidden entry
of the comic is now shown again in place and counts as added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B5: tags sync renames only lists its tags lead, one list at a time

A changed arc renamed every list holding its tags source, so a curated
list combined with tags took the arc's name. Only a list whose primary
source (first by rank) is the tags source is renamed now.

Every arc's create, attach, update and removal ran in one transaction,
so one failure, such as a rename onto a name the list's owner already
uses, raised out of the sync and rolled back every other arc, on every
run. Each arc now runs in a savepoint of its own; a failure is logged
and left for the next sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B6: a deleted or revived comic re-stamps the reading lists holding it

The delete and revival passes collected StoryArc pks, but the timestamp
updater reads ReadingList pks, so a list never got a new updated_at when
one of its comics was hard-deleted or revived and an open view of it
never refreshed. The collector now gathers the lists holding each comic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B7: a failed recombine keeps a refreshed source's old revision and ranks

`refresh_source` saved the new document and revision, and `rank_sources`
the new ranks, before recombining and outside any transaction. A
recombine that failed left the new revision, so every later refresh read
the list as unchanged and it never recombined. Both writes now share one
transaction with their recombine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B8: the list matcher prefers a live comic to one pending delete

Ties between copies of an issue broke on the lowest pk, which is the old
row a moved file leaves stamped `missing_since`: nobody can see it and
the reap deletes it. Both the comicbox and the series-issue passes now
take a live comic first. A stamped comic is still matched when it is the
only copy, so a list survives a briefly unmounted share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B9: reader settings refuse a bad or unseen scope pk

`?reading_list_pk=` went through a bare `int()`, so a non-number was a
500; it is a 400 now. A scoped PATCH made a settings row for any pk: a
list another user owns, or a series or list that does not exist, which
then failed its foreign key. The scope's target must now exist and be
visible to the user (a list by the list visibility rule, anything else
by the comic ACL, stamped comics included as the reader is), else 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B10: reading-list edits take the write lock before reading

SQLite starts transactions deferred. Under WAL, the menu PATCH, adding
or removing issues, and a reorder each read before their first write, so
a commit from the librarian in between made the write fail at once with
SQLITE_BUSY_SNAPSHOT ("database is locked"), whatever the busy timeout;
reproduced on a WAL file outside the suite. Each now opens with the no-op
update live.py already used for this (`_lock`, now `lock_list`).

The test database is in memory, where the error cannot happen, so the
test checks the cause: the first statement of each transaction an edit
opens is a write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B11: Continue Reading skips a comic the browser's filters hide

Continue picked the first unfinished comic of the list, but the reader
applies the browser's filters inside a list, so a filtered-out comic
opened to a 404 dead end. Continue, from the card menu and from the
metadata dialog, now takes the first unfinished comic the reader would
read under those filters. `filters_within_a_list` is the one rule both
read through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B15: under Reading Order list cards read by name, covered by their first issue

Reading Order is the automatic default, and on the lists grid it had
nothing to order by, so the cards fell back to pk order, and each card's
cover was its earliest-dated comic. The grid now sorts by name under
Reading Order, and a list card's cover is the comic at its first
position, read off the entry the cover subquery already correlates on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B16: a comic two ticked lists share counts once in a card's sums

Reading Order under the Reading Lists filter joined each comic to its
entries in the ticked lists, so a comic on two of them joined twice and
doubled in every sum over a card's comics: pages, read pages, progress.
The first position is now a subquery per comic, aggregated per card, so
the comic join is never multiplied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B21: Pause stops online tagging during the stored-id prepass and its waits

The online tag thread reads its queue only between search results, so a
Pause sat in it through the whole stored-id prepass, which on a re-tag is
the whole run, and through any rate-limit wait. The daemon now hands a
Pause to the running scan as it arrives (as it already does to cancel a
reading-list fetch) and still queues it for a scan that starts after.
The prepass stops before its next comic, leaving the rest for Resume,
and its fetch waits on the scan's pause event instead of sleeping out
the rate limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B22: refuse an online-tag scan the daemon cannot run, before the 202

Starting a scan answered 202 for any effort string and, by default, for
all three sources whether or not each had a key. The daemon then raised
ValueError or OnlineConfigurationError and the admin watched a spinner
for a scan that never started.

- An omitted source list now means the sources with keys, the admin's
  default order first. None keyed is a 400.
- A named source without a key, or an effort comicbox does not know, is
  a 400 that says which.
- Resume refuses a stored scan whose source has since lost its key.

Tests that started or resumed scans with no keys at all now configure
the keys their scans name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B23: the online-tag launcher sends the effort it shows

`startSession` never put `effort` in the request, so every scan from the
launcher ran at the admin default whatever the Effort select said. It is
sent now. The server took an empty effort, the select's Auto, as "not
given" and replaced it with the admin default; only an omitted effort
falls back now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B24: a failed credential save keeps the typed key; source panels stay put

`updateTaggingDefaults` swallowed its error and resolved the same way on
failure as on success, so the Tagging tab cleared the typed API key after
a rejected save. The action now resolves whether the save landed, and a
failed save keeps what was typed.

Each source panel's open state was a fresh array literal in the
template, so any re-render handed the panel a new value and snapped an
opened panel shut. The state is kept in `data` once toggled; a newly
keyed source still folds its panel after a successful save.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B25: a re-queued series prompt no longer offers the old issue's candidates

A pick that names one issue cannot speak for the rest of the series, so
those comics go back in the queue under the same question. The re-queued
prompt kept the representative's candidates, which are that comic's
issues: choosing one again pinned its issue id and wrote it onto a
different comic. The re-queued prompt now carries no candidates; its
comics can be skipped and tagged again, never written with another
issue's tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B20: a strict-xfail test for Merge all sources skipping keyless sources

Not a fix. The stored-id prepass takes a comic out of the run when any
selected source has its id, so under Merge all sources a source with no
stored id, such as a newly keyed VerseDB, is never asked. The test states
what the Tagging tab promises, every enabled source queried, and is
marked strict xfail until AJ rules on the change, which alters how many
API calls a re-tag makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B27: backups keep Merge all sources, the default effort and file renaming

The tagging defaults row in the user-data backup had no columns for
`merge_all_sources`, `default_effort` or `rename_files`, so a restore set
all three back to their model defaults. The sidecar schema, the dump and
the restore carry them now; a backup written before has no such columns
and leaves the defaults standing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B29: a stored unknown default source no longer fails every Tagging tab save

`default_sources` is validated on write only, and a restore writes it
without that validation, so a backup naming a source this build does not
register put the name in the row. The Tagging tab sends back what it read
with every auto-save, and each save was a 400. The defaults now read
without names outside the registry, so the next save stores the list
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B30: the lang: search alias searches the language

`"language": ("lang")` is a string, not a one-element tuple, so the
field's aliases were the letters l, a, n and g: `lang:` searched nothing
and `a:` searched the language. A test now refuses any alias entry
written as a string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B26: a saved filter on a tag list survives a rebuild and restore

A saved Reading Lists filter was dumped as list uuids. A list made from
tags alone is not backed up; after a rebuild the tag sync makes it again
under a new uuid, so the restored filter named nothing. v2.7.1 restored a
story arc filter by name. The backup now also records the tags ref, the
arc's sort name, of each filtered list made from tags, and the restore
resolves it to whichever list holds those tags now, beside the uuids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B28: restoring old shelves follows the list name rules and keeps unimported comics

Restoring a backup's shelves as lists used the raw shelf name, so a shelf
whose name cleaned to nothing made a nameless list. Its name is now
cleaned as the shelves migration cleans it, with the same "Reading List"
fallback, for the shelf, its items and a saved filter naming it. Two
shelves that clean to one name share the list, as a restore reuses a list
of that name; the migration numbers them, which a repeated restore could
not do idempotently.

A shelved comic the library did not have yet was dropped, so a restore
run before the import finished lost it for good. It is now a missing
issue named from its file, which the rematch after an import finds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B19: Metron card types, non-Latin export names, ?list= once, a notice's timer

- The preview upload sends `sources` as a JSON string in a multipart
  form, which the camel-case parser never converts, so a Metron card read
  `list_type` from a `listType` key and lost its type. Those keys are now
  converted as a JSON body's are.
- Exporting a list named outside Latin-1 sent a Content-Disposition that
  Django MIME-encoded whole (`=?utf-8?b?...?=`), which no browser reads as
  an attachment. It is built by Django's helper, with `filename*`.
- The reader read `?list=` on every load of the book, so a later reload
  forced the list back over a reading order picked since. It is read
  once and dropped from the route; the server keeps the arc.
- A notice replacing one still showing kept the snackbar open, and
  Vuetify starts its timer only when it opens, so the second notice
  closed on the first one's time. Each notice now remounts it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B12: missing-issue placeholders take the small cover size on small screens

At 960px and below the browser grid's columns are small covers (100px)
but the missing-issue card and the collapsed run card kept the desktop
size (165x254), so they overlapped their neighbours and ran off the
screen. Both now take the small cover size at that breakpoint, as the
comic cards do.

Checked in the browser pane on a scratch stack: at 375px every
placeholder and the run card measure 100x154 beside 100x154 comic
covers in 100px columns (they measured 165x254 before); at 1280px all
measure 165x254.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B13: Edit Issues shows a held collection as one row that acts on the collection

A list holding a series, folder or other collection listed every issue
it brought as a row of its own, and every control on those rows (find,
map, hide, move) was refused by the server, since such an issue is the
collection's. The entries response already carries the list's items, so
the dialog now folds each collection into one row at its first issue,
under All: its name, how many issues it brings, a position field on a
list without sources, and Remove, which removes the collection. A
collection whose target is gone shows as gone, with nothing to remove
through the items API.

Checked in the browser pane on a scratch stack: a personal list holding
a series shows "Other Series — 2 issues, kept current" in place of its
two issue rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B18: disabled controls say why in words; a checklist review filter; no repeated menu title

- Eight disabled buttons explained themselves only with a title, which a
  disabled button never shows: Continue Reading in the list details,
  Combine and Write to Files in the admin bulk bar, Accept All Best
  Guesses in Edit Issues, Preview and Import in Add Lists, and Combine in
  the combine dialog now show the reason as text beside them while off.
  A source with nothing to fetch (an upload, the tags) has no Refresh
  button at all, rather than one that is always off.
- Edit Issues filtered with a mandatory toggle whose "All" overlapped its
  other choices, and the bar did not wrap at 375px. It is a checklist of
  Needs Review, Missing and Hidden, where nothing ticked is every issue
  and several ticked show any of them, and the bar wraps.
- The Reading Lists menu opened with a "Reading Lists" header that every
  opener already says; it is gone, and so is the one-use MenuSection.

Checked in the browser pane on a scratch stack at 375px and 1280px: the
Review bar's chips, hint and disabled Accept button; the bulk bar's two
reasons on their own line; the reader's Reading Lists menu starting with
the lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B17: an empty personal list's Open is off, and says why

Open on an empty list routed to a browse page that cannot resolve, so it
bounced back to the list of lists with no message. In the drawer's own
lists, Open on an empty list is now off with its reason as visible text,
"Empty. Add issues from any Reading Lists menu.", and does nothing.

The small fix, as directed. A list with entries but no comic the viewer
can see (only missing issues) still bounces; letting an owner's list
resolve in the browser is the alternative that would cover both.

Checked in the browser pane on a scratch stack at 375px: the empty
list's menu shows Open greyed with the reason under it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B14: list changes reach the menus, the drawer, the grid and a ticked filter

- The admin tab's delete, bulk delete, combine, Copy to Global, rename and
  Make Private change lists in the request and broadcast nothing, so
  other views kept the old lists. They now send the same lists-changed
  and library-changed notices a librarian job sends: menus, drawers and
  the admin table reload, browsed pages check their mtime.
- A list deleted elsewhere is dropped from the server's stored filters,
  but a client's own ticked Reading Lists filter went on naming it. On a
  lists-changed notice the browser compares its ticked lists with the
  server's and reloads its settings when one is gone, and only then.
- A membership change refreshed the page only in table view with the
  Reading Lists column shown. A page showing a list, its own or under a
  ticked filter, now refreshes in place in cover view too, and so does
  the grid after Edit Issues from the drawer.

Checked in the browser pane on a scratch stack: on a list's page in
cover view, taking a comic out of the list refreshed the grid from five
issues to four; an admin delete through the API dropped the list from
this client's menus within seconds, with no reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: fixes to v2.7.1 behaviour from the v2.8.0 review

One line each, compressed where related, for A8, B9, B21 to B25, B27
and B30: the fixes to behaviour that already shipped in v2.7.1. Fixes
to code new in v2.8.0 get no line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Format the section B changes

`make fix` output only: line wraps from ruff format and prettier, and the
re-indent of Edit Issues' rows inside their template loop (B13). No code
changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Gate fixes for section B

Lint, type-check and complexity fixes to the section B commits: a
None guard before the scope model lookup, the continue view on the
settings base alone, typed test doubles, helpers that keep the matcher
methods under rank C, and the new B3, B27 and B28 tests in their own
files so the two test modules keep maintainability rank A.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B24: the VerseDB card test's save stub reports success

`updateTaggingDefaults` now resolves whether the save landed, and this
stub resolved nothing, so the tab read its key save as failed and never
enabled the source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A6: a folded hand-added entry stays hand-added, so its comic outlives the source

A6 folded a hand-added entry into the source row that holds its comic, so
a list written into its files reads back once. The folded entry was
deleted and the row was the source's alone: removing that source, or the
comic's arc tag, took the comic out of the list. A list whose every entry
folded counted as tags-only, was rebuilt from its arc, and was deleted
once the arc had no comic left.

- A folded row keeps `manual`, so the comic stays when the source goes,
  and a written list is never tags-only or disposed of, as before A6.
- It keeps the entry's hidden flag and a cleared review, and in a locked
  order its place, through every recompute.
- Removing it hides it, as for any row a source supplies; a pick on it
  makes it its source row's again, so the pick holds.
- A hand-added entry no source row takes is supplied by none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B1: removing a list's last source removes the rows it supplied

A list no source feeds took the hand-made path, which keeps its entries
as they are, so removing the last document or tags source left every row
that source brought. Such a list now keeps only what was added by hand.
A hand-added entry folded into one of the dropped rows stays, once, and is
supplied by no source again, so removing it deletes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A6: a tagged entry's comic cannot be picked or marked missing

A pick or "not in library" on an entry whose row comes from the tags
source answered 200 and cleared the folded entry's `manual`. The next
recompute ignores picks on a tagged row, as its arc tag says which comic
it is, so the comic came back and the entry was no longer hand-added: it
left the list when its arc tag or the last source went.

Both are refused now with a reason that says what to do instead: hide
the entry, or take the arc tag off the comic. That also ends the silent
revert of a pick on any tagged row, folded or not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B4: a hidden source row a person adds back is hand-added

Adding a comic the list held hidden cleared `ignored` and answered
"added", but a source's row stayed `manual=False`. It went when the
source was removed, when a refresh dropped it, or when its arc tag went.
It is now recorded as hand-added; a hand-added row a source supplies is
a folded entry, which outlives its source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B1: combining lists no source feeds keeps the others' entries

Older than this branch, in the path B1 rewrote: a list with no source
recomputed from its own entries and ignored the edits `combine_lists`
passes. Combining lists of hand-added entries alone, such as two Copy to
Global lists, deleted the absorbed lists and dropped their entries.

That path now builds the list from the combined edits: the primary's
hand-added entries first, then each other list's, in order. A comic an
earlier list holds comes once, as combining sources joins one issue; a
list's own repeat stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B5: a rename onto the owner's other list is skipped, not failed on

A tags-led personal list renamed to a name its owner's other list has
raised inside the arc's savepoint, which rolled back the source's new
revision with it. Every later sync saw the same change, failed the same
way, and the list never followed its arc again. The rename is skipped
when the owner already has the name; the list keeps its name and still
takes its arc's comics. Numbering the name instead would flip between
"(2)" and "(3)" on each change, since the list's own name is taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B8: live first only among the strongest matches

The matcher dropped pending-delete comics before choosing the strongest
rule. While a list's own comic, found by its issue id, was stamped (a
share unmounted), a different live comic found only by name took the
entry, and a rematch never revisits a matched entry. The strongest rule
now wins first, and a live copy is preferred only among its finds, which
is the moved-file case B8 was for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B15: the cover test checks again that date order would pick otherwise

The gate-fix commit turned `assert c3.date > c1.date` into a comment to
please the type checkers. Without it the test would stop proving the
cover is not chosen by date if the fixture's dates changed. The assert is
back, with the two dates checked as set first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B7: keep a failed recombine's guarantee without holding the write lock

B7 put the save and the recombine in one transaction. SQLite takes the
write lock at the first write, so the lock was held through the combine,
the matcher and the includers' sync. On a 3,000-issue list in WAL mode a
reorder held it 1.9 seconds and a refresh 2.5, and another connection's
write waited up to 1.9 seconds; a reorder runs in an admin request,
beside readers' bookmark writes.

The guarantee stays without the transaction. A refresh saves its new
revision only after the recombine, so one that fails leaves the old
revision to try again. A reorder that fails puts the old ranks back. The
longest wait of another writer is now 0.5 seconds, the recombine's own
write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A6: the tagged-entry test reads the comic id as the codebase does

basedpyright does not see Django's `comic_id` on the model; the test now
carries the codebase's ignore for it, so `make lint` passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B27: a restore sets only what the backup carried

Opening a backup adds the columns a later release introduced, holding
their defaults: a dump is replayed into a scratch database and the store
reconciles it. So every "does the row have this column" guard in the
restore was always true.

- New with B27: restoring a v2.7.1 or older backup reset Merge all
  sources, file renaming and the default Effort to off and Auto.
- Older, from the VerseDB merge: such a backup wiped a VerseDB key
  configured since, which the guard's comment said it would not.
- The site defaults had the same guard: a newer setting went back to
  its default.

The store now records the columns it added, and `carried_columns` gives
what the file itself had. The tagging and site defaults take only those;
anything else is left as it is. A binary backup is restored from a copy,
so a restore no longer writes those columns into the backup and the next
restore still reads it truly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B26: a filter's tags ref finds a list only when its uuid did not

The restore ticked every visible list holding a filtered list's tags
source, beside the lists the uuids found, so a filter could gain a list:
another list holding the same arc's tags. The backup now records the
tags ref by each list's uuid. The restore takes a list by its uuid, falls
back to the ref only when the uuid finds nothing, prefers the list made
from those tags alone, and reports a uuid that resolves to no list, as
it does an unmatched tag name.

The column is new on this branch, so no released backup has the old
form. The filter's list resolution moves to `restore_filter_lists.py`,
which keeps `restore.py` at maintainability rank A.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B22: an explicit empty source list is refused, not read as omitted

`data.get("sources") or ...` treated `sources: []` like no list at all and
ran every keyed source. An empty list names no source, so it is a 400
now; only an omitted list means the keyed sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B22: a refused scan or Resume says why

The launcher and the status table caught a refusal with `setErrors`, which
fills the form errors, and none of the launcher, the Tagging tab or the
status table shows those. A scan B22 now refuses ("No Comic Vine
credentials configured.") just stopped spinning with the dialog open, and
a refused Resume or Pause looked like a broken button. Each refusal's
reason goes to the notice snackbar now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B24: a refused Tagging tab save says why

A failed credential save keeps the typed key since B24, but the reason
still went to the form errors, which the Tagging tab does not show. The
store's save now puts it in the notice snackbar, for the key saves and
the tab's auto-saves alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B19: a notice closing keeps its snackbar, so it animates shut

B19 remounted the snackbar on every change of the notice, its clear
included, so a normal close skipped the close animation. Only a new
notice remounts it now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B14: a list change refreshes the browsed page only on the browser

`refreshIfShowingLists` runs after every membership change, wherever the
person is. From the reader, with a Reading Lists filter ticked in the
browser settings, it refreshed a browser page the reader's route has no
collection for: a request to /browse/undefined that failed, and a console
error. It does nothing off the browser route now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B18: a disabled Continue Reading says which of three reasons it is off

The details always said every issue is read. Continue Reading is off
also when the browser's filters hide every unread issue, which B11
made Continue follow, and when no issue of the list is in the library.
For those the text was false, and "mark one unread" enabled nothing.

The details now name the case, `continue_blocked`: all_read, filtered,
or none_in_library, and the dialog shows the matching reason and way
out. The last is said for completeness: the browse metadata of a list
with no comic in the library is a 404, so no dialog opens on one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B25: a re-queued series prompt keeps its candidates and answers by volume

B25 dropped the re-queued prompt's candidates, the first comic's issues,
so no choice could pin one of them on another comic. That left only
Skip, and lost a path that worked: a choice carrying a volume reached
every remaining comic of the series by replaying its search.

The candidates stay, and the prompt is marked re-queued. A choice on it
transfers its volume alone, to every comic the prompt holds, the first
included, each replaying its own search. A choice with no volume speaks
for none of them, so they are asked again. A hand-entered issue id still
applies to the comic shown, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B18: the admin tab's filters are a wrapping row again

The bulk-bar hint rule went in between `.filters,` and `.bulkBar {`, so
the selector became `.filters, .bulkHint` and the filter row lost its
flex, wrap, gap and bottom margin: at 1280px its five controls stacked
one per row. `.filters` shares the bulk bar's rule again, and the hint
has its own. Checked in the browser pane: one 40px row at 1280px, two
to a row with no overflow at 375px, the hint on a line of its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B22: the empty source list refusal says what to do

It read DRF's "This list may not be empty." in the notice; it now reads
"Choose at least one source."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: say what the review corrections made true

A refused scan now says why; a re-asked series prompt answers by volume
rather than dropping its matches; a refused key save says why; and a
restore of an older backup leaves settings it did not carry alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ery, startup tags sync (#1046)

* B16: a list's comics find their first position by the comic's index

B16 ordered a list's comics by a per-comic subquery, `ORDER BY position
LIMIT 1`. SQLite served that order from `readinglistentry_list_pos`
(reading_list_id, position), so for every comic it walked the list's
entries in order until it met that comic. The first position is now an
aggregate, `Min("position")` (`Max` under a reversed order) grouped by
the comic, with no ORDER BY for the planner to chase. SQLite answers it
from `readinglistentry_comic_list` (comic_id, reading_list_id), with or
without statistics.

A 5,000-entry list's own page in Reading Order, on a scratch database
with the same data, medians of five runs, twice each:
- develop 8030e46: 56.7 and 56.8 ms, 20 queries
- PR 1045 as pushed, f1ebca5: 1,079.7 and 1,066.9 ms, 21 queries
- fixed: 59.6 and 59.7 ms, 20 queries

Of the shapes compared, ordering by `+position` also picked the comic
index, after `PRAGMA optimize` and with no statistics. The aggregate
does too without steering the planner by a no-op expression, so it is
the one kept. The old shape used the position index either way.

`SharedComicTests` and `ListCardsTests` pass unchanged: same rows, same
order, a comic on two ticked lists counted once. A new test reads the
plan SQLite picks for a list page's comics query on the test database,
which has no statistics, in both directions. It fails on the shape as
pushed, which used the position index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B11: Continue Reading asks for no filtered comics when no filter is set

B11 made Continue follow the browser's filters. The stored filters carry
every key, mostly empty, so Continue always ran a Comic query binding
every comic of the list, even when nothing narrowed them. It skips that
query when the filters build no condition.

Continue on a 5,000-entry list, medians of five runs, twice each:
- develop: 15.7 and 16.1 ms, 12 queries
- PR 1045 as pushed: 25.0 and 24.2 ms, 15 queries
- fixed: 17.8 and 17.2 ms, 14 queries
The two left over are the settings read B11 needs. A test checks that
empty filters cost no query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B2: the librarian syncs unstamped arc lists when it starts

Migration 0061 writes each tags source with a blank revision, so the
first tags sync rebuilds every arc list, and until it runs a hide or a
reorder made to one is lost. That sync was the nightly one, hours after
the upgrade. The librarian now queues it at startup when any tags source
is still unstamped, which narrows the window to the sync's own run.

The check reads the database, so it runs in the librarian's `_startup`,
in its own process, which starts only after the web process has run the
migrations. `LibrarianDaemon.__init__`, where the search sync is queued,
runs in the web process, which closes its connections before starting
the librarian.

Tests: a blank revision queues the sync, no tags source queues nothing,
and after the sync has stamped the revisions nothing is queued again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…se keeps the lookup under way (#1047)

* B21: a Pause keeps the lookup that was under way

The search pass checked for a Pause before it looked at the result in
hand, and dropped it. comicbox's cancel() only sets an event: a lookup
already under way runs to its end, outside a retry wait, writes its
comic into the result and reports it written. So a Pause during a lookup
left that comic matched in the status table and out of the resume set,
but never written, and Resume skipped it. The pass now handles a
cancelled result first, keeps any completed one, and stops after it.

A cancelled result after a Pause is not halted as comicbox stopping the
run, so it gets no pause reason. The bug is older than v2.8.0; v2.7.1's
loop has the same check.

Test: a fake whose in-flight lookup completes normally after the Pause,
as comicbox's does; its comic is written and the rest stay resumable. It
failed first with nothing written. A runner test's fake now returns the
cancelled flag every real result carries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* B20: Merge all sources fetches a comic's stored ids and searches the rest

The stored-id prepass took a comic out of the run when any selected
source had its id, so under Merge all sources a source the comic had no
id for was never asked: adding a VerseDB key and re-tagging fetched
Metron by id and never asked VerseDB. AJ ruled for fetching the ids a
comic has and searching the sources it has none for.

- Ids for every selected source: fetched by id alone, as before.
- Ids for none: the normal search pass, as before.
- Ids for some: looked up in an OnlineSession of its own, pinning that
  comic's stored ids and searching the other sources, merged in the run's
  order. It is the Tag by ID & Search lookup, one comic per session, so a
  comic's ids reach no other comic and a task merged mid-scan joins only
  the run's own session, which pins nothing (A8).
- First match: unchanged.

Why one-comic sessions, not leaving the comic in the run: a plain
session refreshes a source by id only when the comic's file holds that id
in a tag format comicbox reads ids from, MetronInfo, CoMet or
comicbox.json. ComicInfo holds ids as links and notes, which comicbox
turns into ids only in its merged record, and that record is what codex
stores. So for every comic whose ids are only in ComicInfo, which is what
other taggers write, the database holds ids a plain session never sees,
and it would search those sources again: 5 to 8 Comic Vine calls instead
of 1, and a chance of a different issue. A test pins that behaviour, so
its failure will say when comicbox reads them and this can shrink.

The pass runner takes these lookups' results first, so status, progress,
queue drains and quota halts work as in the search pass, and each comic
is counted once. Each session starts from the run's series cache and
gives back what it resolved, so a series is searched once a run.
Mid-scan picks of a volume are preloaded into later sessions. Prompts
from every session are persisted with the run's source order, Merge all
sources and the pinned sources' issue ids, so an answer merges under a
higher-priority source instead of overwriting it. A Pause cancels the
session in flight, its rate-limit waits included; the lookup under way
is still written (B21) and unreached comics stay for Resume.

comicbox fails a source, not the comic, so a search that raises keeps the
by-id half. A pinned id that fails to fetch, for whatever reason, holds
its comic: nothing is written, so a lower-priority source cannot
overwrite what the failed one supplied, and the comic stays queued for
Resume, both halves; the log names the source. A raise while building a
session, or anywhere in the pass, no longer loses the comics already
matched: the runner flushes its batch in its finally.

API calls per source to re-tag an already-tagged comic under Merge all
sources:
- a source with a stored id: unchanged, Metron 1, Comic Vine 1, VerseDB 1,
  plus one series or volume detail per series;
- a source without one: 0 before, since it was never asked. After: for
  the first comic of its series in the run, Metron 2, Comic Vine 5 to 8
  by effort (balanced 7), VerseDB 3; for later issues of that series, 2
  on every source. A one-comic lookup gets no whole-series prefetch.
- A comic with ids for every source, or none: unchanged.

Tests: the strict-xfail test passes as a plain test. New: all ids, no
search; some ids, a search on exactly the others in the run's order; no
ids, the search pass; First match unchanged; isolation, series reuse,
mid-scan answers, a Pause mid-lookup, a failing session build, counts,
and the prompt's provenance through its answer. With comicbox's real
merge and fake sources: Metron, pinned and first, wins; a failing search
keeps the by-id half; a failed stored id holds its comic for Resume; and
a plain session fetches a MetronInfo id by id but searches again for one
only ComicInfo holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…it (#1048)

A Merge all sources lookup holds a comic back when a source cannot fetch
its stored issue id. It recorded that only in the log: the outcome was
forgotten, so the status table showed the comic as never looked up, and
when the id is gone upstream every Resume held it again with nothing on
screen saying why.

It is not recorded as errored: `_is_pending` treats an errored comic as
done, so Resume would skip it. The outcome stats keep held comics apart,
with the sources that failed. The snapshot shows the row as Error with
Error in each failed source's column, and carries `held`, the count and
the failed sources. The status table words it with its own source
labels, as its columns name them: "1 comic not written: its stored issue
id could not be fetched from Metron Cloud. Resume tries it again; if the
id is gone, tag it by ID." The comic stays pending and in the resume
set, and `resumable` counts it. Counted once: the batch tallies it as an
error row, the summary log as held, never as written. Nothing else reads
these stats; the telemeter does not.

Checked in the browser on a scratch stack with a seeded snapshot, at
desktop width and at 375px: the line sits under the Paused row and wraps
inside the column with no overflow, the tally shows 1 error, and the
held comic reads Error under Metron Cloud and a dash under Comic Vine.

Tests: the held comic's snapshot row reads Error for Metron alone, `held`
names Metron, it is in the resume set, the snapshot is resumable, and
nothing is queued for writing. The status table says it for one comic,
for several comics and sources, and says nothing when none is held.
The snapshot test and the one-comic table test failed first.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ciency (#1049)

* C1: the import's reading-list passes read once, rematch once a burst, and stay quiet

Measured on a scratch database: 6,000 comics, 2,000 arc lists, 300
curated lists, 60 lists each holding two series, and 4,000 missing
entries, 2,000 of them of series the library has. Timings are medians of
five runs with cachalot off and the cache emptied, before and after back
to back.

- Live sync: the lists load in one query, and their items in one query
  for all. The staleness check hands the rows and comics it read to the
  sync, which read them again; a list target is re-read, since any
  request may change its entries.
  - 60 stale lists: 962 queries, 418 ms before; 724 queries, 371 ms after.
  - 60 unchanged: 362 queries, 105 ms before; 244 queries, 85 ms after.
- Rematch: imports outrank rematches, so a burst of imports queued a full
  rematch each, run back to back, at 15 queries and 389 ms apiece here.
  A full rematch that began after another was queued now covers it: a
  burst of N imports runs one. Narrowing a rematch to the comics an
  import touched is not done: entries also match by issue id and series
  mappings, and one full pass of 4,000 missing entries costs 0.4 s.
- A rematch that matched nothing, or a live sync that changed nothing,
  no longer tells every browser to reload its lists.
- An import with no lists and no arc tags: 7 queries, unchanged.

Tests lock in the counts on a small fixture (6 unchanged, 30 stale, 7
for the empty post-phase), that a stale sync leaves the same rows, and
the coalescing and the quiet notices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C2: one tick in a Reading Lists menu syncs the list once

The items PATCH synced the list and the lists holding it after each part
of the change: inside `add_comics`, inside `remove_comics`, and again at
the end. `add_comics` and `remove_comics` take `settle=False` now, and
the PATCH syncs once, at the end, inside its own transaction.

Measured with the test client on a list holding a volume, held by
another list: adding a comic 78 queries before, 54 after; removing one
66 before, 42 after; both in one PATCH 77 before, 53 after. A test locks
in 54 and 42, and checks a sync from scratch then finds nothing to do in
the list or its holder. The new-entry builder moves out of `add_comics`
to keep it under rank C.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C3: the add-to-list menus list one's own lists first

The menu GET ordered by owner, and SQLite sorts a NULL owner first, so a
staff member's own lists came after every curated global list, against
the docstring and the store. Own lists sort first now. A test covers the
order.

Its cost is left as it is, measured on a scratch database with 300
curated global lists of 50 issues: 12 queries whatever the number of
lists, 69 ms for staff, 17 ms for a reader with five lists. C1 already
removed the no-op notices that made every browser refetch it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C6: a tag filter no longer makes a page of comics DISTINCT

`comic_filter_uses_m2m` was true for any tag filter, so the comics query
went DISTINCT over every Comic column. A tag filter has tested
membership with an IN subquery, never an inline join, since the filter
rework: under Any one subquery, under All one per value, and None in a
subquery too. A comic row cannot repeat. The flag now stays true only
for the paths that still join: a list's own page, and the folder group
on the cover, choices, bookmark and download targets.

Measured on a scratch database (6,000 comics in one folder, three of 300
characters each), medians of five runs back to back: the folder's page
with 50 characters ticked 43.2 ms before, 32.2 ms after; a 50-issue
series with one character 7.7 ms and 7.4 ms, within noise. Same 18 and
15 queries.

Before removing it, a test runs each filter both ways, DISTINCT forced
as before and not, on comics holding several of the ticked tags: any of
two characters, all of two, no character, and two genres with a tag.
The books, their order and the count are the same, and the queries show
the forced run is DISTINCT and the other is not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C6: the DISTINCT test reads its queries before the next request clears them

`captured_queries` reads the connection's log when accessed, and the
next request's start clears that log, so the check that the new run was
not DISTINCT read the wrong run's queries. The test now copies each
run's SQL as its block ends, with cachalot off so every query runs, and
asserts the new run captured queries at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C4: list rows group by their key, and the grouped page loses DISTINCT

ReadingList had no entry in `_COLLECTION_BY`, so a list's rows grouped
by every ReadingList column, description, notes and extra included,
and the query also selected them DISTINCT. They group by `id` now: two
curated orders of one event share a name and stay two cards. Once the
card aggregates group the page query, each list is one row, so its
DISTINCT goes. The page count keeps DISTINCT: it aggregates nothing,
so there the entry joins repeat a list's row.

Measured on a scratch database with 2,306 lists, the lists grid as
staff, medians of five runs, before and after alternated twice:
115.8 and 116.3 ms before, 81.0 and 81.7 ms after; 18 queries both.
Grouping by id alone, keeping DISTINCT, gave 101 ms.

A test runs the grid both ways, the old shape forced and the new, by
name, in Reading Order and by child count. It uses two lists of one
name, a comic on two lists and twice on one, a hidden entry, and
another user's personal list. The cards, their order and the count are
the same, and the new page query groups by the key and is not DISTINCT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C5: the filter menu's list probes ask per comic, and only with lists

The Reading Lists and Reading List Kind availability probes, five per
menu, each tested `pk IN listed_comics(user)`, which gathers every comic
of every visible list before the probe can stop. They test a correlated
EXISTS per comic now, which stops at the first row. A viewer who sees no
list gets neither probe: one `exists()` answers both.

Measured on a scratch database (6,000 comics, 2,306 lists visible to
staff), the publishers filter menu as staff, medians of five runs, before
and after back to back:
- with lists: 76 ms before, 47.5 ms after; under a search 332 ms, 301.8 ms
- with no list at all: 36.1 ms before, 30.5 ms after; under a search
  333.1 ms, 269.1 ms
13 queries before, 14 after: the one that checks for a visible list.
Without the skip the per-comic form was slower with no lists (45 ms), so
both parts are needed. Under a search the rest of the 300 ms is the
other filter fields' probes, each repeating the FTS match (49 in all);
that is not changed here.

A test compares the whole availability answer with the old probes,
signed in and not, on three collections, under a search and with no
list: a tags list, a curated list, the viewer's list, another user's
list, a hidden entry, and a comic on two lists. Another checks that a
list added after a request changes the same request's answer, so
cachalot tracks the new subqueries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C7: Edit Issues loads what its rows show and builds a page of rows at a time

Server: the entries GET loaded every column of each entry, its comic,
series and volume, the entry's reference JSON included, which no row
shows. It loads only what `entry_repr` reads now. On a 5,000-entry list
(medians of five runs, alternated twice): 302 and 302 ms before, 187 and
187 ms after; same 13 queries and the same 1,429,791-byte body.

Dialog, measured in the browser pane on a 3,000-issue list:
- Each row worked out its step down by finding itself in the whole list,
  so a render was quadratic. Every row's is worked out in one pass now.
- Hiding or showing an entry refetched the whole list. The PATCH answers
  with the entry and hiding changes no other row, so only that row is
  replaced.
- Building every row's controls at once was the real cost: opening took
  8.9 to 10.9 s with the first two changes alone, 9.5 s before them. The
  rows now render 200 at a time, and 200 more each time the last row
  scrolls into view.

Opening is now 0.6 to 1.3 s (was 9.5 s). Hiding is 0.8 s (was 6.1 s),
showing 1.0 s (was 5.9 s). Checked at 1280px and 375px: the first page,
then 400, 600 and 800 rows as the end came into view, with no
horizontal overflow at 375px.

Tests: the GET's query count (a deferred field read per row would raise
it) and its rows against fully loaded entries; the one-pass step down
against the old rule on a 60-row list with collection blocks, by hand
and with sources; a hide that fetches nothing; the paging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C8: reading-list reads bind their comics in batches

Five reads bound one SQL variable per comic or path: a list's details
bookmarks, a list's download order, the matcher's pending check, Write
to Files, and the shelves migration. Debian's SQLite allows 250,000; a
stock build allows 32,766, and past it the query fails with "too many
SQL variables", which in the migration aborts the upgrade. Each now
binds at most `PK_BATCH` (10,000, the batch `references.py` already
used, now public) per query.

Measured by lowering the test connection's limit to one batch plus 100
and handing each read twice that: all five failed with "too many SQL
variables" before, and give the same rows after.
- The download order sorts the batches' rows by position and pk, as the
  one query ordered them.
- The migration helper stays self-contained: `itertools.batched` and a
  local `_in_batches`, no application import. The frozen-migration test
  passes and `makemigrations --check` reports no changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C9: a list's export reads its entries once

`export_document` built the header with `document_of`, which also loads
every shown entry's reference, then replaced those entries with its own.
The header comes from `document_header` now, and `document_of` uses it,
reading its references as values rather than whole entries.

On a 5,000-entry list exported as json-cbl, medians of five runs
alternated twice: 911 and 952 ms before, 853 and 861 ms after; 15
queries before, 14 after. The export tests show the same documents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C9: the nightly backup reads an entry's comic path, not its whole comic

The reading-list dump joined each entry's whole Comic row to write its
path. It loads the entry fields the row writes and the comic's path.
On a scratch database with 22,200 backed-up entries, the reading-list
dump took 987 ms before and 680 ms after (medians, alternated), with
the same rows. A test checks that the dump's query count does not grow
with its entries, which a deferred field read per entry would break.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C9: the admin lists table reloads on a notice only while it is on screen

Every reading-lists notice reloaded the admin table for any admin who
had opened the Reading Lists tab once, wherever they were since. With
2,306 lists that GET takes 172.7 ms and 6 queries on a scratch database.
It reloads only on that tab now; the tab loads its table afresh when it
opens, so nothing goes stale. The table is a `v-data-table-virtual`
already, so the review's other doubt does not apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C8: Continue's filter read binds its comics in batches too

B11, on develop since C8 was written, added a read to Continue Reading
that binds every comic of the list in one IN when a browser filter is
set. On a list past the SQLite variable limit that failed with "too many
SQL variables", the failure C8 removed from the other reads. It reads
`PK_BATCH` comics at a time now; the filters test each comic on its own,
so batching changes nothing else.

Test: Continue's filter read under a lowered variable limit, with a genre
filter set. It failed first with "too many SQL variables".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C7: Edit Issues keeps paging after a filter or a hide

The "more" row was observed only from the `shown` and `allEntries`
watchers. A filter round trip re-creates the row through its `v-if`, and
setting `shown` back to a page it already held changed nothing, so the
new row was never observed: "Showing 200 of 3000", and no more ever
loaded. Hiding an entry splices `allEntries` in place, which the
non-deep watcher did not see, so a row that hiding brought onto a
filtered page was not observed either. The row now has a function ref,
which observes whatever row is there whenever Vue creates it; `shown`
still re-observes it so the observer reports whether it is in view.

The page size is a prop, 200 by default, so the tests page through five
rows. The paging test mounted 500 rows through real Vuetify and timed
out under load; each test now takes well under a second.

A drag reaches only the rendered rows. Dragging toward the end brings
the more row into view, which loads the next page as scrolling does,
and a far position is quickest typed in the row's position field, which
reaches any position. That is left as it is.

Tests, with a recording IntersectionObserver: paging goes on after a
filter round trip; a row hidden onto a filtered page brings its more row
and it pages. Both failed on the old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C6: a search token on a many-to-many tag tests membership, not a join

A field token with a glob, quotes or an operator is a database lookup,
not a full-text match. On a many-to-many tag it was a plain lookup such
as `characters__name__icontains`, an inline join, so a comic holding two
matching tags came back twice: a series page searched for
`characters:*bat*` showed a comic with Batman and Batgirl as two cards,
counted two, and shifted the pages after it. Before C6 any tag filter
made the page DISTINCT, which hid it then; without a tag filter it
showed already. Credits, tags, teams and the other many-to-many fields
did the same.

Such a token is a membership test now, `pk IN (comics matching it)`, as
the tag filters are: one row per comic, so C6 keeps its DISTINCT-free
page. Each operand is its own test, so `characters:(*batman* and
*batgirl*)`, or the two as separate tokens, finds a comic holding both,
where before one joined tag had to match both names and nothing came
back. A negated token was already a NOT EXISTS subquery and is
unchanged. Cachalot tracks the subquery's tables through the codex
shim: a tag added between two identical requests shows in the second.

Tests: one card and a count of one per comic, with and without a tag
filter, for characters, credits, tags and teams; negated tokens; AND and
OR; a group page; the cache. All but the negated and group cases failed
first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C2: a menu tick commits before it syncs, and queues after it commits

C2 moved the PATCH's one sync inside its transaction. That held the
list's write lock through the list's sync and every holder's, and a
holder's failure rolled the user's tick back. The change commits first
now and the sync runs after it: syncing is idempotent, and it stays once
per PATCH.

A list held by five lists, each also holding a publisher of 2,000
comics, one hand-added comic added or removed per tick, medians of ten
ticks, before and after alternated: the write lock was held 85.7 and
95.1 ms (max 118 ms), and is held 5.0 and 5.0 ms (max 6.1 ms). The
whole request takes 113 ms instead of 91 to 101 ms, since each list's
sync now commits on its own. The query counts C2 locked in are the same.

When an item is too large to sync inline, the librarian job was queued
inside the transaction, so an idle scribe could read the list before
the item existed and sync nothing. It is queued on commit now. And the
rest of the change waited for that job: a comic added by hand in the
same tick, which an item already delivered, showed twice until the job
ran, and the count said so. The list syncs inline now with the large new
items left out (`reconcile_list(skip=...)`, which keeps their blank
revision for the job); the job syncs them and the holders.

Tests: a holder's failure keeps the tick; the large item's sync is
queued only once the change commits; a hand-added comic shows once
while a large item waits; two collections in one tick. The first three
failed on the old code. The large-collection API test now runs the
commit hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C1: a full rematch covers others by queue sequence, once it finishes

C1 let a full rematch stand in for the full rematches queued before it
began, so a burst of imports runs one. It stamped when it began before
it ran, so a rematch that raised part-way still covered the ones queued
before it, and they were skipped. It also compared wall-clock times,
which move when the clock does.

The scribe queue already gives every task a sequence number to break
priority ties. A rematch is stamped with it as it is queued (`seq`), and
a full rematch takes a fresh number as it begins and records it only
once it finishes; a full rematch numbered below the last one recorded is
covered. One queued while another runs is numbered above it, so it
runs. The nightly janitor calls the worker directly, unstamped, so it is
never covered, and it covers the ones queued before it began.

The live sync's read cache (`_Read`), for the record: it keeps each
distinct collection's comic pks for the whole run, 36.5 bytes a pk (an
8-byte list slot and a 28-byte int). A forced run over 100 lists of
distinct collections on the scratch database, three publishers of 2,000
and 97 series of 50, cached 10,850 pks (396 KB), with a 4.3 MB traced
peak for the whole run. Publishers, imprints, series and volumes each
partition the library and folders nest, so on a 100,000-comic library
lists of distinct collections of one kind hold at most 100,000 pks,
about 3.7 MB, and lists over all four kinds and folders five deep about
33 MB, for the run's length. Left unbounded.

Tests: the queue stamps rematches in order; a burst runs one; one queued
while another runs still runs; an aborted rematch covers nothing (it
failed with the stamp taken before the run); the nightly rematch always
runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C5: the list probes seek a comic's entries, and skip kinds with no list

The review asked whether C5's correlated EXISTS holds up when lists are
sparse in a large library. Timed on two scratch databases, the publishers
filter menu as a reader and as staff, with no search and with a search
for "story", which matches every comic; medians of five, two rounds:

- dense, 6,000 comics, 2,367 lists, the reader with five lists of their
  own and every tags list visible;
- sparse, 60,000 comics, one 10-comic list of the reader's, no other.

C5 as committed made the dense reader's menu 99 -> 769 ms and, with the
search, 410 -> 1,082 ms; staff, whom C5 was measured as, went 76 -> 47
ms. The plan showed why: with `reading_list_id IN (visible lists)` on
the comic-and-list index, SQLite seeked once per visible list for every
comic, about 2,000 seeks a comic for a reader. The sparse reader went
240 -> 305 ms: probes for kinds the reader has no list of scanned all
60,000 comics, where the old IN found an empty set at once.

The list is tested as `reading_list_id + 0` now, so SQLite seeks a
comic's few entries and checks each against the visible lists. And a
kind the viewer has no list of is not probed: one `exists()` per kind on
the lists table, which can only drop a kind that would not be offered.

Old shape (before C5) -> now, round one and two:
- dense reader 98.6/100.7 -> 71.2/71.0 ms; with search 414/427 -> 383/388
- dense staff 75.0/80.8 -> 44.3/44.5 ms; with search 373/387 -> 329/331
- sparse reader 245.7/280.1 -> 259.0/288.6 ms (+4%, within the rounds'
  spread); with search 3,837/3,805 -> 3,547/3,522
- sparse staff 242/276 -> 239/269 ms; with search 4,015/3,975 ->
  3,376/3,347
The menu runs up to three more small queries, one per kind.

Tests: the equivalence test still compares every answer with the old
probes. New: a kind probe's answer changes with its entries in the same
cached request, through the probe annotation itself (the old cache test
flipped through `reading_lists_of`); a reader with only lists of their
own probes only Mine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* C4: the list rows equivalence test covers search, table view, missing comics and visitors

The review found C4's equivalence test ran the lists grid both ways only
signed in, unsearched, in cover view and with every comic present. It
now also runs, old shape forced and new: under a full-text search, in
table view (whose rows it compares whole), with a comic gone from disk,
and for a viewer who is not signed in. Each gives the same rows, order
and count both ways, and the new page query groups by the list's key
without DISTINCT.

A field token search cannot be one of them: on the lists grid it raises
a FieldError, an older bug, reported separately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…try, dead code and wording (#1050)

* D: migrated shelves keep their times, and their comics' ids

Two review leftovers in the unreleased 0061 shelves step, both small and
inside the migration helper.

A shelf became a list made and last changed at the upgrade. The list
now takes the shelf's `created_at` and `updated_at`, set by an update
after the list is built so neither stamp is taken again.

A comic on a shelf became a hand-added entry whose reference held its
series, volume, issue and date but none of its ids, where a comic added
by hand now gets its issue ids and its series' id too. Such an entry,
its comic removed and imported again, rematched by name alone. The
helper's frozen reference builder now adds both, as
`references.comic_references` does; the issue type is the string
"comic", since a migration imports no application code.

Tests: a shelf with past times keeps them; a shelved comic with issue
ids on two sources, in a series with its own id, gets exactly the
reference the live builder makes. Both failed first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* D: list fetches and the Add Lists dialog read the source registry

`reading_list_credentials()` built comicbox's credentials by hand, for
Metron and Comic Vine. It is `sources.build_credentials` now, as tagging
uses. The result is the same for every caller:
- no defaults row: None, before and after;
- no key set: an object with empty keys before, None now. comicbox reads
  both alike, falling back to its config for a key the caller leaves
  unset (`_credentials` in its Metron and Comic Vine list sources), and
  the nightly refresh drops Metron kinds for either;
- keys set: the same Metron and Comic Vine key and url; the registry
  also passes VerseDB's key, which no list source reads.

The Add Lists dialog read `has_metron_credentials` and
`has_comicvine_credentials`, which `configured_sources` replaced. It
reads `configuredSources` now: the same key check, from the registry.
That left the tagging serializer's six per-source booleans with no
reader in the app (the Stats tab's `has_*_credentials` are the stats
serializer's own). All six are gone; the stats fields stay. Four
settings tests read them as their check that a key saves or clears;
they check `configuredSources` now, and a tab test's fixture mocks it.

Tests: what a list fetch is handed with no row, no key and every key,
and that comicbox resolves None and empty keys to the same auth for both
list sources. The no-key case failed first (an object, not None).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* D: remove reading-list code nothing calls

Each searched for in the backend, the frontend, the tests, the docs and
the vulture allowlist first.

- `entries.next_position`: exported, never called.
- `entries` re-exported `can_edit`: everything imports it from `access`.
- The entries GET answered `"editable": True` always; no client read it.
  The `editable` the UI reads comes from the lists and details answers.
- `documents.arc_pointer`: exported, never called.
- The API wrappers `getAdminList`, `deleteAdminList`, `abortFetch` and
  `addEntries`: never imported. The endpoints stay.
- The browser page's `missing_count`: no client read it, only two
  assertions in tests of other things. One goes; the dangling-entry test
  asserts the page has no placeholder entries instead. It was new in
  2.8.0, so no released client lost it. `page_missing_entries` now
  returns the page's entries alone.
- The metadata store's `TAG_NAMES`, an empty table consulted on every
  label: the label is the capital-cased key, as it always was.
- `page_bounds` special-cased a list with no comic. Django's paginator
  already allows an empty first page and refuses the rest, so the case
  gave what the paginator gives; a new test pins both, before and after.

Left, with behaviour tests: `?filter=` on the entries GET and `POST
<pk>/entries`, which the web UI no longer calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* D: reading lists wording, "Imported", and the sidecar version as a record

Four comments and docstrings still named shelves where they mean reading
lists. The reading-list import status derived its past tense as "Importd";
it names it now, and a test walks every librarian status so a derived past
tense is only ever a verb ending in "e" plus "d". The sidecar's
schema_version row stays as a record of the layouts a file was written
with; a comment says nothing reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Merge the piecemeal items by feature, drop fixes to code that never
shipped and two v2.7.1 bugs no ordinary user could reach, and name the
reading-lists API that replaces shelves. The section is now about 1,575
characters, under Discord's 2,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1051)

* D: the entries GET takes no filter

AJ's ruling on the review's recommendation: remove it before release. The
`?filter=review|missing|hidden|all` parameter was new in 2.8.0. Its only
caller, Edit Issues, always sent "all" (no narrowing) and filters on the
client. The GET now returns every entry the editor may see, hidden ones
included, which is what "all" and no parameter both gave. The body is
unchanged.

Removed: `_FILTERS`, the parameter, and the `filter` argument of the
frontend's `getEntries`; the dialog calls it with the list alone. Two API
tests that used `filter=missing` pick the missing issues from the entries
as the dialog's Missing filter does. The dangling-row test drops its
filtered call, since its check that every entry has a comic already covers
it.

Test: a GET with a stray `filter` (review, missing, hidden, all, bogus)
returns the same body as one without, hidden entry included. It failed on
the old view for review, missing and hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* D: comics are no longer POSTed to a list's entries

AJ's ruling on the review's recommendation: remove it before release.
`POST <pk>/entries` was new in 2.8.0 and nothing called it. The web UI adds
comics through `PATCH items`, and an ordinary API key cannot reach
`/api/v4`. The route stays because the entries GET serves it. A POST there
now answers 405.

Removed: the view's `post` method. It had no serializer. `add_comics`
stays: the list create and `PATCH items` call it. Neither passes its
`position` argument, and no other caller does now, so only a test uses it;
the argument is left as it is.

Tests:
- The add tests go through `PATCH items` instead: a comic already held is
  not added twice, and a series comic added by hand leaves the block.
- The one-step reorder test adds its comic the same way.
- The insert-inside-a-block test calls `add_comics` with its position
  directly.
- The personal-list helper creates the list holding both comics in order.
- New: a POST to the entries route answers 405 and adds nothing. It got
  200 from the old view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A codex Series is a name, a comicbox series is one volume run, and the
importer folded every volume's start year into one Series.start_year,
which comic_references stamped on every comic. comicbox treats a start
year as the volume's identity, so Batman (2011) #1 read as a 1940-volume
comic and every later volume went missing.

- Volume.start_year, fed by the importer from each comic's
  series.start_year (earliest in a batch, last non-null across batches,
  as for the series). comic_references uses it, and gives series ids only
  for a series with one volume.
- Migration 0062: backfill a series' only volume; rewrite codex-built
  references by the three rules (a year-like volume that contradicts the
  start year; a linked hand or tagged entry takes its volume's year; an
  unlinked one loses a same-named multi-volume series' year), dropping
  folded series ids; clear non-manual name, mapping and series-id matches
  in multi-volume series; mark a one-time re-read pending.
- The librarian, at its first start after 0062, force-reads the lowest
  live comic of each yearless volume of a multi-volume series and queues
  a full rematch. An import that changes a volume's start year now queues
  a rematch too, since such a re-read changes no comic row.
- Restore unfolds references from a dump made before 0062.
- Matcher: review flag when the best comics' volumes conflict (comicbox's
  any_conflict); the mapping and series-id tiers look per volume, keep the
  volumes that agree with the entry, then those of its cover year (exact,
  then within one), and flag review when conflicting volumes remain.
  series_key uses comicbox's discriminators.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#1055)

Uses comicbox's MatchResult.refused and per-kind name keys (comicbox PR
285, unreleased; the pin ~=5.7.1 does not resolve from PyPI yet).

- An entry the matcher leaves missing keeps its likeliest refused comic
  as ReadingListEntry.suggested_comic (migration 0063) and is flagged for
  review: another volume's issue of its cover year first, then a cover
  year more than one off; live before pending delete, then lowest pk.
  Combine, the hand-entry heal and rematch store it; a found comic or a
  person's pick clears it.
- Edit Issues shows "Missing · maybe <comic>" with Use. The suggestion is
  shown only when the viewer may see that comic: a missing entry is seen
  by everyone who sees the list. Accept All Best Guesses takes matched
  guesses only and says why it is off when only suggestions are left.
- The overlay assigns a hand edit by a shared key only when the volumes
  do not conflict: the new volume key is shared by X-Men (1963) v1 #1 and
  X-Men (1991) v1 #1, as comicbox's entry_keys now documents.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…1056)

django-allauth 65.23.0's complete_login calls
sociallogin.provider._on_login_processed() after every login, the hook
its openid_connect provider uses to track sessions for the new
back-channel logout. allauth's callback builds the SocialLogin with
provider=..., but the test fixture left it out, so all ten login-flow
tests died on None._on_login_processed. Codex's own code never builds a
SocialLogin, so only the fixture changes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Fold migration 0063 into 0062 as 0062_volume_start_year_and_suggested_comic

Neither has shipped (v2.8.0 ends at 0061), so v2.8.1 adds one migration.
A rename-fold without `replaces`, as the repo does (#909).

Verified with empty scratch databases: migrating through the old chain and
the fold gives identical sqlite_master and codex_timestamp rows; rolling
the fold back to 0061 matches a database built only to 0061; migrating
forward again matches. A dev database that applied the old 0062 and 0063
fails with "duplicate column name: start_year" until
`migrate codex 0062_volume_start_year_and_suggested_comic --fake`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* NEWS: v2.8.1 requires comicbox 5.7.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@ajslater ajslater closed this Nov 25, 2026
…docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ajslater ajslater reopened this Nov 25, 2026
@ajslater
ajslater merged commit d968303 into main Nov 25, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reading list import misses later volumes of a same-named series when the series has a start year

2 participants