brackt/app/models/__tests__
Chris Parsons 0eb6715655
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m51s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m26s
🚀 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:51:43 -07:00
..
afl-finals.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
audit-log.test.ts Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
auto-pick.test.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
bracket-integration.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
bracket-seeding.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
bracket-templates.test.ts Fix college hockey bracket resolution (#396) 2026-05-08 12:29:39 -07:00
canonical-golf-skills.test.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
canonical-surface-elo.test.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
cfp-12-bracket.test.ts Add NCAA Football CFP simulator (12-team bracket) (#278) 2026-04-08 09:48:32 -04:00
commissioner.test.ts Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
draft-pick.test.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
executeAutoPick.timer.test.ts Fix draft timer bugs: broadcasts, increments, reconnect sync, and overnight pause 2026-06-05 22:51:43 -07:00
golf-skills.test.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
group-stage-match.test.ts Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
ncaa-68-bracket.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
nfl-bracket.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
participant-expected-value.test.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
participant.test.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
playoff-match-game.test.ts Add playoff match game scheduling and odds management (#135) 2026-03-11 14:17:43 -07:00
playoff-match-odds.test.ts Add playoff match game scheduling and odds management (#135) 2026-03-11 14:17:43 -07:00
point-progression.test.ts feat: add recharts library and implement PointProgressionChart component for historical views 2025-11-14 21:18:34 -08:00
process-match-result.test.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
progressive-floor-scoring.test.ts Fix partial bracket scoring, rank labels, and Discord notification bugs (#158) 2026-03-17 12:34:10 -07:00
qualifying-points.test.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
regular-season-standings.test.ts Fix standings upsert no-op: use EXCLUDED pseudo-table (#215) 2026-03-23 21:22:53 -07:00
scoring-calculator-qualifying.test.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
scoring-calculator.test.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
scoring-event-dashboard.test.ts Show events on multiple dates when games span requested date range (#254) 2026-04-01 13:39:03 -07:00
scoring-event-delete.test.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
scoring-event-tournament-helpers.test.ts Remove sports_season_tournaments junction table — derive from scoring_events (#373) 2026-05-02 22:19:59 -07:00
season-participant-copy.test.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
season-standings.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
simulator-inputs.test.ts Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00
sport.test.ts Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
sports-season.clone.test.ts Formalize simulator system with manifest, input-policy, runner, and admin UI (#409) 2026-05-11 21:09:53 -07:00
sports-season.test.ts Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
standings-snapshots.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
surface-elo.test.ts Canonical tournament layer: 2026-05-01 21:04:48 -07:00
team-projected-score.test.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
team-score-events.test.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
tiebreaker-logic.test.ts Fix tiebreaker incorrectly separating tied teams with pending participants, fixes #244 (#245) 2026-03-29 16:59:13 -07:00
tournament-result.test.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
tournament.test.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
upcoming-calendar.test.ts Fix World Cup group stage display and upcoming events (#55) 2026-05-27 05:43:08 +00:00
user.test.ts Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00