brackt/app
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
..
components Add auto-start draft at scheduled time (#437) 2026-05-16 23:31:51 -07:00
contexts feat: implement middleware and context provider for Express integration 2025-10-11 20:56:00 -07:00
hooks Simplify sports season display and add local timezone hints (#434) 2026-05-15 16:04:07 -07:00
lib Add auto-start draft at scheduled time (#437) 2026-05-16 23:31:51 -07:00
models Add admin user management interface with search and username editing (#431) 2026-05-15 12:07:51 -07:00
routes Add auto-start draft at scheduled time (#437) 2026-05-16 23:31:51 -07:00
services Add auto-start draft at scheduled time (#437) 2026-05-16 23:31:51 -07:00
test Add auto-start draft at scheduled time (#437) 2026-05-16 23:31:51 -07:00
types Redesign standings page with sortable table, 7-day change, and chart repositioned (#205) 2026-03-22 11:05:13 -07:00
utils Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
welcome Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
app.css Add electric flash + fade animation for draft picks, fixes #381 (#407) 2026-05-10 23:17:29 -07:00
entry.client.tsx Filter unnecessary sentry css and js errors. 2026-03-15 10:24:57 -07:00
entry.server.tsx Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
root.tsx Add admin user management interface with search and username editing (#431) 2026-05-15 12:07:51 -07:00
routes.ts Add pre-draft queue builder so users can rank players before draft order is set (#435) 2026-05-15 17:26:36 -07:00