Finished joins the admin filter vocabulary; four hygiene predicates learn to exclude it #159
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Part of #136.
Blocked by: #157, #158.
What to build
The finished flag becomes first-class in the admin filter vocabulary, and the four clock-based hygiene predicates stop counting Series the owner deliberately retired. The owner can review every finished Series as a list, and an empty hygiene list is achievable again.
Acceptance criteria
finished_at > 0, label Finished, its own count in the aggregate, and the zero-renders-the-digit-unlinked rule applied unchanged.Landed on
spec-136as a--no-ffmerge ofticket/159-finished-filter(0029cff,cdd2e1d).store/admin.go:SeriesFilterFinished = "finished"added last in the const block and explicitly outside the permanent-then-fixable ordering (the block comment now says so);adminFiltercase →s.finished_at > 0; guardAND s.finished_at = 0appended to the no-chapter, never-checked, stale and no-cover clauses (in the stale clause the guard sits after the cutoff placeholder, so no renumbering); no-URL, no-readers (the one HAVING) and reader-report stay deliberately unguarded. One dense paragraph inadminFilter's doc comment carries the clocks-versus-outcomes contrast.web/admin_series.go: labelFinished, appended last toseriesFilterOrder— that single edit yields the select's last option, its aggregate count viaseriesFilterOptions, and the tail position in the Overview stats block. No new branch anywhere;seriesFilterLabelsdoubles as the validation set, so the one-filter-at-a-time select,FilterLabelandseriesListHrefpick it up for free.web/admin_overview.go: comment-only. The false "seven problem filters" line (plus two more stale counts) corrected;view.Uncheckeduntouched.TestAdminFinishedSeriesFilters(four guarded predicates exclude a finished Series, three unguarded include it,finishedreturns exactly the retired rows,SeriesShapesfinished total), plus three web tests — select option with count, index-order assertion that the finished figure renders after the seven hygiene figures, and zero-renders-as-unlinked-digit.go vet ./...andgo test ./...green on the merged base. No open concerns.