1.7 KiB
1.7 KiB
TASK METADATA
- Target Files:
server/routes/events.tsui/components/SessionsPage.tsxui/mod.tsserver/main.test.ts
- Core Objective: Add real-time event cockpit deck to the Sessions page with
active seat counters, PIN display, time extension, and 1-tap master kill
switch (
/api/events/:id/end). - Dependencies:
tasks/complete/2026-0825.02.gem.feat.event-passes.multi-claim-workshops-and-kiosks-0046.md - Additional Important Notes: Sub-millisecond mass revocation of all event guest sessions via Valkey RESP3 push tracking.
1. Architectural Considerations & Risks
- Mass Revocation Performance:
- When the organizer clicks "End Workshop & Revoke All", the endpoint must delete all associated guest session IDs from both PostgreSQL and Valkey, emitting invalidation events to all connected nodes immediately.
- Observability:
- Show real-time seat claim progress bar (
38 / 50 claimed) and event expiration timer.
- Show real-time seat claim progress bar (
2. Proposed Implementation
- Backend Endpoints (
server/routes/events.ts):POST /api/events/:id/end: Closes the event, deletes all guest sessions under the event, and purges Valkey cache.POST /api/events/:id/extend: Adds hours toexpires_atfor the event and all active guest sessions.
- UI & Data Query (
ui/mod.ts,ui/components/SessionsPage.tsx):- Query
event_passesin/dashboard/sessionsand render the Event Cockpit Deck. - Display progress bar, quick copy buttons for PIN and Short URL,
[+1h Extend]and[🔴 End Workshop & Revoke All].
- Query
- Automated Tests (
server/main.test.ts):- Test event extension and master kill-switch mass revocation.