Repository navigation
feat(#489): show the last V-code / L-code in use on Admin → Health, with the next free number - #490
Merged
Merged
Conversation
…ith the next free number The librarian prints sheets of pre-generated barcode labels in advance and needs to know where the occupied range ends. Since #428 the answer lived only on the /catalog info line; the Health tab, which already aggregates catalog counters, now carries it too, each value paired with the next free number ("V0142 (next: V0143)"). - services/admin_health: `LabelWatermarks` + `label_watermarks()` reuse the two `highest_label_any` model lookups (soft-deleted rows included, so a printed sticker is never reissued) and `next_label()` increments within the fixed X9999 width, returning None once the space is exhausted or the input is malformed. - routes/admin + fragment: a "Barcode labels" section under the entity counters, with a "none yet" / "none left" placeholder per family. - locales: seven keys in en/fr/de/it. - manual en/fr: the Health tab bullet now mentions the rows. - tests: pure unit tests for `next_label`, sqlx tests for the service (empty catalog, trashed rows still count), and an E2E smoke journey that creates a shelf and a volume, reads both values, then trashes the volume and checks the watermark does not drop. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
guycorbaz
marked this pull request as ready for review
September 23, 2026 19:08
11 of 12 tasks
guycorbaz
added a commit
that referenced
this pull request
Sep 23, 2026
* release: v1.20.0 — where the labels end (#489) Version bump plus the Foundation Rule 19 documentation sweep. No source change: the feature is already on main (#490). - Cargo.toml + Cargo.lock → 1.20.0 - Manual EN + FR: title-page version, install snippets, "What's new in 1.20.0" in chapter 8, PDFs rebuilt and committed - README: image-size badge, status line, live-install label, current release paragraph - ROADMAP: current-stable header, v1.20.0 shipped section - docs/dockerhub-overview.md: tags list - website: nav badges, hero, JSON-LD softwareVersion, roadmap meta and narratives, sitemap lastmod - sprint-status.yaml: last_updated header Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * release: bump rustls 0.23.40 → 0.23.45 for RUSTSEC-2026-0285 The release-cut cargo audit flagged the transitive rustls in Cargo.lock (TLS 1.3 handshake messages accepted across encryption-level boundaries, medium). Lockfile-only update; noted in the v1.20.0 roadmap entry and in both manuals' "What's new", PDFs rebuilt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #489.
What
Admin → Health gains a Barcode labels section under the entity counters: the last volume number (V-code) and the last shelf number (L-code) ever printed, each with the next free number —
V0142 (next: V0143). An empty family reads "None yet";X9999reads "none left".Why
The librarian prints sheets of pre-generated barcode labels in advance and needs to know where the occupied range ends. Since #428 the answer lived only on the
/cataloginfo line; the Health tab already aggregates catalog counters, so it is the natural second home.How
services/admin_health:LabelWatermarks+label_watermarks()reuse the twohighest_label_anymodel lookups (soft-deleted rows included — a printed sticker outlives the row, so its number is never reissued, same semantics as/catalog).next_label()increments within the fixedX9999width and returnsNoneonce exhausted or on malformed input.routes/admin+admin_health_panel.html: pre-formatted strings, ids#health-last-vcode/#health-last-lcode.Tests
next_label(increment, exhaustion, malformed); sqlx: empty catalog, trashed rows still count.admin-health-label-watermarks.spec.ts: blank-browser login → create shelf + volume → read both values (highest ≥ created code, next = highest + 1) → trash the volume → watermark does not drop. Parallel-safe and idempotent on re-run.cargo clippy -D warnings,cargo test(lib + integration),cargo sqlx prepare --check, full Playwright suite atCI=true --workers=2on a fresh stack: 335 passed.🤖 Generated with Claude Code