brackt/app/components/league
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__ Improve draft info panel formatting (#428) 2026-05-14 23:42:04 -07:00
settings Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
CommissionersPanel.stories.tsx Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
CommissionersPanel.tsx Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
CreateLeagueCard.stories.tsx New design (#309) 2026-04-23 13:14:55 -07:00
CreateLeagueCard.tsx New design (#309) 2026-04-23 13:14:55 -07:00
DraftInfoCard.stories.tsx New design (#309) 2026-04-23 13:14:55 -07:00
DraftInfoCard.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
DraftSpeedPicker.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
DraftSpeedPicker.tsx Extract chess clock presets to shared constant (#432) 2026-05-15 14:02:49 -07:00
LeagueAvatar.stories.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
LeagueAvatar.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
LeagueRow.stories.tsx New design (#309) 2026-04-23 13:14:55 -07:00
LeagueRow.tsx Show commish-only leagues in a separate dashboard section, fixes #336 (#412) 2026-05-11 23:57:04 -07:00
MyLeaguesCard.stories.tsx New design (#309) 2026-04-23 13:14:55 -07:00
MyLeaguesCard.tsx Show commish-only leagues in a separate dashboard section, fixes #336 (#412) 2026-05-11 23:57:04 -07:00
OvernightPauseSettings.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
OvernightPauseSettings.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
ReviewSection.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
ReviewSection.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
ScoringPresetPicker.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
ScoringPresetPicker.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
SportIcon.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
SportIcon.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
SportsSeasonsSummary.stories.tsx New design (#309) 2026-04-23 13:14:55 -07:00
SportsSeasonsSummary.tsx Use sport icons in league views (#394) 2026-05-07 23:06:49 -07:00
StandingsPreview.stories.tsx New design (#309) 2026-04-23 13:14:55 -07:00
StandingsPreview.tsx Fix avatar display bugs in navbar, standings, and draft views (#387) 2026-05-06 17:03:34 -07:00
StatHelpers.tsx Add opencode oxlint plugin and UI refinements (#323) 2026-04-24 11:11:20 -07:00
StepperInput.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
StepperInput.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
TeamsPanel.stories.tsx New design (#309) 2026-04-23 13:14:55 -07:00
TeamsPanel.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
TimerModeSelector.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
TimerModeSelector.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
TimezonePromptBanner.tsx Add overnight pause for draft timers (#335) 2026-04-26 22:31:52 -07:00
TimezoneSelect.tsx Add overnight pause for draft timers (#335) 2026-04-26 22:31:52 -07:00
WizardAuthForm.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
WizardAuthForm.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
WizardStepper.stories.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
WizardStepper.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00