brackt/app
Chris Parsons f33e39264d
fix: harden draft timer system with race-condition safety and DRY refactor (#34)
- Fix settings action silently resetting timer values when draft speed
  select is disabled (add null guard before overwriting draftInitialTime/
  draftIncrementTime)
- Make timer decrement and pick increment atomic using SQL expressions to
  prevent read-modify-write races between the timer loop and HTTP handlers
- Add UNIQUE INDEX on (season_id, pick_number) in draft_picks to prevent
  duplicate picks from concurrent requests (TOCTOU guard)
- Add socket join-draft team ownership validation via DB query
- Add iteration cap to autodraft chain while loop (max = totalTeams)
- Add draftPaused re-check before firing autodraft chain in make-pick
  and force-manual-pick
- Consolidate all snake draft calculations into calculatePickInfo (DRY);
  remove duplicated logic from timer.ts, make-pick, force-manual-pick,
  executeAutoPick, and checkAndTriggerNextAutodraft
- Fix calculatePickInfo to return snake-adjusted pickInRound matching
  draftOrder values instead of raw pre-snake value
- Fix timer-update socket events to emit nextPickNumber after a pick
  instead of the already-completed currentPickNumber
- Fix force-manual-pick to validate submitted teamId matches the team
  whose turn it actually is at the given pick number
- Replace inline timer init in draft.start with deleteSeasonTimers +
  initializeDraftTimers model functions (dead code fix)
- Fix draft loader to not crash when getTeamQueue fails (returns [])
- Fix misleading 403 message for commissioner picks
- Remove dead hidden inputs from league settings form
- Document connectedTeams single-instance limitation in socket.ts

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 23:23:24 -08:00
..
components Show all draft picks in sidebar with scroll instead of last 10 (#33) 2026-02-23 22:25:28 -08:00
contexts feat: implement middleware and context provider for Express integration 2025-10-11 20:56:00 -07:00
hooks Make draft room fully usable on mobile (#30) 2026-02-22 22:36:12 -08:00
lib Display team owner names instead of team names in draft UI (#24) 2026-02-22 16:56:07 -08:00
models fix: harden draft timer system with race-condition safety and DRY refactor (#34) 2026-02-23 23:23:24 -08:00
routes fix: harden draft timer system with race-condition safety and DRY refactor (#34) 2026-02-23 23:23:24 -08:00
services fix: correct test expectations for ICM edge cases and duplicate text queries 2026-02-17 14:24:07 -08:00
test feat: Add comprehensive scoring system database schema 2025-10-28 23:40:11 -07:00
types feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
utils Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
welcome Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
app.css Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
root.tsx Improve error boundary UI with status-specific error pages (#21) 2026-02-21 23:47:42 -08:00
routes.ts Add commissioner time bank adjustment feature for draft (#22) 2026-02-22 16:16:51 -08:00