Fix schedule blocks persisting after End Day without refresh

Clear blocks, completedBlockIds, and day times alongside session when
the is_active: false WS event is received.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 10:34:57 -08:00
parent 1042c20fbb
commit c12f07daa3

View File

@@ -51,9 +51,13 @@ export const useScheduleStore = defineStore('schedule', () => {
// Session ended
if (event.is_active === false) {
session.value = null
blocks.value = []
completedBlockIds.value = []
isPaused.value = false
blockStartedAt.value = null
blockElapsedOffset.value = 0
dayStartTime.value = null
dayEndTime.value = null
return
}
// Pause — accumulate elapsed, stop counting