Fix draft timer: broadcasts, increments, reconnect sync, overnight pause #72
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "claude/website-draft-polling-plan-oIkCh"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
timer-bank-updatedafter every pick so all clients immediately see the updated bank instead of waiting for the nexttimer-pick-startedpickMadeAtat route entry (before auth/DB overhead) and useMath.ceilso credited seconds always match the client countdown displayschedulingInProgresslock for the full timer callback to prevent the recovery interval from scheduling a duplicate timeout mid-pickrescheduleTimerso the next team's clock starts immediately instead of waiting for the old timeout to naturally expirepicksExpiresAtby the adjustment and reschedule so the client countdown updates; block adjustments that would reduce the bank to zerotimer-pick-started,timer-overnight-paused,timer-bank-updatedwith full type definitions; removed deadtimer-updateeventdraft-state-syncnow includesexpiresAtfor the active timer andisOvernightPausestate so reconnecting clients see accurate countdown and pause banner immediately without a page reloaddraftCompletedAtMath.ceilto prevent skipped seconds under event loop pressurecanPickonly blocks on commissioner pause — overnight pause freezes the timer but the on-clock player can still pick earlycheckOvernightPausetoserver/overnight-pause-check.ts, breaking thetimer↔socketcircular import and sharing the timezone cache across both callers with correct evictionvarcharowner ID touuidingetTeamTimezonejoinTest plan
npm run test:run— all 158 files / 2351 tests pass🤖 Generated with Claude Code
46f8552f60to0eb6715655