brackt/app/components/league/settings
Chris Parsons 0ba6a2a408 Add auto-start draft at scheduled time (#437)
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:31:51 -07:00
..
__tests__ Simplify sports season display and add local timezone hints (#434) 2026-05-15 16:04:07 -07:00
DraftOrderSection.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
DraftSetupSection.tsx Add auto-start draft at scheduled time (#437) 2026-05-16 23:31:51 -07:00
HistoryDangerSection.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
LeagueBasicsSection.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
LeagueSettingsHeader.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
NotificationsSection.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
PeopleSection.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
ScoringSection.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
SettingsMessages.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
SettingsNavigation.tsx Improve flag config validation and remove settings completion tracking (#390) 2026-05-07 10:09:45 -07:00
SettingsSaveBar.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
SettingsSection.tsx Improve flag config validation and remove settings completion tracking (#390) 2026-05-07 10:09:45 -07:00
SortableDraftOrderRow.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00
SportsSection.tsx Simplify sports season display and add local timezone hints (#434) 2026-05-15 16:04:07 -07:00
UnsavedChangesDialogs.tsx Refactor league settings into per-section components (#379) 2026-05-05 14:19:50 -07:00