You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of Phase 1.1 (epic #14). Flocks today: API create/list/get/deplete, SPA has only inline create on Daily entry — no screen, no edit, no deplete UI, Archived status unreachable.
Flock.Archive() — allowed from Active or Depleted (mistake-created flocks can be archived directly). Deplete() stays Active-only.
Version concurrency token on Flock — Update/Deplete/Archive all bump it (AGENTS.md rule; Deplete currently has no token at all). Migration adds the column.
API
PUT /flocks/{id} — update.
POST /flocks/{id}/archive.
GET /flocks gains includeArchived (default false): archived flocks disappear from pickers/dashboard; Depleted stay visible (recent-history value). Management view passes true.
Web
New "Flocks" screen: table (name, breed, placed, age in weeks, initial count, status), create form, inline edit, deplete/archive actions with status-appropriate buttons, archived toggle. Scoped idempotency keys per established contract.
Daily entry keeps its inline quick-create.
Out of scope
Current bird count math (initial − mortality − culls) — that's the mortality/bird-movement slice; this screen shows initial count only.
Acceptance
Full loop from SPA: create → edit → deplete → archive; archived flock leaves daily-entry flock picker and dashboard, still listed on Flocks screen with toggle.
Double-deplete / archive-of-archived → 409.
Parallel-update race test: no torn write, Version advances per success.
Activity
F7: Flock management — edit/deplete/archive + Flocks screen (#47) (#48)