Fix End Day not updating dashboard without refresh
Broadcast is_active in WS timer payload so the frontend can immediately clear the session when the backend marks it complete. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -153,6 +153,7 @@ async def timer_action(
|
||||
"session_id": session.id,
|
||||
"block_id": event.block_id,
|
||||
"current_block_id": session.current_block_id,
|
||||
"is_active": session.is_active,
|
||||
}
|
||||
await manager.broadcast(session.child_id, ws_payload)
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@ export const useScheduleStore = defineStore('schedule', () => {
|
||||
applySnapshot(event)
|
||||
return
|
||||
}
|
||||
// Session ended
|
||||
if (event.is_active === false) {
|
||||
session.value = null
|
||||
return
|
||||
}
|
||||
// Timer events update session state
|
||||
if (event.current_block_id !== undefined && session.value) {
|
||||
session.value.current_block_id = event.current_block_id
|
||||
|
||||
Reference in New Issue
Block a user