brackt/app/routes/api
Chris Parsons 7a8ea60e77
Add draft clock UI, Fischer increment timer logic, and security fixes (#19)
- Add prominent clock badge to tab bar (lights up on your turn) with
  correct Fischer increment chess-clock model: bank starts at initialTime,
  += incrementTime after each pick, other teams' banks untouched
- Extract pure timer helpers to app/lib/draft-timer.ts and add 29 unit
  tests covering formatClockTime, calculateTimeAfterPick, getTimerColorClass,
  and full snake-draft lifecycle regression scenarios
- Fix make-pick.ts: add status !== 'draft' and draftPaused server guards
- Fix draft-utils.ts: replace (global as any).__socketIO with getSocketIO(),
  fix timeUsed to store actual timeRemaining at pick moment (not always 120),
  add null timer warning, move timer fetch before pick insert
- Fix draft.start.ts: batch timer inserts, guard against empty draftSlots
- Fix DraftGridSection: memoize currentTeamId, widen teamTimers type to
  Record<string, number | undefined>
- Fix duplicate animate-pulse (getTimerColorClass already includes it)
- Clamp negative seconds in formatClockTime to guard against timer drift

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 16:51:12 -08:00
..
__tests__ feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00
webhooks refactor: simplify user update logic in Clerk webhook handler to reuse findOrCreateUser 2025-10-14 21:50:07 -07:00
autodraft.update.ts refactor: update import paths to use absolute paths for better clarity and maintainability 2025-10-24 21:20:19 -07:00
draft.force-autopick.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.force-manual-pick.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.make-pick.ts Add draft clock UI, Fischer increment timer logic, and security fixes (#19) 2026-02-21 16:51:12 -08:00
draft.pause.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.replace-pick.ts Add commissioner replace pick and draft rollback features (#18) 2026-02-20 22:47:29 -08:00
draft.resume.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.rollback.ts Add commissioner replace pick and draft rollback features (#18) 2026-02-20 22:47:29 -08:00
draft.start.ts Add draft clock UI, Fischer increment timer logic, and security fixes (#19) 2026-02-21 16:51:12 -08:00
queue.add.ts feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00
queue.clear.ts feat: add queue management UI and API endpoints for draft room 2025-10-17 17:42:40 -07:00
queue.remove.ts feat: add queue management UI and API endpoints for draft room 2025-10-17 17:42:40 -07:00
queue.reorder.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00