brackt/app/models
Chris Parsons 46f8552f60
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m39s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m24s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix draft timer bugs: broadcasts, increments, reconnect sync, and overnight pause
- Broadcast timer-bank-updated after every pick so all connected clients
  immediately see the updated time bank (was only visible on next timer-pick-started)
- Capture pickMadeAt at route entry (before auth/DB overhead) and use Math.ceil
  so credited seconds always match the client countdown display
- Clear picksExpiresAt on every pick so _schedulePickForSeason starts fresh
- Hold schedulingInProgress lock for full timer callback to prevent the recovery
  interval from scheduling a duplicate timeout mid-pick
- Fix force-autopick route: call rescheduleTimer so the next team's clock
  starts immediately instead of waiting for the old timeout to fire naturally
- Fix draft.adjust-time-bank for on-clock teams: shift picksExpiresAt by the
  adjustment and reschedule, so the client countdown updates; block adjustments
  that would reduce the bank to zero
- Add timer-pick-started / timer-overnight-paused / timer-bank-updated socket
  events with full type definitions; replace dead timer-update event
- Fix draft-state-sync to include expiresAt for the active timer and
  isOvernightPause state so reconnecting clients see accurate countdown and
  pause banner immediately
- Fix room-closure countdown: capture client-side timestamp when draft completes
  so countdown runs even before the loader revalidates with draftCompletedAt
- Run countdown interval at 500ms with Math.ceil to prevent skipped seconds
- Add draft-started socket handler to transition pre-draft UI without a refresh
- Fix overnight pause: canPick only blocks on commissioner pause, not overnight
  pause (timer freezes but player can still pick early)
- Extract checkOvernightPause to server/overnight-pause-check.ts, breaking the
  timer↔socket circular import and ensuring the timezone cache is shared and
  evicted correctly across both callers
- Fix PostgreSQL varchar=uuid type mismatch in getTeamTimezone join

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:42:19 -07:00
..
__tests__ Fix draft timer bugs: broadcasts, increments, reconnect sync, and overnight pause 2026-06-05 22:42:19 -07:00
account.ts Add opt-in Discord pings to standings notifications (#429) 2026-05-15 10:06:54 -07:00
audit-log.ts Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
autodraft-settings.ts Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
canonical-golf-skills.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
canonical-surface-elo.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
commissioner.ts Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
cs2-major-stage.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
draft-pick.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
draft-queue.ts feat: proactively prune ineligible queue items after each pick (#59) 2026-03-02 22:07:22 -08:00
draft-slot.ts Fix draft order initialization for teams added mid-season (#449) 2026-05-19 18:22:47 -07:00
draft-timer.ts Fix draft timer creation for teams without existing timers (#26) 2026-02-22 17:27:16 -08:00
draft-utils.ts Fix draft timer bugs: broadcasts, increments, reconnect sync, and overnight pause 2026-06-05 22:42:19 -07:00
ev-snapshot.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
event-result.ts Add not-participating exclusion support for event results (#446) 2026-05-19 11:13:32 -07:00
golf-skills.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
group-stage-match.ts Fix World Cup group stage display and upcoming events (#55) 2026-05-27 05:43:08 +00:00
index.ts Remove sports_season_tournaments junction table — derive from scoring_events (#373) 2026-05-02 22:19:59 -07:00
league.ts Add Discord draft pick announcements (#460) 2026-05-20 19:55:48 -07:00
participant-expected-value.ts Fix EPL simulator parity config (#421) 2026-05-13 15:02:23 -07:00
participant-result.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
participant-season-result.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
participant.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
pending-standings-mappings.ts Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
playoff-match-game.ts Add playoff match game scheduling and odds management (#135) 2026-03-11 14:17:43 -07:00
playoff-match-odds.ts Add playoff match game scheduling and odds management (#135) 2026-03-11 14:17:43 -07:00
playoff-match.ts Fix bracket scoring logic to prefer template over DB defaults (#298) 2026-04-15 11:27:00 -07:00
qualifying-points.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
regular-season-standings.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
scoring-calculator.ts Fix slow bracket save and stale projected points (#54) 2026-05-27 04:28:10 +00:00
scoring-event.ts Fix World Cup group stage display and upcoming events (#55) 2026-05-27 05:43:08 +00:00
scoring-rules.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
season-participant.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
season-sport.ts feat: Refactor database connection handling in draft-related functions for improved flexibility 2025-10-26 20:35:55 -07:00
season-template-sport.ts refactor: remove isRequired field from season sports and templates 2025-10-13 15:00:59 -07:00
season-template.ts Improve admin dashboard stats and fix scoring event bugs (#230) 2026-03-25 20:46:54 -07:00
season.ts Use sport icons in league views (#394) 2026-05-07 23:06:49 -07:00
simulator.ts Fix EPL simulator parity config (#421) 2026-05-13 15:02:23 -07:00
sport.ts Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
sports-season.ts Formalize simulator system with manifest, input-policy, runner, and admin UI (#409) 2026-05-11 21:09:53 -07:00
standings.ts Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
surface-elo.ts Canonical tournament layer: 2026-05-01 21:04:48 -07:00
team-score-events.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
team.ts Enforce unique team names within a season 2026-05-23 16:55:08 -07:00
tournament-group.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
tournament-result.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
tournament.ts Canonical tournament layer: 2026-05-01 21:04:48 -07:00
user.ts Add admin user management interface with search and username editing (#431) 2026-05-15 12:07:51 -07:00
watchlist.ts Mobile draft room improvements: watchlist, collapsible picks feed, autodraft controls (#355) 2026-04-29 11:49:26 -07:00