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
{{ message }}
Repository navigation
web: Dashboard production strip collapses to hairline bars when no day in the window is complete #916
Owner-approved: fallback production scale plus a card-scoped flock selector. With multiple accessible flocks, default to All flocks and allow searchable single-flock selection; with one accessible flock, show its name without a dropdown. Scope bars, completeness, average and hen-day comparison together. Use the complete-day peak when present, otherwise the recorded partial peak with the caption “partial days only”.
Approved v2 mockup and 14 captures. This supersedes the undecided alternatives below, retained for history. Implementation, three-locale documentation, tests and real-farm captures remain outstanding.
Part of #674 (Dashboard, after #906/#912). Owner report, 2026-09-20, with a screenshot of a 102-flock farm.
Symptom
On a farm where only some houses file each day (2 of 102 in the report), the Dashboard's 14-day production strip draws every bar as a hairline stub at the baseline, even though the tooltip reads a real figure (738 eggs). The strip conveys nothing, while the hen-day KPI beside it works.
Cause
dayStrip in web/src/lib/dashboard.ts scales bar height as a share of the peak among complete days (recordedFlocks > 0 && missingFlocks === 0). When no day in the window is complete, max is null and height() returns the 2% floor for every day. The complete-day peak was chosen so a partial day cannot be misread against a full one (#777/#780), but it silently assumes at least one complete day exists, which is false on farms where some houses never file.
Mockups first (owner, 2026-09-20): render the three options below against a no-complete-day farm and a complete-day farm, 390 and 1280, light and dark, and get one approved on this issue before any implementation.
Fix to decide (owner)
Fallback peak: when no complete day exists, scale against the peak of all days that have a figure, and label the scale as "partial days only" in the caption (trendScaleTitle) so nobody reads the bars as full-farm output. Cheapest; keeps the complete-day rule when it applies.
Scale by expected output: peak becomes the largest totalEggs / (filedFlocks / expectedFlocks) projection. Rejected unless the owner wants it: it invents a figure for houses that did not report.
Recommendation: option 1.
Must survive
Missing, partial and complete states and their hatching (#780); the 2% floor for a recorded zero day; the average line only over complete days; the one-tab-stop arrow-key strip; the reserved readout row; #914's forthcoming range switcher and week buckets, which must apply the same rule.
Deliverables
Unit tests in dashboard.test.ts with literal values: a window with zero complete days scales to its partial peak; a window with one complete day keeps the complete-day scale; the caption reports which scale is in use.
Captures at 1280 and 390, light and dark, on default-farm (101 houses, none complete) and readme-farm (complete days), per AGENTS.md.
Help page and glossary sentence for the strip's scale, three locales.
Approved design amendment
Owner-approved: fallback production scale plus a card-scoped flock selector. With multiple accessible flocks, default to All flocks and allow searchable single-flock selection; with one accessible flock, show its name without a dropdown. Scope bars, completeness, average and hen-day comparison together. Use the complete-day peak when present, otherwise the recorded partial peak with the caption “partial days only”.
Approved v2 mockup and 14 captures. This supersedes the undecided alternatives below, retained for history. Implementation, three-locale documentation, tests and real-farm captures remain outstanding.
Part of #674 (Dashboard, after #906/#912). Owner report, 2026-09-20, with a screenshot of a 102-flock farm.
Symptom
On a farm where only some houses file each day (2 of 102 in the report), the Dashboard's 14-day production strip draws every bar as a hairline stub at the baseline, even though the tooltip reads a real figure (738 eggs). The strip conveys nothing, while the hen-day KPI beside it works.
Cause
dayStripinweb/src/lib/dashboard.tsscales bar height as a share of the peak among complete days (recordedFlocks > 0 && missingFlocks === 0). When no day in the window is complete,maxisnullandheight()returns the 2% floor for every day. The complete-day peak was chosen so a partial day cannot be misread against a full one (#777/#780), but it silently assumes at least one complete day exists, which is false on farms where some houses never file.Mockups first (owner, 2026-09-20): render the three options below against a no-complete-day farm and a complete-day farm, 390 and 1280, light and dark, and get one approved on this issue before any implementation.
Fix to decide (owner)
trendScaleTitle) so nobody reads the bars as full-farm output. Cheapest; keeps the complete-day rule when it applies.totalEggs / (filedFlocks / expectedFlocks)projection. Rejected unless the owner wants it: it invents a figure for houses that did not report.Recommendation: option 1.
Must survive
Missing, partial and complete states and their hatching (#780); the 2% floor for a recorded zero day; the average line only over complete days; the one-tab-stop arrow-key strip; the reserved readout row; #914's forthcoming range switcher and week buckets, which must apply the same rule.
Deliverables
dashboard.test.tswith literal values: a window with zero complete days scales to its partial peak; a window with one complete day keeps the complete-day scale; the caption reports which scale is in use.default-farm(101 houses, none complete) andreadme-farm(complete days), per AGENTS.md.