Repository navigation
Description
Motivation
The Daily entry screen works, but three things hurt (surfaced while asking "should this be a wizard?"):
- Clutter — flock/date, five count fields, the grade grid and the actions all sit in one undifferentiated pile.
- Mobile / barn use — small screens, quick one-handed entry; the current grid wastes vertical rhythm and the actions scroll out of view.
- New-user guidance — nothing communicates the natural order (pick flock & date → enter counts → grade the sellable rest), and when a prefill lands on an existing Draft nothing says "you are editing an existing entry" (only locked days get a banner today).
Wizard considered, rejected
A multi-step wizard (full-page or modal) was considered and rejected:
- Daily entry is the highest-traffic, habitual screen (see Capture screens: move Water / expense-add / Sales add-line forms into dialogs? #133) — wizards suit rare/branching tasks, and every extra step is a per-day cost.
- The live reconciliation line ("Graded X of Y sellable") is load-bearing cross-field validation: totals and grades must be visible together. Split across steps, a user on the grade step can't see or fix cracked/total.
- Prefill-on-flock+date (F13: Destructive-action guards — confirms + prefill-failure overwrite fix #59/F13: Destructive-action guards + prefill-failure overwrite fix (#59) #61 overwrite guards), History deep links (History: Draft rows need an edit affordance pointing at the Daily entry screen #85) and the locked-day state (F17: Edit submitted daily entries — lock job + manager adjust with lot/movement reconciliation #69) would all have to become step-aware — the biggest rework on the most logic-dense screen in the SPA.
A same-page stepper remains a possible later upgrade for mobile: the sections below map 1:1 to steps if it ever proves necessary.
Design (markup-only restructure)
Restructure web/src/routes/DailyEntryPage.tsx markup only — state, prefill guards, idempotency keys and locked logic untouched:
- ① Flock & date — flock select, inline "+ new flock", date. When the prefill finds an existing
Draft, show aStatusBadge-based "Editing draft" indicator here. - ② Egg counts — total / cracked / dirty / discarded / mortality.
- ③ Grading — grade quantity inputs.
- Sticky footer — the sellable-math line (or the losses-exceed-total error) plus Save draft / Save & submit, always visible while scrolling.
- Mobile CSS — single-column form grid under a breakpoint, taller touch targets, safe-area padding under the sticky footer.
Locked (submitted/adjusted) days are unchanged: same warn banner, disabled fields, same layout. Draft editing benefits automatically — the edit path is this same form.
Checklist
- Numbered sections ①②③ with headings
- Sticky footer: math line + both save actions
- "Editing draft" badge when prefill lands on an existing Draft (absent on fresh days)
- Mobile CSS pass (single column, touch targets, safe-area)
- Vitest: headings render, draft badge present/absent, footer math + actions, locked-day rendering unchanged
- Help page "Daily entry" section + GLOSSARY updated in the same PR
Relationship to #133
This issue settles the dialog-or-inline question for Daily entry: it stays inline. Daily entry has been removed from #133's scope.
An earlier version of this section claimed the two were independent. They are not:
- The rejected-wizard rationale above applies unchanged to a dialog. "Highest-traffic, habitual screen, every extra step is a per-day cost" — a dialog is an extra step, on every visit.
- The sticky footer would compete with
.dialog-foot, and on mobile with the bottom sheet, which already owns the bottom edge. - Section ① contains the "+ new flock" dialog, which would nest a dialog inside a dialog.
#133 continues to cover the remaining capture surfaces (Water, expense-add, Sales add-line) and the Users flock-assignment control.
Part of epic #14.
Activity
Mobile nav: bottom tab bar + More sheet (#148)