Service sessions + Home redesign + feedback loop

Service sessions (new slot semantics):
- Sidecar maps isServiceSession OR isPlenumSession -> service_session
  (Excel path also matches 'plenum' in Session Format).
- checkin_attendee rejects service sessions; Scan check-in dropdown
  excludes them.
- New _assign_service_session_speakers helper links every registered
  staff member as a speaker of a service session; both sync RPCs call
  it (and the API sync now actually types slots from is_service_session).
- No material requirement + no mic emoji for service sessions.

Home redesign:
- Now/Next cards show all concurrent sessions as sub-sections when
  there's no pick (1/2/3 sessions -> 1/2/3 sub-sections), with a
  "Nothing scheduled" fallback for empty slots.
- My picks today lists every pick (slot order) + empty state.
- Demo clock EVENT_DATE fixed to 2026-02-20 (matches seed) so a slot
  is live at 10:20.

Feedback loop:
- Attendee pending-feedback pill on Home (checked into an over session,
  not its speaker, no feedback yet); clears on submit.
- Speaker sees rating + AI summary for their own session in the Agenda
  sheet only after it's over.

Migration 20260833000000_service_sessions_feedback.sql. Docs updated.
This commit is contained in:
Lago committed 2026-08-25 08:58:16 +02:00
1 parent 2db22984fc
commit a5ad9795ee
15 files changed
+878 -105

No files matched your search

