Context
The ICS generator (src/lib/ics.ts) currently hardcodes the live-session schedule as Mondays 5:30–7:30pm America/Denver. This works for Cohort 1 but won't survive:
- A cohort that meets on a different day of the week
- A cohort in a different timezone
- A schedule change mid-cohort
- Future cohorts we run in parallel with different cadences
Proposal
Add these columns to cohorts:
session_day_of_week (integer 0-6, or ISO 1-7; pick one and stick to it)
session_start_time (text, HH:MM local in session_timezone, e.g. "17:30")
session_duration_minutes (integer, default 120)
session_timezone (text, IANA zone — e.g. "America/Denver")
Default to the Cohort 1 values during migration so behavior is unchanged.
Then update generateCohortICS() to read from the cohort record instead of module-level constants, and drop the SESSION_* constants. VTIMEZONE blocks need to be generated per timezone — either ship a small map of common zones, or require the admin to pick from a known list at cohort creation.
Scope
- Migration + schema update
- Admin UI: add schedule fields to the cohort edit form (doesn't exist yet — see the inline meeting-URL form on
/admin)
- ICS generator reads from cohort instead of constants
- Homepage / cohort-page display copy reads from the same source (today it's hardcoded in 4–5 places — see the "Mondays 5:30–7:30pm MT" string)
Out of scope
Editing the schedule mid-cohort without breaking already-downloaded .ics files. That's the subscribable-feed issue.
Context
The ICS generator (
src/lib/ics.ts) currently hardcodes the live-session schedule as Mondays 5:30–7:30pm America/Denver. This works for Cohort 1 but won't survive:Proposal
Add these columns to
cohorts:session_day_of_week(integer 0-6, or ISO 1-7; pick one and stick to it)session_start_time(text,HH:MMlocal in session_timezone, e.g."17:30")session_duration_minutes(integer, default 120)session_timezone(text, IANA zone — e.g."America/Denver")Default to the Cohort 1 values during migration so behavior is unchanged.
Then update
generateCohortICS()to read from the cohort record instead of module-level constants, and drop theSESSION_*constants. VTIMEZONE blocks need to be generated per timezone — either ship a small map of common zones, or require the admin to pick from a known list at cohort creation.Scope
/admin)Out of scope
Editing the schedule mid-cohort without breaking already-downloaded .ics files. That's the subscribable-feed issue.