follow-up(statistics-deck): P3 cleanups from the Day/Week/Month view reviews #155

Open
opened 2026-09-27 10:02:10 +00:00 by gabogg · 0 comments
Owner

Second-pass P3 follow-ups from the statistics-deck view PRs. Each item names its fix, so the design is settled.

Month (#147)

  • S2-1 showError calls chart.destroy() without the try/catch used in cleanup, so a throwing destroy inside .catch gives an unhandled rejection. Wrap it in the same try/catch.
  • S2-2 showError clears each graph's body but not its note. Clear graph.note too.

Week (#148)

  • S2-1 The view refetches Partial weeks, while the shell caches their day rows. Follow the shell's premise (complete periods don't change within a page's life) and cache consistently.
  • S2-2 Remove the dead ctx.locale || deckLocale(tr.lang) fallback. Make WEEK_LAYOUTS and weekRequests agree on unknown profiles.
  • C2-1 When the summary fetch fails, don't claim "LAST YEAR — COULD NOT BE LOADED". Name last year only when the summary said it exists.

Day (#149)

  • S2-2 chart(): drop the ctx.Chart && ctx.createChart ? … : null workaround. Call ctx.createChart and let the cell's try/catch show the error.
  • S2-4 When fillGraph throws, clear the header's legend and notes and remove sd-day-greyed.

Shell-level items (the withData scope, deep tick merge in deckChartOptions) are tracked in the consolidation issue.

Second-pass P3 follow-ups from the statistics-deck view PRs. Each item names its fix, so the design is settled. ## Month (#147) - [ ] **S2-1** `showError` calls `chart.destroy()` without the try/catch used in cleanup, so a throwing destroy inside `.catch` gives an unhandled rejection. Wrap it in the same try/catch. - [ ] **S2-2** `showError` clears each graph's body but not its note. Clear `graph.note` too. ## Week (#148) - [ ] **S2-1** The view refetches Partial weeks, while the shell caches their day rows. Follow the shell's premise (complete periods don't change within a page's life) and cache consistently. - [ ] **S2-2** Remove the dead `ctx.locale || deckLocale(tr.lang)` fallback. Make `WEEK_LAYOUTS` and `weekRequests` agree on unknown profiles. - [ ] **C2-1** When the summary fetch fails, don't claim "LAST YEAR — COULD NOT BE LOADED". Name last year only when the summary said it exists. ## Day (#149) - [ ] **S2-2** `chart()`: drop the `ctx.Chart && ctx.createChart ? … : null` workaround. Call `ctx.createChart` and let the cell's try/catch show the error. - [ ] **S2-4** When `fillGraph` throws, clear the header's legend and notes and remove `sd-day-greyed`. Shell-level items (the `withData` scope, deep tick merge in `deckChartOptions`) are tracked in the consolidation issue.
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#155
No description provided.