Commit Graph
19 Commits
Author SHA1 Message Date
Lago 6a3b70a330 test(leaderboard): catch fixtures up to event-feedback +5 and auto-connect 2026-10-20 23:43:23 +02:00
Lago 1f4b9d2beb feat(sessions): service sessions are always English
Both sync functions now force language='English' for sessions flagged
is_service_session (covers Sessionize, GridSmart and Excel paths); existing
service rows are backfilled by the migration. Regular sessions keep the
Language-category behavior unchanged. Seed mirrors the rule; test suite
extended (11 cases, all green).
2026-10-20 23:25:35 +02:00
Lago 6ed249fa31 feat(sessions): import language tag from Sessionize Language category
Sabrina's backlog: show a per-session delivery language in the sessions
overview. Sessionize has no native language field (verified live), so the
sidecar now resolves each session's categoryItems against a session
category titled "Language" (Sessionize's own demo-endpoint pattern) and
ships it as a plain string; a native session.language wins if it ever
appears.

- migration 20261021090000: sessions.language + re-created
  get_agenda / sync_sessionize_event / sync_sessionize_excel. Language
  upserts with the same coalesce(excluded, existing) rule as level/area,
  so a source without language never erases it. get_agenda is dropped +
  re-created (OUT shape change) and re-granted to anon/authenticated.
- sidecar: transform extracted to sessionize-transform.js (unit-tested);
  Excel import gains Language / Sprache / "Sprache / Language" headers.
- attendee app: third agenda filter dropdown ("All languages", only
  rendered when values exist) + language pill in SessionDetail.
- admin app: Sessions search + subtitle include language.
- seed: English for all talks, German for the two German-titled sessions.
- tests: session_language_tests.sql (8 assertions, all pass),
  sessionize-transform.test.js (7), transform-excel Language case; 43/43
  sidecar tests, date-guard/gridsmart/session-persistence suites green.
- docs: schema.md sessions columns + next-steps.md completion entry.

Organizer precondition (Sabrina): define the "Language" category AND
enable session custom fields on the event's API/Embed page, otherwise
live syncs keep language null (Excel import is the fallback).
2026-10-20 22:55:24 +02:00
lago 35b88d50ca feat(points): staff auto-connect never scores; event feedback pays +5
- Migration 20261020120000: staff (type staff / Admin / @appe.at) are
  auto-connected to every participant of the event via connections.auto
  rows inserted directly as accepted - never through accept_connection,
  so zero points by construction; backfill + idempotent helper + trigger.
- Migration 20261020130000: submit_event_feedback awards +5 on the first
  submission per participant x event (edits earn 0), gated by
  _points_eligible; response gains earned column; ACL restored.
- Admin: points move from Contacts to Registrations (active-event rows
  only, in-place save); Dashboard Top points drops emails; Dashboard and
  Activity hide auto connections.
- Attendee: leaderboard masks surnames (Max M.); EventFeedback toast
  shows +5 pts on paid submissions.
- Tests: staff_auto_connections_tests.sql (14 assertions), rpc_tests
  section 11 (4 assertions). Docs + release record 2026-10-20.
- README: document the git-ignored .env provisioning step (missing key
  = white screen).
2026-10-20 22:15:29 +02:00
Lago fdb6045966 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.
2026-10-19 20:14:03 +02:00
Lago c49a94fe80 fix(admin): per-row check-in toggle; feat(db): front-desk gate + badge copies
Registrations table felt buggy because both row actions did
setBusy(true) -> write -> reloadRegistrations() -> setBusy(false):
the list is sorted by points, so a reload made the row you just
touched jump (or vanish under a Checked-in filter), and the single
`busy` flag disabled every control in the table for the whole
request. The fix is per-row in-flight state (busyIds + withRowBusy)
and no reload at all: the toggle patches its own row's checked_in
plus the points delta the RPC returns, the type change patches
`type`; a rejected write rolls both back. Only the touched row is
disabled, shows a "Saving…" pulse, and two rows can save at once.
Toggle hit area is now 40x41 px with a focus-visible ring.

Front-desk gate: checkin_attendee reads registrations.checked_in
and raises "This attendee needs to be checked in at the front desk
first." when it is not true, and no longer sets checked_in as a
side effect. checkins has no INSERT policy, so the RPC is the only
write path and the gate cannot be bypassed. The scanner shows a
dedicated "Not checked in yet" sheet instead of a toast.

Badge copies: events.badge_copies (1..4, default 1). welcome_checkin
sends that many pgmq jobs in one transaction (the Pi prints one
label per job, so N jobs = N labels; no worker change) and clamps
the value again itself. preview_welcome_checkin gained a `copies`
column (drop + recreate) so the popup states the real count. Manual
reprint still prints exactly one. Set from Settings -> Badge
printing (active event) and the Events form, always as a
single-column update; the Settings badge section now renders even
when the LLM settings call fails.

Tests: badge_print 113 (+6), leaderboard 47 (+1), new
registration-checkin-toggle (6), front-desk-gate (3),
welcome-badge-copies (3); the stale registrations-PATCH mock in
registration-ticket-merge now targets set_registration_checked_in,
the ambiguous Save button is "Save copies", and the print-copy
assertion tolerates the typographic apostrophe. Docs updated
(rpcs, schema, printing, tests, admin-app, screens) with a release
record; NOT deployed - see docs/releases/2026-10-19.md.
2026-10-19 15:10:20 +02:00
Lago 316f1316e6 fix(scanner): camera scans used stale first-render handler (welcome mode ignored); feat(admin): un-check-in removes check-in points
- Scanner: invoke onResult through a ref refreshed each render; the camera
  callback captured the mount-time closure, so scans kept running session
  check-in even with the Welcome toggle on (manual entry was unaffected)
- new RPC set_registration_checked_in(id, bool): admin-only; on un-check,
  deletes the event's 'checkin' points_log rows and applies the negative
  delta via _award_points('admin') so leaderboard + audit stay consistent;
  re-check awards nothing; returns points_removed
- admin Registrations toggle now calls the RPC, refreshes rows and toasts
  the removed points
- supabase/tests/set_registration_checked_in_tests.sql: 15 assertions
2026-10-19 10:35:10 +02:00
Lago 9a6e2e5c2a feat(scan): confirm before welcome check-in, with print warning
The staff scanner checked attendees in silently, and the default session
mode never prints — so a welcome-desk scan could check someone in with no
badge and no confirmation.

- new read-only RPC preview_welcome_checkin(qr): resolves the attendee and
  reports already + will_print (mirrors the exact welcome_checkin enqueue
  condition: first check-in AND a layout exists). Staff/admin only; checks
  nobody in, enqueues nothing.
- attendee Scan screen previews first and shows a Yes/No sheet: "You are
  checking in [Name]. By confirming, you will print this person's label."
  Only Yes runs welcome_checkin. Session check-in unchanged (never prints).
- badge_print_tests.sql +8 assertions (109 total); ScanPage + welcome specs
  drive the confirm step; new CONV-CHECKIN-003 (No cancels, Yes checks in).
- docs: rpcs.md, printing.md, releases/2026-10-19.md.
2026-10-19 09:45:20 +02:00
Lago c980effddc feat(printer): badge print queue, Pi worker, captive-portal setup, admin printing view
- migration 20261018170000: pgmq badge_print/badge_print_dlq, print_stations,
  token-gated printer RPCs (claim/complete/fail/heartbeat), admin RPCs,
  welcome_checkin enqueue; badge_print_tests.sql (101 assertions)
- apps/printer: Python worker (Playwright render -> brother_ql via pyusb),
  comitup captive-portal (Wi-Fi + HTTPS endpoint + anon key + token),
  arm64 image build + idempotent Pi setup/install scripts, 77 pytest
- apps/admin: Printing view, station management/DLQ, global printer status
  pill, Print button on Registrations, standalone print renderer entry
  (print.html -> dist-print) with bundled fonts
- docs: printing.md + architecture/schema/rpcs/tests/admin-app updates,
  apps/printer/AGENT.md operating manual
- e2e: printing.spec.ts
2026-10-18 22:25:38 +02:00
Lago ab25c102dc feat: add per-event badge editor, pretix company import, smart guides
Badge Designer (admin): per-event WYSIWYG badge/PDF layout editor with mm canvas, text/QR/image elements, multi-select, Word+PowerPoint alignment, PowerPoint-style smart guides with snapping, Delete-key, preview and JSON views. Migration 20261015194531_badge_editor (badge_layouts + admin-only save/set-default/delete RPCs).

Company import: migration 20261015200719_events_company adds events.company; the sidecar pretix sync now fetches the organizer display name and stores it (best-effort). Bindable on badges as Company/organizer.

Tests: 15 SQL rollback assertions + 13 mocked browser tests. Docs synced.
2026-10-15 22:25:15 +02:00
Lago 3e2f8ff0ed feat: add admin raffle with confetti and top-3/staff exclusion 2026-10-15 21:39:57 +02:00
Lago 6bad96ca03 feat: add manual feedback AI summaries and secure leaderboard scoring 2026-10-15 19:06:10 +02:00
Lago c0fbf495dc feat: sync GridSmart agendas and use event-relative demo time
Support script and URL sources, automatic Sessionize polling, staff-linked service sessions, chronological agenda blocks, and inline Placeholders. Fix demo mode to use the active event date and document deployed behavior with regression coverage.
2026-10-11 08:39:15 +02:00
Lago 40f24cf5f7 fix: preserve week-long sessions and add profile mascot 2026-10-10 20:40:42 +02:00
Lago 4e71e9b797 feat: finalize ticket merging and speaker-aware imports 2026-10-10 13:28:18 +02:00
Lago 5c93d4a0cb feat: add event-scoped schedule deletion and import date guard 2026-10-10 01:44:40 +02:00
Lago 8d8d3ae4b8 feat: add magic-link admin login and speaker materials portal 2026-10-07 18:27:56 +02:00
Lago 3adc0fd58f Post-event reporting + talk networking incentives
- Talk networking: per-event talk_networking_bonus awarded when two people
  who shared a checked-in talk accept a connection (accept_connection
  re-created, shared_talk flag, get_talk_cohort RPC, points_log category
  check widened); Convivo Networking sub-tab inside the Connect screen
  (Home quick action deep-links in; Connect button reflects existing
  connection state and is disabled for sent/connected/declined); admin
  Events view bonus input (0-10).
- Reports: sidecar POST /export (CSV / multi-sheet XLSX / PDF report via
  new pdfkit dep); APPE Admin Reports view (any event: on-screen summary,
  session feedback summary, top-5, CSV/Excel/PDF downloads); Activity
  session-feedback per-session aggregate header.
- Also carried: @appe.at admin trigger + default password, bulk contact
  delete, session level/area + event-level feedback, agenda level/area
  filters, admin password self-service, schedule level/area fields.
- 18/18 RPC tests; both apps build; exports verified end-to-end.
2026-09-21 22:34:25 +02:00
Lago e4c8815e52 Check-in gate + fixes, RPC test suite, docs
- Convivo: not-checked-in gate for non-staff (see-a-staff screen with QR
  code + logout); lifts automatically once staff checks them in
- Convivo: fix check-in 'pick a session first' race (synchronous default
  session fallback)
- Add RPC test suite (npm run test:rpc): points idempotency, role guards,
  service-session guard, speaker auto-promote, leaderboard staff exclusion
- Fix db:types script (create packages/shared/src); gitignore generated types
- Docs: README/roadmap drift fixes, tests.md, backend README link
2026-09-08 21:05:34 +02:00