Repository navigation
Fixes from the PR #74 accuracy reviews: depleted backfill, draft-grade preservation, help/glossary corrections, a11y - #75
Merged
Conversation
Found by the PR #74 accuracy review (post-merge): the Help page, the Flocks screen's own deplete dialog ("backfill for past dates still works"), the glossary, and the domain (Flock.CanRecordProductionOn) all promise backfilled entries for depleted flocks up to their depletion date — but the Daily entry picker filtered to Active-only, so the capability was unreachable in the UI. Picker now includes depleted flocks (archived stay hidden), labeled "— depleted, backfill only", mirroring the feed-usage picker shipped in #70. Default selection still prefers an Active flock; the API continues to gate the exact dates. Browser-verified: depleted flock listed + labeled, default selection Active, and a post-depletion date surfaces the API's lifecycle rejection in the UI.
codex P1: the help implied medication-withdrawal protection is operational, but no production path sets EggLot.RestrictedUntil — a food-safety overclaim. Stock section, in-app glossary, and GLOSSARY.md now state plainly that nothing marks eggs restricted yet and withholding periods must be managed outside Cluckwork until medication tracking (spec §13) lands. App bug (codex P2): a draft referencing a since-deactivated grade rendered without that line (SPA loaded active grades only) and the next save silently dropped it via ReplaceGrades. Daily entry now loads grades includeInactive; deactivated grades render (labeled) only while a prefilled quantity exists, and the save payload includes them. Doc corrections (codex P2s): deactivated-grade stock does NOT keep selling — existing order lines confirm but new lines are rejected (help + GLOSSARY); "typo in a feed purchase" scoped to quantities only (cost/date/lot number not correctable); usage corrections fix stock, not the create-only usage record or its cost estimate; "drafts freely editable" scoped (flock/date and customer/date are fixed); legacy pre-allocation orders can't self-serve void. GLOSSARY inventory-item entry: all categories support purchases/ corrections, only flock feeding is Feed/Supplement/Additive; deactivation blocks new purchases, not using up stock. UI (codex P2/P3): help tables wrap on phones instead of inheriting the mobile nowrap scroller; glossary terms are th scope=row for screen-reader term-definition association; --muted darkened to clear WCAG AA (4.6:1). Browser-verified: help page sections/anchors/375px clean, depleted-backfill flow intact, rowheader semantics in place.
mforce
pushed a commit
that referenced
this pull request
Jul 18, 2026
mforce
pushed a commit
that referenced
this pull request
Jul 18, 2026
Docs-sync rule: Help page gains a Water section (direct vs meter-derived amounts, in-place correction, lifecycle rule), a "Wrong water record" row in the corrections map, and a glossary entry; GLOSSARY.md gains the Water usage entry noting it is the one editable record type (no inventory behind it). Written against #75's corrected text — held until that merged. local-pi review (scoped 96k run, 0 P1 / 2 P2 / 2 P3, all applied): - Equal meter readings now refuse with a meter-specific message instead of surfacing as a confusing "quantity must be positive" (domain + validators; equal-readings domain test added). - Source validator gains NotEmpty for a clear missing-field message. - Meter-pair rule's When guard rewritten to state its intent. - SPA maps 409 to a human concurrent-edit message.
mforce
added a commit
that referenced
this pull request
Jul 18, 2026
* F16: Water usage tracking (#67) Spec §12.5. Unlike feed there is no inventory behind water, so records are EDITABLE (Version token) instead of corrected via compensating rows — the design decision #67 left open, resolved and documented in the domain comment; corrections become admin-gated with #73. - WaterUsage: flock + date (fixed after creation — identity-like), quantity in L/gal, source (Well/Municipal/Tank/Other), optional meter start/end. Quantity may be omitted when meters are given (derived as the delta); when both are present they must agree. CreatedAtUtc for same-day ordering; DailyEntryId reserved with a real FK. - Record/Update handlers: same flock lifecycle gate as production and feed (CanRecordProductionOn — depleted backfill allowed, archived never), future dates refused. Update keeps flock/date fixed; parallel corrections race on the Version token (loser 409). - API: POST/PUT/GET /api/v1/water-usage (flock/date filters, paged). - SPA: Water page — capture form with a meters toggle, depleted flocks labeled backfill-only, record list with filters and inline "correct". Tests: 8 new (domain meter rules/unit guard/update semantics; integration direct + meter-derived recording, guard matrix incl. qty-vs-delta mismatch, archived/future 422s, update keeps flock/date, parallel-update Version race with no blended payload). 186 green. Runtime-verified: API scenario (derive 85.25 from meters, correction round trip) + Playwright UI flow (direct + metered records, inline correction). Help/GLOSSARY sections follow in this PR once #75 (which edits the same files) merges — docs-sync rule. Closes #67 * Water docs (post-#75 merge) + local-pi review fixes Docs-sync rule: Help page gains a Water section (direct vs meter-derived amounts, in-place correction, lifecycle rule), a "Wrong water record" row in the corrections map, and a glossary entry; GLOSSARY.md gains the Water usage entry noting it is the one editable record type (no inventory behind it). Written against #75's corrected text — held until that merged. local-pi review (scoped 96k run, 0 P1 / 2 P2 / 2 P3, all applied): - Equal meter readings now refuse with a meter-specific message instead of surfacing as a confusing "quantity must be positive" (domain + validators; equal-readings domain test added). - Source validator gains NotEmpty for a clear missing-field message. - Meter-pair rule's When guard rewritten to state its intent. - SPA maps 409 to a human concurrent-edit message. --------- Co-authored-by: mforce <>
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.
Consolidated fixes from PR #74's post-merge accuracy reviews (codex + stand-in + local llamacpp-pi). Full finding tables: stand-in, codex.
App fixes
Documentation corrections (help + GLOSSARY)
RestrictedUntilyet; the docs now say so explicitly (food-safety).UI/a11y
th scope="row";--muteddarkened to 4.6:1 (WCAG AA), app-wide.Browser-verified: help sections/anchors/375 px clean, backfill flow works end-to-end (depleted flock selectable, API date-gate message surfaces), rowheader semantics present.