follow-up(statistics-deck): P3 cleanups from PR #144 review #145
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#145
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-ups from the second-pass review of #144 (review comment). All are P3. Each names its fix, so the design is settled.
Standards
statistics_deck.jsloadOlder: a failed LOAD OLDER, or a failed−past the oldest period, fails silently (.catch(() => null)). Set a per-tabolderErrorflag and showstatisticsDeck.picker.errornext to the button, as S-5 does for the first page.HourlyVisitors.label. MakeGapInterval.start_label/end_labelplainstrfields filled in_gaps_within(analytics_service.py), and drop thecomputed_fieldand thefacility_timeimport fromapp/schemas/statistics.py.charts.js: add a comment thatcurrentDeckColors()andcachedHatchare read once per page, on the assumption that there is no runtime theme switch.statistics_deck.js: state the invariant thatperiods === nullmeans the first page isn't loaded yet, next to the sharedtab.loadingslot. Alternatively, foldloadPeriods/loadOlderinto onefetchPage(before).Spec
docs/api/README.md: documentGapInterval.start_label/end_label(facility-timeHH:MM), and thebeforequery param onGET /api/statistics/periods(it returns periods older than the given period start; a misaligned value gets 422).Verification
Frontend tests for S2-2.
pytest,ruffandscripts/check_docs.pystay green.