fix(points): welcome check-in awards +10; add Sessions view, AI connection test, silent reload
The front-desk check-in set checked_in and printed badges but awarded nothing, so the +10 depended on which check-in a person happened to get. Every award path was reviewed: - welcome_checkin awards +10 (category checkin) on a genuine first check-in and returns points + points_awarded; checkin_attendee and preview_welcome_checkin return points_awarded too. - set_registration_checked_in(false) deleted all checkin points while keeping the checkins rows, and switching back on awarded nothing -- one mistaken toggle destroyed those points permanently. ON now recomputes from the rows that still exist and awards only the shortfall: reversible, still unfarmable. - The staff/Admin/@appe.at exclusion stays (product decision) but is no longer silent: three-way points sheets in the scanner, "no points" with a tooltip in Registrations, and the Contacts points modal refuses to apply rather than letting adjust_points (void) no-op quietly. Also in this change: - admin silent refresh (5s poll + 500ms after writes) across all data views; Registrations patches in place so rows never slide under the cursor - Settings "Validate AI connection" via a new sidecar POST /llm-test verdict endpoint (never leaks the key, distinguishes "no usage block" from "off") - new Sessions view between Schedule and Activity: speakers, attendance, ratings, attendee filter, and one button that summarises every session with feedback (one request each, concurrency 3, UI blocked until all settle) - provider requests disable thinking through one shared body builder sending both reasoning_effort:"none" and chat_template_kwargs.enable_thinking SQL: 113 / 57 / 24 assertions (set_registration_checked_in section 3 was rewritten, it asserted the bug). Sidecar 34 unit tests. Full e2e 202 passed, 0 failed. Migration applied locally only -- not deployed.
This commit is contained in:
1 parent
96e4e6a6ea
commit
fdb6045966
35 files changed
+2778
-154
No files matched your search
@@ -236,9 +236,15 @@ is role-aware — staff (`contact.is_admin`) default to **Staff** mode, attendee
|
||||
between two sub-modes:
|
||||
- **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`
|
||||
attendee's lanyard → `checkinAttendee(sessionId, qr)`. The result sheet's
|
||||
points line is **three-way**, because `points_awarded` says whether the award
|
||||
actually landed:
|
||||
- "⚠️ Already checked in — **No extra points**" (the `already` flag),
|
||||
- "✓ {name} — Checked in — **+10 pts · now {total}**",
|
||||
- "✓ {name} — Checked in — **Checked in · staff earn no points**" for the
|
||||
people `_points_eligible` excludes. Before that flag existed the sheet
|
||||
claimed "+10 pts · now 0", which read like a broken scanner.
|
||||
The `checkin_attendee`
|
||||
RPC also rejects a service session server-side ("service sessions cannot be
|
||||
checked in").
|
||||
**Front-desk gate:** if the lanyard belongs to someone the front desk has
|
||||
@@ -252,10 +258,16 @@ is role-aware — staff (`contact.is_admin`) default to **Staff** mode, attendee
|
||||
read-only `previewWelcomeCheckin(qr)` → a **confirm sheet** ("You are
|
||||
checking in {name}. By confirming, you will print their badge {N} times" /
|
||||
"…this person's label" when `copies` is 1; the print sentence is dropped when
|
||||
nothing would print) → **Yes** runs `welcomeCheckin(qr)`, which marks them
|
||||
present at the **event** (`registrations.checked_in = true`, no points) and
|
||||
queues `events.badge_copies` labels. Result sheet: "👋 {name} — Welcome to
|
||||
the event! — ✓ Checked in" (or "Already checked in to the event"). This is
|
||||
nothing would print). The sheet also states the points honestly:
|
||||
**"Checking in awards +10 points."** when `points_awarded`, or **"This person
|
||||
does not earn points (staff or organiser)."** when it does not — so the
|
||||
promise is made before the write, not after. **Yes** runs `welcomeCheckin(qr)`,
|
||||
which marks them present at the **event** (`registrations.checked_in = true`),
|
||||
awards **+10** (category `checkin`, first check-in only — the same amount a
|
||||
session scan pays) and queues `events.badge_copies` labels. Result sheet:
|
||||
"👋 {name} — Welcome to the event!" with the same three-way points line as
|
||||
the session sheet (`+10 pts · now {points}` / "No extra points" /
|
||||
"Checked in · staff earn no points"). This is
|
||||
the scan that opens the session gate above.
|
||||
|
||||
Data: `useEvent()` (for the session list) + the RPCs above.
|
||||
|
||||
Reference in new issue
Block a user