Repository navigation
Closed
Labels
complexity: MMedium: several files or one subsystem, modest integration workenhancementNew feature or requestpriority: P3 lowLow: optional expansion, polish, or deferrable enhancementtheme: table-depthTTRPG depth: XP, loot, sheets, systems
Description
Split from #816 (Co-DM presence, P3, XL). This is the first and foundational slice: ephemeral authenticated presence on the encounter SSE stream. Subsequent slices (UI, intent indicators, secrecy filtering, lifecycle edge cases) build on this.
What this slice covers
Add ephemeral authenticated presence for humans on a running encounter, broadcast through the existing campaign-event SSE stream. This is the data foundation — the UI slice consumes it next.
Current state
- Campaign events (
packages/schema/src/index.ts:3525) have no human presence/actor model. apps/server/src/modules/encounters/encounters.service.ts:167publishes anonymous invalidation events.- The SSE stream already exists (campaign events); the AI driver presence model (
RunSessionPage.tsx:783) is a precedent for ephemeral presence but is AI-specific.
Acceptance criteria
- A server-side presence registry tracks which authenticated users have an active SSE subscription to a given encounter (userId, encounterId, coarse activity state:
viewing|editing). - Presence is broadcast as a campaign event on the existing SSE stream when a user joins or leaves an encounter's live surface (subscribe/unsubscribe/heartbeat-expire).
- Presence entries expire on disconnect (SSE close, heartbeat timeout). A reconnect restores presence.
- Presence is role-filtered: a user's presence is visible only to other members of the same campaign (enforced server-side, consistent with existing membership/secrecy guards).
- Presence does NOT leak on hidden prep or secret entity identity to unauthorized roles — a viewer/non-member cannot see presence on an encounter they cannot access.
- Server tests cover: join/leave/expire lifecycle, role filtering, and that presence events flow through the SSE stream.
Out of scope (subsequent slices)
- UI rendering of presence ("Alice and Bob are here") — separate slice.
- Advisory intent ("Bob is resolving this turn") — separate slice.
- Short-lived warnings/leases around high-risk actions — separate slice.
- Tab close / sleep / network-loss detection beyond SSE disconnect — separate slice.
Related
- Co-DM presence: show human collaborators and edit intent during live encounters #816 — parent epic
- The AI driver presence model is a precedent but is AI-specific; this generalizes it to human collaborators.
Metadata
Metadata
Assignees
Labels
complexity: MMedium: several files or one subsystem, modest integration workenhancementNew feature or requestpriority: P3 lowLow: optional expansion, polish, or deferrable enhancementtheme: table-depthTTRPG depth: XP, loot, sheets, systems
Activity
AwsomeFox commentedon Aug 11, 2026
Agent Workpad
State: PR_OPEN
Tool: copilot
Run ID: copilot-20260811T120000Z-glm
Claim comment ID: 5259188246
Claimed at: 2026-08-11T12:00:00Z
Lease until: 2026-08-11T13:30:00Z
Worker: glm-issue-worker
Worktree: /Users/anthonyanderson/Documents/campfire/.copilot-worktrees/glm-20260811T120000Z/issue-2209
Branch: copilot/backlog-2209-encounter-presence
PR: #2210
Latest head: 5decbba
Notes
encounter.presenceevent + presence types),EncounterPresenceService(in-memory registry, lazy TTL reap, audience-routed DM-only for hidden), REST GET/POST/DELETE/encounters/:id/presence, projection classification. Tests: newencounter-presence.e2e-spec.ts(18/18), projection sample. typecheck/lint/mcp-catalog/i18n green. Pushed + opened PR feat(encounters): ephemeral Co-DM presence on the encounter SSE stream (#2209) #2210. Watching CI.Blocker
review(#2209): add hidden-encounter gate to DELETE, campaignId to sna…
feat(encounters): render Co-DM presence on the encounter runner (#2212)…