feat: add manual feedback AI summaries and secure leaderboard scoring

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:
committed 2026-10-15 19:06:10 +02:00
1 parent 407b878e23
commit 821907b164
37 files changed
+1640 -77

No files matched your search

+23 -9
View File
@@ -18,8 +18,9 @@ It runs on **port 3001** (Vite dev) or as the `convivo-admin` Docker container
| **Contacts** | Table of all contacts (email, name, LinkedIn, visibility toggles, `is_admin`). Edit, toggle `is_admin`, set visibility, adjust points. (No QR token here — it lives on the registration.) |
| **Registrations** | Per active event: list (contact, type, **QR token**, checked_in, points). Change type (enforces the sponsor rule — a failed sponsor change opens an **in-place sponsor lookup** popup), mark checked-in, **view the QR token** (final — no reset). |
| **Sponsors** | List (paid only visible to attendees; admin sees all). Add/edit (type, name, email, phone, paid, amount, **contact search-and-pick**). |
| **Schedule** | Slots (with a **type optionset** — `Session` / `Service Session`) + sessions (with speakers 1:N via a **multi-select search dropdown**, material upload with a **submitted / not submitted** state, `average_feedback`, `ai_generated_feedback` + an **Evaluate** stub button), plus an admin-only **Delete current schedule** action for the active event. |
| **Activity** | Tables of check-ins, connections, and feedback (per active event). |
| **Schedule** | Slots (with a **type optionset** — `Session` / `Service Session`) + sessions (with speakers 1:N via a **multi-select search dropdown**, material upload with a **submitted / not submitted** state and `average_feedback`), plus an admin-only **Delete current schedule** action for the active event. |
| **Activity** | Tables of check-ins, connections, and feedback (per active event), with manual **Generate AI Summary** controls for the event and individual sessions. |
| **Settings** | Global LLM endpoint, model and optional API key for feedback summaries. |
| **Events** | Create event, toggle active/inactive (a switch; only one can be active at a time — activating one deactivates the rest), edit dates/location + the **Sessionize endpoint** + the **Real-time clock** toggle (on = the attendee app uses the real system clock for Live/Next/Done; off = the simulated mid-event clock, the default). Each row has a **Sync** button that runs a (blocking) Sessionize sync and shows a result modal. |
| **Interfaces** | Manages the Sessionize sync **sidecar**: status (online / running / last run), a **Run sync** control (event picker + blocking run + result modal), an **Import Excel** control (upload the Sessionize "Sessions and speakers (advanced)" `.xlsx` + a "How to get this file" tooltip), and a **Recent runs** table from `sync_runs`. See [../backend/sidecar.md](../backend/sidecar.md). |
@@ -117,11 +118,12 @@ apps/admin/src/
├─ Contacts.tsx # table + edit / is_admin / visibility / points
├─ Registrations.tsx# per-event list + type / QR token (view) / checked-in + sponsor lookup
├─ Sponsors.tsx # sponsor CRUD
├─ Schedule.tsx # slots + sessions + speakers + material + AI-evaluate
├─ Schedule.tsx # slots + sessions + speakers + material
├─ Activity.tsx # check-ins / connections / feedback tables
├─ Events.tsx # event management (+ sessionize_endpoint + per-row Sync + talk networking bonus)
├─ Interfaces.tsx # sidecar status / run / recent runs
└─ Reports.tsx # post-event summary + CSV / Excel / PDF export (sidecar /export)
├─ Reports.tsx # post-event summary + CSV / Excel / PDF export (sidecar /export)
└─ Settings.tsx # server-only LLM configuration (redacted key)
```
## Data access
@@ -137,8 +139,8 @@ key. Everything it can do is allowed by RLS:
`registrations`, `sponsors`, `slots`, `sessions`, and `session_speakers`
(admin-only policies).
- **RPCs** — `adjust_points` (manual, audited as `admin`), `upsert_contact`,
`create_registration`, `set_registration_type`, `evaluate_session_feedback`
(AI stub), `set_session_material` (attach uploaded material), and
`create_registration`, `set_registration_type`,
`set_session_material` (attach uploaded material), and
`delete_event_schedule` (clear the active event's slots/sessions). The
`reset_registration_qr_token` RPC still exists but the admin UI no longer
exposes a token reset. See
@@ -172,9 +174,21 @@ event uses, but the `category` is `admin` so manual adjustments are auditable in
### Session material
The Schedule view uploads a session's material to the `materials` bucket and sets
`sessions.material_path` (admins can write `sessions` directly). The **Evaluate**
button calls `evaluate_session_feedback` (the AI stub) to set
`ai_generated_feedback`.
`sessions.material_path` (admins can write `sessions` directly).
### Feedback AI Summaries
Configure the complete OpenAI-compatible HTTPS endpoint, model and optional key
in **Settings > Feedback AI**. The key is never returned to the browser. In
**Activity**, the event feedback tab has one **Generate AI Summary** button;
the session feedback tab has one per session with responses. Generation is manual,
disabled without feedback or configuration, and shows loading and recoverable
error states. Saved plain-text summaries include their model, response count and
generation time. Regeneration replaces a result only after success.
The obsolete Schedule evaluation stub has been removed and its RPC is no longer
client-callable. See the [backend contract](../backend/feedback-ai.md) for provider
compatibility, data privacy, permissions and deployment requirements.
### Registration Tickets