brackt/app/routes/api
Chris Parsons 2949ca733a
Add standard draft clock mode (#67) (#189)
Implements a new "standard" timer mode alongside the existing chess clock
mode. In standard mode the per-pick timer resets to a fixed value after
every pick (no carry-over), and the speed selector shows plain time values
instead of named chess-clock presets.

Key changes:
- Add `draft_timer_mode` enum column to `seasons` table (migration 0053)
- `draft.start`: standard mode seeds timers at `draftIncrementTime` (the
  per-pick value) rather than `draftInitialTime`
- `draft.make-pick`: three-way branch — standard resets, chess clock
  owner earns increment, commissioner/admin pick leaves bank frozen
- `draft.force-manual-pick`: commissioner picks never earn bank time;
  chess clock path uses a pre-pick snapshot to avoid a race window with
  the 1-second timer loop
- `executeAutoPick` in draft-utils: auto picks never earn bank time;
  chess clock path skips the DB update (timer already at 0)
- League creation and settings pages: mode-aware speed selector (raw
  seconds for standard, named presets for chess clock); shared
  `parseDraftSpeed` utility extracted to `app/lib/draft-timer.ts`
- Tests added for draft.start timer init and make-pick timer mode
  behavior; force-manual-pick tests updated for new timer semantics

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 21:36:39 -07:00
..
__tests__ Add standard draft clock mode (#67) (#189) 2026-03-20 21:36:39 -07:00
webhooks Optimize user data fetching with batch queries and centralize display name logic (#176) 2026-03-18 16:46:07 -07:00
autodraft.update.ts feat: enhance autodraft functionality with detailed settings and commissioner controls (#61) 2026-03-03 20:14:38 -08:00
draft.adjust-time-bank.ts Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
draft.force-autopick.ts Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
draft.force-manual-pick.ts Add standard draft clock mode (#67) (#189) 2026-03-20 21:36:39 -07:00
draft.make-pick.ts Add standard draft clock mode (#67) (#189) 2026-03-20 21:36:39 -07:00
draft.pause.ts Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
draft.replace-pick.ts Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
draft.resume.ts Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
draft.rollback.ts Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
draft.start.ts Add standard draft clock mode (#67) (#189) 2026-03-20 21:36:39 -07:00
queue.add.ts feat: implement real-time queue updates via socket events in queue actions (#63) 2026-03-04 21:39:54 -08:00
queue.clear.ts feat: implement real-time queue updates via socket events in queue actions (#63) 2026-03-04 21:39:54 -08:00
queue.remove.ts feat: implement real-time queue updates via socket events in queue actions (#63) 2026-03-04 21:39:54 -08:00
queue.reorder.ts feat: implement real-time queue updates via socket events in queue actions (#63) 2026-03-04 21:39:54 -08:00
seasons.$seasonId.draft.ts Optimize user data fetching with batch queries and centralize display name logic (#176) 2026-03-18 16:46:07 -07:00