feat(series): flat sequence + cosmetic dividers + pending staging (#789) #97
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reframes series authoring (#789), in two phases.
Phase 1 — flat series + dividers
A series is now ONE continuous, series-globally-numbered page run; "chapters" become cosmetic dividers anchored to the page that begins them (they own no pages — a page's chapter is derived from the nearest preceding divider). This is what lets installments assembled from multiple sources sit in one coherent sequence.
page_number(preserving today's reading order); convert each existing chapter to a divider at its first page (keeping title/stated_part); dropseries_page.chapter_id; reshapeseries_chapter(anchor FK). Loss-safe for content.Phase 2 — pending staging for add-from-post
series_page.status('placed' | 'pending') + nullablepage_number.place_pending, splice-before or append).Deploy
0047 + 0048 run on web boot. The series tables are tiny (unlike image_record), so no quiescing needed — just roll
:latest.Dev CI green (run 927: lint, backend, integration incl. both migrations, frontend-build).
🤖 Generated with Claude Code
Add-from-post no longer appends straight into the run — it STAGES the post's pages as pending (per-page status; page_number NULL), grouped by source post, so the operator drops junk (text-free alts, bumpers) and places the keepers into the sequence with clean series-global numbering. - migration 0048: series_page.status ('placed' default | 'pending') + nullable page_number. - series_service: placed/pending split everywhere (list_pages returns the placed run + a `pending` section grouped by source post; reorder/cover/ list_series operate on placed only); add_post stages pending; new place_pending(image_ids, before_image_id=None) flips pending→placed spliced before a page (or appended) and renumbers; junk removal reuses remove_images. - api/tags: /add-post now returns staged count; new POST /series/<id>/pending/ place. - frontend: PostSeriesMenu navigates to the series after staging; seriesManage store surfaces `pending` + placePending; SeriesManageView gains a pending tray (per-post groups, place-all / place-one / drop-junk). - tests: pending staging, place (append + insert-before), ignore-already- placed, drop-junk, route guard; updated add_post + match-accept expectations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>