b00d4ee99e
Previously, clicking a different block always fired 'start' which reset elapsed to zero — returning to a block lost all accumulated time. Store changes: - Add blockElapsedCache (blockId → elapsed seconds) that persists across block switches within a session - On 'pause' WS event: write the block's total elapsed into the cache - On 'start' WS event: restore elapsed from cache (0 if never worked) - On applySnapshot: seed cache with server-computed elapsed for the current block (so reloading preserves state correctly) - Clear cache when the session ends Dashboard selectBlock changes: - Auto-pause the currently running block before switching to another - Clicking the active block while paused now sends 'resume' instead of doing nothing - Clicking the already-running active block is a no-op Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>