brackt/docs/agents
Claude c175d70084 Phase 1: Replace per-second timer tick with event-driven scheduler
Eliminates the setInterval(1s) + per-second DB write by storing picksExpiresAt
in draft_timers and using a targeted setTimeout per pick. Clients count down
locally from the expiresAt timestamp, removing server-pushed timer-update events.

Key changes:
- database/schema.ts: add picksExpiresAt and picksStartedAt to draft_timers
- server/timer.ts: full rewrite — schedulePickForSeason, rescheduleTimer,
  30s recovery interval instead of 1s tick, overnight-pause resume scheduling
- server/socket.ts: new timer-pick-started / timer-overnight-paused events,
  updated draft-state-sync to include expiresAt for reconnect recovery
- draft.make-pick / draft.force-manual-pick: compute actual remaining from
  picksExpiresAt at pick time; call rescheduleTimer after the autodraft chain
- useDraftSocketEvents: handle new timer events, restore countdown on reconnect
- $leagueId.draft.$seasonId: client-side countdown useEffect from expiresAt
- plans/zero-downtime-scaling.md: full 4-phase scaling plan for future reference

Resolves 2351 unit tests (all passing).

https://claude.ai/code/session_019k5J6Ty7uP5HxSx6CsbiBK
2026-06-05 22:51:43 -07:00
..
architecture.md New design (#309) 2026-04-23 13:14:55 -07:00
auth.md Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
brackt-sport-implementation-plan.md Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
brackt-sport.md Docs update 2026-05-04 09:33:13 -07:00
database.md Canonical tournament layer: 2026-05-01 21:04:48 -07:00
deadline-based-timer.md Phase 1: Replace per-second timer tick with event-driven scheduler 2026-06-05 22:51:43 -07:00
domain-models.md Canonical tournament layer: 2026-05-01 21:04:48 -07:00
nll-simulator-implementation-plan.md Add NLL box lacrosse simulator implementation plan and preseason-draftability guidance (#417) 2026-05-12 14:22:34 -07:00
routing.md New design (#309) 2026-04-23 13:14:55 -07:00
simulators.md Add NLL box lacrosse simulator implementation plan and preseason-draftability guidance (#417) 2026-05-12 14:22:34 -07:00
testing.md New design (#309) 2026-04-23 13:14:55 -07:00