auth-yes/tasks/new/2026-0825.03.gem.feat.event-cockpit.live-metrics-and-master-killswitch-0047.md
google-labs-jules[bot] 2d34aa15a7 feat: implement ephemeral 1-click magic link redemption (/pass)
Implements the GET /pass?token=... endpoint for validating session tokens, resolving the correct target application domain dynamically, and routing users seamlessly using ephemeral 1-click magic links.
Also updates the Sessions Hub UI hand-off modal to display the 1-Click Magic Link and adds full test coverage.

Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com>
2026-08-25 08:25:31 +00:00

1.7 KiB

TASK METADATA

  • Target Files:
    • server/main.ts
    • ui/components/SessionsPage.tsx
    • ui/mod.ts
    • server/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/new/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.

2. Proposed Implementation

  1. Backend Endpoints (server/main.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 to expires_at for the event and all active guest sessions.
  2. UI & Data Query (ui/mod.ts, ui/components/SessionsPage.tsx):
    • Query event_passes in /dashboard/sessions and render the Event Cockpit Deck.
    • Display progress bar, quick copy buttons for PIN and Short URL, [+1h Extend] and [🔴 End Workshop & Revoke All].
  3. Automated Tests (server/main.test.ts):
    • Test event extension and master kill-switch mass revocation.