Spec #135: owner data-correction actions — Latest Chapter, series_url, Cover, orphan removal #156
Reference in New Issue
Block a user
Delete Branch "spec-135"
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?
Implements spec #135 (spec 2 of 4, derived from wayfinder map #114; decisions settled in #120/#121/#125/#131). Blocked-by #134 is merged, so this lands on
main.Four owner actions the dashboard can now perform, one ticket each:
#150), a Forced Poll replaces the Cover while an ordinary pass still only fills a blank one (#153), and byte reclamation is one guarded helper, file first / covers row last (#154).Plus #152 — Latest Chapter provenance: one derived line naming the actor class, so an owner can tell a hand-edited number from a machine read.
0015_latest_correction.sqladds the correction/provenance columns;0009now derives cover addresses from bytes.0014-cover-addresses-from-bytes.mdrecords the address scheme.Backend tests cover the store, poller, admin handlers, and web routes (
go test ./..., needs Docker).(*Store).RemoveSeries deletes one series row by (site, series_id) via a plain parameterized DELETE; a bookmarks_series_fk violation outside 23503 is translated into the ErrSeriesHasBookmarks sentinel so no driver type escapes the store. The caller reads the row's cover address before the delete and reclaims it after: ReclaimCover's guard cannot pass while a series row still points at the address. POST /admin/series/{key}/remove answers the list row with the removed row's fragment plus the heading re-rendered out of band at the fresh count (HX-Reswap: delete removes the row through the same button that swaps the refusal back in), and navigates from the detail page to the No-Readers list (HX-Redirect for htmx, a 303 for plain clients). A removal that races a fresh Bookmark is a refusal, not a 500: the row re-renders at its new count with the fact spelled out. The control renders only at zero Reader count on both surfaces, gated by hx-confirm with the brief's copy.