[Foundry P1] Connection status: one holder with handoff, last seen, and a lasting indicator in Foundry #6

Open
opened 2026-06-23 00:42:32 +00:00 by rbrooks · 1 comment
Owner

Rewritten 2026-11-07 for the module design (D333–D338, #4). A "Test connection" can't reach a world that isn't open, so status is what the socket reports.

The contract: docs/design/foundry-connection.md (branch feat/5-foundry-connect).

Scope

  • One holder per campaign across both uvicorn workers, through a Redis DB 0 key with a 30 s TTL refreshed every 10 s. Other GMs' browsers wait on standby and take over within 2 s of a clean close, or within 30 s of a crash (the test's handoff, now across workers).
  • Heartbeat: a token check every 10 s, so an unpair closes the socket. A ping every 30 s. last_seen_at is written at most once a minute.
  • Quest Board: Settings → Foundry shows "Connected (Ryan's browser)", or "Not connected: open your world in Foundry", with last seen, and how many GMs are waiting behind the holder.
  • Foundry: a lasting indicator under the players list for GMs (Connected / Waiting (held by …) / Not connected), the same in the module's form (#4 finding 2). Reconnect backoff from 1 s up to 30 s, and none after an unpair.
  • Chat whispers to GMs (the comment below) are a question for the owner; they mostly belong to slice 2, with commands.

Done when

On foundry-dev, with two GMs in The Amberwake Accord, only one holds the link, closing it hands over, and Settings → Foundry shows the holder and last seen. Restarting the backend reconnects without input.

**Rewritten 2026-11-07 for the module design** (D333–D338, #4). A "Test connection" can't reach a world that isn't open, so status is what the socket reports. **The contract:** `docs/design/foundry-connection.md` (branch `feat/5-foundry-connect`). ## Scope - **One holder per campaign** across both uvicorn workers, through a Redis DB 0 key with a 30 s TTL refreshed every 10 s. Other GMs' browsers wait on standby and take over within 2 s of a clean close, or within 30 s of a crash (the test's handoff, now across workers). - **Heartbeat:** a token check every 10 s, so an unpair closes the socket. A ping every 30 s. `last_seen_at` is written at most once a minute. - **Quest Board:** Settings → Foundry shows "Connected (Ryan's browser)", or "Not connected: open your world in Foundry", with last seen, and how many GMs are waiting behind the holder. - **Foundry:** a lasting indicator under the players list for GMs (Connected / Waiting (held by …) / Not connected), the same in the module's form (#4 finding 2). Reconnect backoff from 1 s up to 30 s, and none after an unpair. - **Chat whispers to GMs** (the comment below) are a question for the owner; they mostly belong to slice 2, with commands. ## Done when On foundry-dev, with two GMs in The Amberwake Accord, only one holds the link, closing it hands over, and Settings → Foundry shows the holder and last seen. Restarting the backend reconnects without input.
Collaborator

Design note from the D337 test (#4), owner's question 2026-11-07: should Quest Board's messages go to the GMs in chat rather than only as fading notices?

Proposed: GM-only whispers in chat for events that matter, plus a lasting connection indicator for the current state.

  • Whisper:
    • something arrived from Quest Board ("Brenna Hask (level 3 NPC) was added from Quest Board.");
    • queued items delivered on opening the world ("3 things from Quest Board arrived while the world was closed.");
    • a command that couldn't be applied, and why;
    • the world was paired or unpaired;
    • the link has been down for more than a few minutes while a GM is in the world.
  • Not whispered (to keep chat useful): routine reconnects, handoffs between GMs' browsers, and outgoing events such as scene changes.
  • Indicator: a small Connected / Waiting (held by …) / Not connected marker, with the same detail in the module's settings.

To confirm with the owner when v5.0 starts. Use ChatMessage.create with whisper set to the GMs only, so nothing reaches players.

**Design note from the D337 test (#4), owner's question 2026-11-07:** should Quest Board's messages go to the GMs in chat rather than only as fading notices? **Proposed: GM-only whispers in chat for events that matter, plus a lasting connection indicator for the current state.** - **Whisper:** - something arrived from Quest Board ("Brenna Hask (level 3 NPC) was added from Quest Board."); - queued items delivered on opening the world ("3 things from Quest Board arrived while the world was closed."); - a command that couldn't be applied, and why; - the world was paired or unpaired; - the link has been down for more than a few minutes while a GM is in the world. - **Not whispered** (to keep chat useful): routine reconnects, handoffs between GMs' browsers, and outgoing events such as scene changes. - **Indicator:** a small Connected / Waiting (held by …) / Not connected marker, with the same detail in the module's settings. To confirm with the owner when v5.0 starts. Use `ChatMessage.create` with `whisper` set to the GMs only, so nothing reaches players.
claude-bot changed title from [Foundry P1] Connection health check in campaign settings to [Foundry P1] Connection status: one holder with handoff, last seen, and a lasting indicator in Foundry 2026-11-07 15:54:49 +00:00
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Quest-Board#6
No description provided.