+58 -27
View File
@@ -47,49 +47,77 @@ A 3-step flow: **splash → scan → confirm**.
The landing screen. Shows:
- **Greeting + pills** — "Good morning, Ana 👋" and, to the right, a **red
material pill** `📎 {n}` (only for speakers who have one or more of their
sessions without material — tapping it opens a popup listing the pending
sessions) and the **points pill** `⚡ {points}` (tapping opens the Leaderboard).
The event name (`event.name`) is shown under the greeting.
**non-service** sessions without material — tapping it opens a popup listing
the pending sessions) and the **points pill** `⚡ {points}` (tapping opens the
Leaderboard). The event name (`event.name`) is shown under the greeting.
- **Pending-feedback pill** — a full-width **"⭐ Rate your last session"** (or
"Rate N sessions") button, shown only when the user is checked into one or more
**over** sessions, is **not** the speaker of that session, and **hasn't**
submitted feedback for it yet. It stays while feedback is pending and disappears
once submitted. Tapping goes to the Agenda (where the "Give feedback ⭐" button
lives on the session sheet).
- **Now card** — **always shown** for the current slot. If the user has a pick,
the session title + a "✓ Checked in" / "Show your QR to staff to check in"
pill; otherwise a "No pick yet" placeholder (identical layout for every role).
- **Next card** — **always shown** for the next slot (pick or "No pick yet").
- **My picks today** — shows only **2 rows** (the current slot's pick + the next
slot's pick). "tap to change" is a **hyperlink** to the Agenda.
the picked session's title + room + speaker + a "✓ Checked in" / "Show your QR
to staff to check in" pill. **If there's no pick, the card still shows what's
running** — one clean sub-section per concurrent session (title + room +
speaker), so a slot with 1, 2, or 3 sessions renders 1, 2, or 3 sub-sections.
If the slot has no sessions at all, a "Nothing scheduled right now." line.
- **Next card** — **always shown** for the next slot (same pick / concurrent-list
logic as the Now card, without the check-in pill).
- **My picks today** — one row per pick the user has made **today** (in slot
order), each showing the slot time + session title + room. "tap to change" is a
**hyperlink** to the Agenda. With no picks, a "No picks yet" line.
- **Quick actions** — Scan & connect, Agenda, Connections, Leaderboard.
- **No active event** — a graceful empty state ("No active event right now.
Check back soon!").
> **Identical for every role.** The Home screen (and the tab bar) is the same for
> attendees and staff — no role badge, no "Check-in" relabel. The Now/Next cards
> always render (with a "No pick yet" placeholder when there's no pick), so the
> layout is identical whether or not the user has picks. Staff keep their check-in
> capability inside the **Scan** screen (Attendee/Staff mode toggle).
> always render (with a concurrent-session list or "Nothing scheduled" when there's
> no pick), so the layout is identical whether or not the user has picks. Staff
> keep their check-in capability inside the **Scan** screen (Attendee/Staff mode
> toggle).
Data: `useEvent()` (event + agenda + clock) + `getMyPreferences()` +
`getMyCheckins(email)` + `getMySpeakerSessions(email)` (for the pending-material
pill). Slot status comes from `slotStatus(slot, now)`
pill) + `getMyFeedback(email)` (for the pending-feedback pill). Slot status comes
from `slotStatus(slot, now)`
([app-structure.md#the-event-clock](./app-structure.md#the-event-clock)).
## Agenda
Lists all slots, each with its sessions, a **slot-type badge** (keynote / session
/ lunch break / coffee break / close up), and a status pill (**Done / ● Live /
Up next**). The user's pick per slot is highlighted (filled check). A session the
user speaks shows a **"🎤 you"** tag; a session with material shows a **📎**.
Lists all slots, each with its sessions, a **slot-type badge** (**Session** /
**Service Session** — the `slot_type` enum, capitalized), and a status pill
(**Done / ● Live / Up next**). The user's pick per slot is highlighted (filled
check). A session the user speaks shows a **"🎤 you"** tag; a session with
material shows a **📎**.
**Service sessions** (breaks / lunch / closing / plenums) are treated
differently:
- the **pick circle (✓) is hidden** — they can't be picked (the sheet shows
"No pick needed for this slot." instead of the pick button);
- the **🎤 mic emoji is never shown** (neither the "🎤 you" tag nor the mic in
the speaker pill) — service sessions have no individual speaker;
- they have **no material requirement** (the pending-material notice never
applies to them).
- **Tap a session** → opens a bottom **sheet** with details (description,
speakers, room, capacity, checked-in state) and actions:
- **Give feedback ⭐** — only when the session is *done* **and** the user is
checked in. Opens the Feedback takeover (`openFeedback(sessionId)`).
- **Speaker feedback review** — when the user is a **speaker** of the session
**and** the session is *done*, a **"⭐ Your session feedback"** block shows the
session's **average rating** (stars + number) and the **AI-generated summary**
(`ai_generated_feedback`). It is **never shown while the session is still
running** — only after it's over.
- **Pick / Remove my pick** — `setPreference(sessionId)` / `clearPreference(slotId)`.
- **Speaker material** — if the user is a speaker of the session and no material
is uploaded yet, a **non-dismissible** "📎 Upload your session material" notice
with a file input. Uploading stores the file in the `materials` bucket and
calls `set_session_material` (via `uploadSessionMaterial`). Once uploaded, the
notice is gone and a **📎 Download material** button appears (visible to **all**
attendees), pinned to the **bottom** of the sheet's button stack (below
"Pick this session").
- **Speaker material** — if the user is a speaker of a **non-service** session
and no material is uploaded yet, a **non-dismissible** "📎 Upload your session
material" notice with a file input. Uploading stores the file in the
`materials` bucket and calls `set_session_material` (via
`uploadSessionMaterial`). Once uploaded, the notice is gone and a **📎
Download material** button appears (visible to **all** attendees), pinned to
the **bottom** of the sheet's button stack (below "Pick this session").
- **Remove material** — a speaker of the session can also **🗑 Remove material**
(to re-upload). This deletes the storage object and clears `material_path` via
`set_session_material` (null) — `removeSessionMaterial`.
@@ -112,10 +140,13 @@ is role-aware — staff (`contact.is_admin`) default to **Staff** mode, attendee
yourself. Result toast reflects the connection status (sent / already connected).
- **Staff mode (check-in):** a **check-in type toggle** (uiverse switch) switches
between two sub-modes:
- **Session check-in** (default) — pick a session (dropdown grouped by slot),
then scan an attendee's lanyard → `checkinAttendee(sessionId, qr)`. Shows a
result sheet: "✓ {name} — Checked in — +10 pts · now {total}" or "⚠️ Already
checked in — no extra points" (the `already` flag from the RPC).
- **Session check-in** (default) — pick a session (dropdown grouped by slot,
**service sessions excluded** — they can't be checked into), then scan an
attendee's lanyard → `checkinAttendee(sessionId, qr)`. Shows a result sheet:
"✓ {name} — Checked in — +10 pts · now {total}" or "⚠️ Already checked in —
no extra points" (the `already` flag from the RPC). The `checkin_attendee`
RPC also rejects a service session server-side ("service sessions cannot be
checked in").
- **Welcome check-in** — no session dropdown; scanning an attendee's lanyard →
`welcomeCheckin(qr)` marks them present at the **event**
(`registrations.checked_in = true`, no points). Result sheet: "👋 {name} —