Skip to main content

Sessions and Scheduling

Sessions represent scheduled or played campaign meetings. Scheduling also includes availability polls, upcoming feeds, active-session detection, notes, and played-session recap flows.

Backend

Primary files:

  • server/app/routers/sessions.py
  • server/app/routers/availability.py
  • server/app/routers/upcoming.py
  • server/app/lib/sessions.py
  • server/app/lib/notify.py
  • server/app/lib/rag/notes.py
  • server/app/lib/rag/recap_extraction.py

Session routes are campaign-scoped for create/list and session-id-scoped for update/delete. DM-only writes enforce require_dm; cross-campaign upcoming reads are scoped to the current user.

Frontend

Primary files:

  • web/src/components/SessionList.tsx
  • web/src/components/SessionEditorModal.tsx
  • web/src/components/SessionNotes.tsx
  • web/src/components/RollCall.tsx
  • web/src/screens/Upcoming.tsx
  • web/src/lib/sessions.ts

The active session is the earliest upcoming, not-played, not-cancelled session. The Active Session tab appears when such a session exists.

Availability Polls

The Roll Call flow lets DMs propose candidate dates, players vote availability, and the DM promote a chosen option into a session.

Availability data uses:

  • AvailabilityPoll
  • AvailabilityOption
  • AvailabilityResponse

Static/offline members do not vote because they have no account.

Notes and Recaps

DMs can edit live session notes, then mark a session played with final notes. Played notes become citeable context for Rules Chat. When AI access is present, played recaps can also trigger Codex extraction for review.

Notifications and Realtime

Session creation and poll activity can send notifications. Campaign SSE events keep invite and campaign state fresh without full page reloads.

Change Checklist

  • Decide whether a route is DM-only or member-visible.
  • Keep date/time handling UTC-safe.
  • Preserve active-session ordering behavior.
  • Check SSE/event broadcasts when session state affects the campaign shell.
  • Update recap extraction behavior if played-session transitions change.