summaryrefslogtreecommitdiffhomepage
path: root/packages/api/src
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-01 09:30:22 +0900
committerAdam Malczewski <[email protected]>2026-06-01 09:30:22 +0900
commit79a5b7d820530d7ed1f34cc10b11c140c67b5838 (patch)
tree5df98014ec7152090be5ebb7001435eb793b3b54 /packages/api/src
parent7128c624cf076d698bceb354526cf4cd3dfe5434 (diff)
downloaddispatch-79a5b7d820530d7ed1f34cc10b11c140c67b5838.tar.gz
dispatch-79a5b7d820530d7ed1f34cc10b11c140c67b5838.zip
fix(frontend): ClaudeReset — live currentHour, real Set derived, in-flight tracking, status row
Bugs fixed - fadedHours was $derived((): Set => {...}) — returned a *function*, not a Set. blockClass() then called fadedHours() once per of the 24 buttons, defeating Svelte's memoization. Now uses $derived.by(() => Set), passed in to blockClass as a value. - currentHour was $derived(new Date().getHours()) which is computed once on mount and never updates. After midnight (or any hour boundary) the 'now' ring stayed on the wrong block. Now driven by a nowMs $state bumped by a 30s setInterval, cleaned up on destroy. - Rapid double-clicks could land out of order ('last response wins, not last click'). Now tracks an in-flight Set + per-hour sequence counter; stale responses are dropped and pending buttons are disabled. - No feedback on wake success/failure. Snapshot now includes lastWake + pendingRetry, surfaced as a colored status row. Cleanups - resetOffsetHours pulled from the server snapshot (was hardcoded +5). - fadedHours window is now resetOffsetHours - 1 (was hardcoded 4). - onclick handler short-circuits when the hour is already pending.
Diffstat (limited to 'packages/api/src')
0 files changed, 0 insertions, 0 deletions