brackt/app/routes/leagues
Chris Parsons d468385d90
Add auto-start draft at scheduled time (#437) (#438)
Commissioners can now opt in to having a draft start automatically at
its scheduled draftDateTime rather than requiring a manual "Start Draft"
click. The 1-second timer loop checks for eligible seasons each tick and
calls the new shared startDraft() service, which is also used by the
existing commissioner HTTP route.

- Add autoStartDraft boolean to seasons table (migration 0108)
- Extract core start logic into app/services/draft-autostart.ts so both
  the API route and the timer can call it without AsyncLocalStorage
- Add checkAndAutoStartDrafts() to the timer tick; disables autoStartDraft
  and stops retrying if no draft order is set at fire time
- Guard against null draftDateTime in both the timer query (isNotNull)
  and server actions (autoStartDraft forced false when datetime is null)
- Add "Auto-start at scheduled time" checkbox to league creation wizard
  (step 3) and league settings, gated on date+time being set
- Show countdown + "Start Now" button in draft room when auto-start is
  scheduled; reuses the existing nowForPauseCheck 1-second ticker
- Show orange warning banner on league homepage to commissioners when
  auto-start is within 1 hour and no draft order has been configured

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 23:37:29 -07:00
..
__tests__ Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
$leagueId.audit-log.tsx Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
$leagueId.draft-board.$seasonId.tsx Fix mobile spacing for draft board and dashboard layout (#13, #329) (#404) 2026-05-10 19:51:34 -07:00
$leagueId.draft-queue.$seasonId.tsx Rename queue page to Set Pre-Draft Queue, remove VORP, fix re-add race condition (#436) 2026-05-15 18:47:36 -07:00
$leagueId.draft.$seasonId.tsx Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
$leagueId.server.ts Improve draft info panel formatting (#428) 2026-05-14 23:42:04 -07:00
$leagueId.settings.server.ts Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
$leagueId.settings.tsx Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
$leagueId.sports-seasons.$sportsSeasonId.server.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
$leagueId.sports-seasons.$sportsSeasonId.tsx Add MLS standings sync and fix simulator conference resolution (#423) 2026-05-14 15:39:40 -07:00
$leagueId.standings.$seasonId.teams.$teamId.tsx Simplify team breakdown page layout and fix code quality issues (#155) 2026-03-17 09:20:41 -07:00
$leagueId.standings.$seasonId.tsx Fix standings page team icons to use selected team avatar (#388) 2026-05-06 18:08:46 -07:00
$leagueId.tsx Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
$leagueId.upcoming-events.tsx Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
creating.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
new.tsx Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00