refactor(statistics): consolidate busiest_day and best_day on StatisticsSummary #201
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#201
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from #99 and PR #168 review pass 1.
In
StatisticsSummary,busiest_day(for week periods) andbest_day(for month periods) hold identicalNamedDayrepresentations of the day within the period with the highest visitor count.They were preserved as separate fields for frontend compatibility. This issue tracks consolidating them into a single consistent field name (e.g.
busiest_day) with appropriate frontend migration and deprecation handling.gabogg referenced this issue2026-10-02 15:04:12 +00:00
Back to
needs-triage(2026-10-02). PR #168's second review (r21) found an open design point: which name survives (busiest_dayorbest_day), and how the frontend contract migrates. There is also no acceptance criterion. Settle these, then restoreready-for-agent.Agent Brief
Category: enhancement (refactor)
Summary: Merge
busiest_dayandbest_dayinto onebusiest_dayfield onStatisticsSummary, labelled "BUSIEST DAY" in both week and month views.Delivery: fixed inside PR #168, as part of its pass-2 fixes, and closed by it (maintainer, 2026-10-02).
Current behavior:
StatisticsSummaryhas two optionalNamedDayfields filled from the same value: the reliable day in the period with the most visitors.busiest_day; month summaries setbest_day.busiest_daylabelled "BUSIEST DAY" / "DÍA DE MÁS AFLUENCIA". The month view showsbest_daylabelled "BEST DAY" / "MEJOR DÍA".Desired behavior:
busiest_day: NamedDay | None, filled for both week and month summaries with the same rule: the period's reliable day with the most visitors, never an unreliable (excluded) day and never a Closed Day.best_dayis removed, with no alias. Backend and frontend change together, since the only consumer is this repo's frontend.busiest_day. ThebestDayKPI and i18n keys are removed, or renamed to the busiest-day ones._Avoid_: best day.docs/api/README.mdand the summary serializer's field list describe the single field.Key interfaces:
StatisticsSummary: removebest_day;busiest_daycovers week and month.busiest_dayfor every granularity that has one.bestDay→busiestDay.Acceptance criteria:
busiest_day, and no response containsbest_day.busiest_dayfor both week and month.busiest_day.bestDay/ "BEST DAY" / "MEJOR DÍA" string remains in the frontend or i18n.docs/api/README.mdlist onlybusiest_day.Out of scope: