Real-time clock toggle: per-event use_realtime_clock flag
- Migration 20260834000000: events.use_realtime_clock (boolean, default false) - Admin: Real-time clock toggle in the Events create/edit modal - Convivo: useEvent picks new Date() vs simulated DEFAULT_NOW from the flag; Home shows a 'Demo clock' badge only in simulated mode - Docs: app-structure, admin-app, schema, next-steps
This commit is contained in:
1 parent
a5ad9795ee
commit
5ac0aa3f57
11 files changed
+113
-23
No files matched your search
+25
-6
@@ -40,9 +40,13 @@ current phase.
|
||||
> no pick; attendees who attended an over session (and aren't its speaker) get a
|
||||
> pending-feedback pill on Home that clears once they rate it; and a session's
|
||||
> speaker can see the rating + AI summary for their own session only after it's
|
||||
> over).
|
||||
> Remaining work is cross-cutting (real event clock, deployment, testing, and the
|
||||
> ticket/Pretix sync that will consume the speaker links by email).
|
||||
> over), and
|
||||
> **Real-time clock toggle** (a per-event `events.use_realtime_clock` flag,
|
||||
> toggled in the admin Events view, switches the attendee app between the real
|
||||
> system clock and the simulated mid-event clock for Live/Next/Done status; the
|
||||
> Home header shows a 🎬 Demo clock badge only in simulated mode).
|
||||
> Remaining work is cross-cutting (deployment, testing, and the ticket/Pretix
|
||||
> sync that will consume the speaker links by email).
|
||||
|
||||
## Done
|
||||
|
||||
@@ -472,11 +476,26 @@ slot is live.
|
||||
adds `_assign_service_session_speakers`, re-creates `checkin_attendee` (service
|
||||
guard) and both sync RPCs (service-session typing + staff speakers).
|
||||
|
||||
## Real-time clock toggle — ✅ complete
|
||||
|
||||
A per-event flag lets the admin decide, in real time, whether the attendee app
|
||||
drives slot status (Live/Next/Done) from the **real system clock** or the
|
||||
**simulated mid-event clock** (the default, so the demo always looks live).
|
||||
|
||||
- **Schema:** `events.use_realtime_clock` (`boolean`, default `false`).
|
||||
- **Admin:** a **Real-time clock** toggle in the Events create/edit modal
|
||||
(on = real clock, off = simulated). Saved via `upsertEvent`.
|
||||
- **App:** `useEvent()` picks `now` from the flag — `new Date()` when on,
|
||||
`DEFAULT_NOW` when off — and exposes `clockMode` (`'realtime'` |
|
||||
`'simulated'`). The Home header shows a **🎬 Demo clock** badge only in
|
||||
simulated mode (nothing when the real clock is on). With the real clock on and
|
||||
the event in the past, every slot is
|
||||
`done` (no Now/Next card); with it off, the simulated clock restores the live
|
||||
slot.
|
||||
- **Migration:** [`20260834000000_event_realtime_clock.sql`](../../supabase/migrations/20260834000000_event_realtime_clock.sql).
|
||||
|
||||
## Cross-cutting / later
|
||||
|
||||
- **Real event clock** — replace the simulated `DEFAULT_NOW`
|
||||
([frontend/app-structure.md#the-event-clock](./frontend/app-structure.md#the-event-clock))
|
||||
with `new Date()` for the live event.
|
||||
- **Subdomains** — `convivo.appe.at`, `admin.appe.at`, `db.appe.at` don't exist
|
||||
yet; everything is on localhost. DNS + TLS + a reverse proxy in front of the
|
||||
Supabase core will be needed for a real deployment.
|
||||
|
||||
Reference in new issue
Block a user