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. Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
cdb4793273
commit
d3083b7940
35 files changed
+2778
-154
No files matched your search
@@ -226,9 +226,11 @@ export function Scan() {
|
||||
<div className="sub">{checkin.already ? 'Already checked in' : 'Checked in'}</div>
|
||||
<div style={{ marginTop: 14 }}>
|
||||
{checkin.already ? (
|
||||
<span className="pill amber">No extra points</span>
|
||||
<span className="pill amber" data-testid="session-points">No extra points</span>
|
||||
) : checkin.points_awarded ? (
|
||||
<span className="pill green" data-testid="session-points">+10 pts · now {checkin.points}</span>
|
||||
) : (
|
||||
<span className="pill green">+10 pts · now {checkin.points}</span>
|
||||
<span className="pill amber" data-testid="session-points">Checked in · staff earn no points</span>
|
||||
)}
|
||||
</div>
|
||||
<button className="btn primary" style={{ marginTop: 18 }} onClick={() => setCheckin(null)}>
|
||||
@@ -269,6 +271,12 @@ export function Scan() {
|
||||
{!pendingWelcome.preview.will_print && !pendingWelcome.preview.already && (
|
||||
<div className="muted small" style={{ marginTop: 6 }}>No badge will print (no layout for this event).</div>
|
||||
)}
|
||||
{pendingWelcome.preview.points_awarded && (
|
||||
<div className="muted small" style={{ marginTop: 6 }}>Checking in awards +10 points.</div>
|
||||
)}
|
||||
{!pendingWelcome.preview.points_awarded && !pendingWelcome.preview.already && (
|
||||
<div className="muted small" style={{ marginTop: 6 }}>This person does not earn points (staff or organiser).</div>
|
||||
)}
|
||||
<div style={{ marginTop: 16 }}>
|
||||
<button className="btn primary" data-testid="welcome-checkin-confirm-yes" disabled={busy} onClick={confirmWelcome}>
|
||||
{busy ? 'Checking in…' : 'Yes, check in'}
|
||||
@@ -289,7 +297,15 @@ export function Scan() {
|
||||
<h3 style={{ marginTop: 10 }}>{welcome.attendee_name}</h3>
|
||||
<div className="sub">{welcome.already ? 'Already checked in to the event' : 'Welcome to the event!'}</div>
|
||||
<div style={{ marginTop: 14 }}>
|
||||
<span className="pill green">✓ Checked in</span>
|
||||
{welcome.already ? (
|
||||
<span className="pill amber" data-testid="welcome-points">No extra points</span>
|
||||
) : welcome.points_awarded ? (
|
||||
<span className="pill green" data-testid="welcome-points">+10 pts · now {welcome.points}</span>
|
||||
) : (
|
||||
// Staff / Admin contacts never earn points; say so instead of
|
||||
// showing a +10 the database deliberately refused to award.
|
||||
<span className="pill amber" data-testid="welcome-points">Checked in · staff earn no points</span>
|
||||
)}
|
||||
</div>
|
||||
<button className="btn primary" style={{ marginTop: 18 }} onClick={() => setWelcome(null)}>
|
||||
Scan next
|
||||
|
||||
Reference in new issue
Block a user