Skip to content

Session Start button not updating session status #12

Description

@barrulus

Bug

Clicking the Start button on a scheduled session in the DM Toolkit Session Management panel does not change the session status from scheduled to active. The UI does not update and no PUT /api/sessions/:id request appears in the server logs.

Expected Behavior

Clicking Start should:

  1. Send PUT /api/sessions/:id with { status: "active", started_at: <now> }
  2. Session status updates to active in the DB
  3. Game state initializes (turn order, exploration phase)
  4. Session opening narration fires
  5. UI updates to show active session with End button

Workaround

Session can be activated manually via DB:

UPDATE sessions SET status = 'active', started_at = NOW(),
  game_state = '{"phase":"exploration","roundNumber":1,"turnOrder":["<user-id>"],"activePlayerId":"<user-id>","worldTurnPending":false}'::jsonb
WHERE id = '<session-id>';

Context

  • The session route handler at server/routes/sessions.routes.js works when called directly via API
  • The issue appears to be in the frontend session-manager.tsx click handler — the startSession callback may not be firing or the request may be silently failing
  • The header bar also shows stale session info after a session reset

Related Components

  • components/session-manager.tsxstartSession callback
  • server/routes/sessions.routes.js — PUT handler
  • Game state initialization in server/services/game-state/service.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions