Skip to content

Tag editor edits series end year, status and summary (database only) - #986

Merged
ajslater merged 1 commit into
developfrom
claude/series-db-attrs
Oct 20, 2026
Merged

ajslater merged 1 commit into
developfrom
claude/series-db-attrs

Conversation

@ajslater

Copy link
Copy Markdown
Owner

Summary

  • Editing in the tag editor. End Year, Status and Series Summary inputs sit under the series row. They save straight to the Codex database, and a hint under them says so: they are not written to the comic files.
  • Why the database. No format codex writes can hold these three fields: MetronInfo has only StartYear and ComicInfo has none of them. Only comicbox.json/yaml carries them, and that won't be embedded in comics. Start Year keeps writing to MetronInfo as before. Re-imports leave the database values standing, because the importer ignores a series attribute a file doesn't carry. A new importer test pins that down.
  • New endpoint. POST /api/v4/admin/series-attrs is admin-only and takes collection + pks like tag-write.
    • It updates only the attributes sent; null or "" clears one. It bumps updated_at.
    • It refuses a selection spanning more than one series, an unknown status, or an end year outside 1000–9999.
  • Locking. The inputs lock, with the reason shown, unless exactly one series is being edited and its name is unchanged. A rename would leave the values on the row the comics are moving off.
  • Save flow. A save with only these fields skips the preflight and the tag write. On the browser route the page reloads, so the title's series years refresh at once.
  • Status choices derive from SeriesStatusChoices into series-statuses.json.
  • NEWS gets the editor line, plus the line PR 983 lacked for the online tag match picker.

Follow-ups (not here)

  • Online tagging could store Metron's end year, status and summary in the database the same way; today they are lost on the file round trip.
  • Clearing Start Year still never reaches the database, because the importer ignores missing values. This predates the change.
  • These fields could also go to MetronInfo once the schema PR on AJ's fork lands upstream and comicbox maps the elements.

Test results

  • make fix, make lint, make ty: clean.
  • vitest: 1033 passed (99 files). New edit-panel-series-attrs.test.js: seeding, no format gate, lock reasons, warning, changed-only and clear payloads, a database-only save skipping preflight and tag write, both requests, browser reload.
  • pytest: 1706 passed, 1 xfailed. New tests/test_admin_series_attrs.py (set, series collection, partial, clear, two series, nothing sent, bad status, bad year, non-admin), a re-import test, and status-choice derivation tests.
  • Browser, on an isolated stack at 1024px and 375px:
    • Set End Year 1998 → only /admin/series-attrs was posted, the row updated, the CBZ was untouched, and the title read 1963–1998 at once.
    • Reopened → the edit persisted.
    • Cleared → the title read 1963–.

Screenshots

Local files, to drag in here:

  • /Users/aj/Code/codex/.claude/worktrees/series-display-1358af/tasks/screenshots/6-editor-series-attrs.jpg: the editor with the new inputs and warning
  • /Users/aj/Code/codex/.claude/worktrees/series-display-1358af/tasks/screenshots/7-editor-series-attrs-mobile.jpg: the same at 375px

🤖 Generated with Claude Code

No format codex writes can hold a series' end year, status or summary:
MetronInfo has only StartYear and ComicInfo none of them, and only
comicbox's own comicbox.json/yaml carries them, which codex won't embed
in comics. So the tag editor saves these three straight to the Series
row through a new admin endpoint, POST /admin/series-attrs, and says so
under the inputs: they are saved in Codex only, not written to the comic
files. Re-imports leave them standing, since the importer ignores a
series attribute a file doesn't carry.

The inputs seed from the series and no write format gates them. They
lock, with the reason shown, unless exactly one series is being edited
and its name is unchanged, because the values land on one Series row and
a rename would leave them on the row the comics are moving off. Only
changed attributes are sent; a clear sends null or "". A save with
nothing else skips the preflight and the tag write, and on the browser
route the page reloads so the title's series years refresh. The status
choices derive from SeriesStatusChoices into series-statuses.json.

NEWS also gains the line PR 983 lacked for the online tag match picker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ajslater
ajslater merged commit f3d0f98 into develop Oct 20, 2026
9 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.

1 participant