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
@@ -13,6 +13,7 @@ import {
|
||||
uploadSessionMaterial,
|
||||
} from '../lib/api';
|
||||
import type { Contact, Event, Session, SessionSpeaker, Slot, SlotType } from '../lib/types';
|
||||
import { useSilentRefresh } from '../lib/useSilentRefresh';
|
||||
import { useToast } from '../context/ToastContext';
|
||||
import { Empty, Modal, Spinner, TypeBadge } from '../components/ui';
|
||||
|
||||
@@ -41,7 +42,7 @@ export function Schedule() {
|
||||
const mountedRef = useRef(false);
|
||||
const loadSeqRef = useRef(0);
|
||||
|
||||
async function load(expectedEventId?: string) {
|
||||
async function load(expectedEventId?: string, silent = false) {
|
||||
const seq = ++loadSeqRef.current;
|
||||
try {
|
||||
const ev = await getActiveEvent();
|
||||
@@ -72,6 +73,9 @@ export function Schedule() {
|
||||
setLoaded(true);
|
||||
} catch (e) {
|
||||
if (!mountedRef.current || seq !== loadSeqRef.current) return;
|
||||
// A failed background tick must not replace a good table with the error
|
||||
// screen — this view renders `if (error) return <Empty/>` — so it stays quiet.
|
||||
if (silent) return;
|
||||
setError(e instanceof Error ? e.message : 'Failed to load');
|
||||
throw e;
|
||||
}
|
||||
@@ -86,6 +90,13 @@ export function Schedule() {
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Pull the schedule quietly in the background. Paused while a modal is open so
|
||||
// the form is never re-rendered underneath whoever is typing in it. Writes here
|
||||
// already `await load()`, so no refreshSoon is needed.
|
||||
useSilentRefresh(() => load(event?.id, true), {
|
||||
enabled: loaded && slotModal === null && sessModal === null && deleteModal === null,
|
||||
});
|
||||
|
||||
const speakersFor = useMemo(() => {
|
||||
const m = new Map<string, string[]>();
|
||||
for (const sp of speakers) {
|
||||
|
||||
Reference in new issue
Block a user