follow-up(statistics-deck): P3 cleanups from PR #150 review #153

Open
opened 2026-09-27 09:37:40 +00:00 by gabogg · 0 comments
Owner

Follow-ups from the second-pass review of #150 (the deck shell's support for views). Both items are P3, and each names its fix.

  • S2-2 periods.js periodEnd/periodFor don't validate alignment the way the server does (_week_period_end/_month_period_end raise). ctx.periodFor('2026-09-15') on the Month tab silently builds a 16-day period. Throw, or snap to the period start, for a misaligned week or month start, and test it.
  • S2-3 ctx.periodFor/ctx.previousPeriod read this.granularity at call time, while ctx.period is fixed when the view renders. Use period.granularity, captured with the ctx, so a stale ctx after a tab switch can't mix granularities.

(C2-1 and C2-2 were resolved on the PR: the description now documents the API and the adoption checklist. S2-1 was fixed on the PR in ef77fc6.)

Follow-ups from the second-pass review of #150 (the deck shell's support for views). Both items are P3, and each names its fix. - [ ] **S2-2** `periods.js` `periodEnd`/`periodFor` don't validate alignment the way the server does (`_week_period_end`/`_month_period_end` raise). `ctx.periodFor('2026-09-15')` on the Month tab silently builds a 16-day period. Throw, or snap to the period start, for a misaligned week or month start, and test it. - [ ] **S2-3** `ctx.periodFor`/`ctx.previousPeriod` read `this.granularity` at call time, while `ctx.period` is fixed when the view renders. Use `period.granularity`, captured with the ctx, so a stale ctx after a tab switch can't mix granularities. (C2-1 and C2-2 were resolved on the PR: the description now documents the API and the adoption checklist. S2-1 was fixed on the PR in ef77fc6.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gabogg/hikcentral#153
No description provided.