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
@@ -33,6 +33,20 @@ test('sends only ratings and comments and reads OpenAI-compatible output', async
|
||||
assert.equal(result, 'Useful session.');
|
||||
});
|
||||
|
||||
test('disables model thinking with both supported fields', async () => {
|
||||
let request;
|
||||
await generateSummary(settings, { scope: 'event', title: 'Event', feedback: [{ rating: 4 }] }, async (_url, options) => {
|
||||
request = JSON.parse(options.body);
|
||||
return new Response(JSON.stringify({ choices: [{ message: { content: 'Summary.' } }] }));
|
||||
});
|
||||
assert.equal(request.stream, false);
|
||||
assert.equal(request.reasoning_effort, 'none');
|
||||
assert.deepEqual(request.chat_template_kwargs, { enable_thinking: false });
|
||||
// The ignored shape must never come back — it looks like success but does nothing.
|
||||
assert.equal(request.thinking, undefined);
|
||||
assert.ok(!('max_tokens' in request));
|
||||
});
|
||||
|
||||
test('rejects provider errors, malformed output and oversized inputs', async () => {
|
||||
const input = { scope: 'event', title: 'Event', feedback: [{ rating: 3 }] };
|
||||
await assert.rejects(generateSummary(settings, input, async () => new Response('secret error', { status: 401 })), /HTTP 401/);
|
||||
|
||||
Reference in new issue
Block a user