Fix timer reset on refresh and sync between dashboard and TV view

- Backend computes block_elapsed_seconds server-side from timer_events
- Store tracks blockStartedAt (ms) + blockElapsedOffset (seconds) instead
  of a client-side counter; updated correctly on start/pause/resume/end
- TimerDisplay derives elapsed from store props so both views always agree
- Add compact timer display to dashboard session card
- Add isPaused/pause-resume logic to dashboard Pause/Resume buttons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 00:16:29 -08:00
parent 3f9d599998
commit d43791f965
6 changed files with 129 additions and 18 deletions

View File

@@ -42,3 +42,4 @@ class DashboardSnapshot(BaseModel):
child: ChildOut
blocks: list[ScheduleBlockOut] = []
completed_block_ids: list[int] = []
block_elapsed_seconds: int = 0 # seconds already elapsed for the current block