Commit Graph
23 Commits
Author SHA1 Message Date
Lago d4e4637e7c feat(sessions): material downloads unlock when the session ends
Private materials bucket + RLS read gate (admins/own speakers anytime, all
attendees after the scheduled slot end, event-local Amsterdam time); always
visible uploaded-state, locked download panel, authenticated client downloads,
admin signed URLs. 12 new assertions in material_time_lock_tests.sql.
2026-10-21 18:57:15 +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 0cb67bcabd feat(convivo): pending-material chip opens the session detail directly
Tapping a session in the red-clip popup only did go('agenda'), leaving the
speaker to hunt for the talk the popup had just named. It now opens the same
SessionDetail sheet "My picks today" uses -- the upload form is inside it, so
one tap reaches the action.

CONV-MATERIAL-005 provisions its own speaker fixture (the old demo speaker died
with the pretix-import reseed), drives the real QR login, and asserts the
upload notice is visible with the home tab still active; mutation-checked by
restoring go('agenda') -- the test fails on the old behavior.
2026-10-19 21:40:56 +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 6bde90aac1 fix(convivo): readable descriptions, no feedback UI on service sessions, no demo-clock badge
Three attendee-app polish items from hands-on testing (Sabrina). All
presentation-layer: no migration, no RPC, no admin/sidecar change.

- Session detail collapsed multi-paragraph descriptions into one block. The
  feed carries real newlines (the sidecar passes Sessionize description through
  untouched), so this was pure CSS: new .sd-desc uses white-space: pre-line.
  The AI feedback summary gets the same via .feedback-review .fr-text.
- Staff saw "Your session feedback" on Break/Lunch cards, because
  _assign_service_session_speakers makes every staff member a speaker of every
  service slot. showFeedback = !isService now gates all three feedback surfaces
  (review block, Give-feedback button, "not checked in" note). The sheet itself
  stays openable for service sessions.
- Removed the "Demo clock" badge from the Home header. The simulated clock is an
  internal demo aid; attendees were never meant to see it. useEvent() still
  exposes clockMode and the admin toggle is unchanged.

Tests: three new API-mocked cases in convivo-admin-entry.spec.ts (service
feedback suppression, multi-line description via pre-line CSS + exact textContent
+ rendered-height comparison, no demo-clock badge per clock mode). 45/45 green
against the local dev server; attendee build clean.

Docs synced: screens.md, app-structure.md, backend/tests.md, next-steps.md, plus
a release record at docs/releases/2026-10-18.md noting that items 1/3/7 of the
report were already shipped (ef0446d, 999527b) and that this change is not yet
deployed.
2026-10-18 18:20:16 +02:00
Lago 999527b188 fix(home): hide the 'No pick yet' nudge once the user has any pick
The Now/Next cards fall back to a concurrent-session list when the user
has no pick for that specific slot, and always appended a 'No pick yet —
tap a session in the Agenda to choose.' hint. With picks on other slots
this contradicted the 'My picks today' list right below (screenshot).
ConcurrentList now takes hasPicks and renders the hint only while the
user has no picks at all.

e2e: two new 'Home session picks' cases (hint hidden with a pick on the
other slot; still shown with none, asserted per card). 43/43 local.
Docs: screens.md nudge rule, tests.md regression note.
2026-10-17 10:36:58 +02:00
Lago 7733af7625 chore(assets): move Manfred originals to assets/manfred, rename by pose
Relocate the four full-resolution mascot source PNGs out of the root
Manfred/ folder into assets/manfred/ (a non-build-context source dir,
like mockup/), renamed from their ChatGPT export names to pose names:
manfred-{waving,confident,coffee,celebrating}.png. git mv preserves
history (all four recorded as renames).

These originals are never shipped (Vite serves only apps/convivo/public/),
so the served 224px WebP poses are untouched and the attendee bundle is
byte-identical. Add assets/manfred/README.md with the pose table and a
regeneration command, and note a pre-existing cosmetic mismatch: the
deployed WebP filenames are rotated relative to their content (harmless —
Profile picks a pose at random and e2e asserts the filename).

Docs: fix the stale Manfred/ pointer in releases/2026-10-10.md and
cross-reference the source dir from frontend/screens.md.
2026-10-16 23:32:57 +02:00
Lago ef0446dcdf fix(convivo): consistent service cards, in-place pick details, no duplicated slot time
- groupAgenda drops orphan service slots (no session row), so every Service Session card consistently shows header + session row; list, slot count and Home Now/Next agree
- Extract the session detail bottom sheet into shared components/SessionDetail.tsx; Home's My-picks chips now open it in place instead of routing to the Agenda (App passes openFeedback so Give-feedback works there too)
- Sheet subtitle shows the slot name only when it adds information: auto-named 'Slot 10:15-11:00' no longer repeats the time range, and service names equal to the session title are skipped
- e2e: orphan-slot test + Home session picks test (exact subtitle assertion) in convivo-admin-entry.spec.ts, 41/41 green; speaker-portal 19/19; docs + release record 2026-10-16.md
2026-10-16 16:11:12 +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 ef0121a3e4 feat: polish speaker material upload control 2026-10-07 19:58:00 +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 a5ad9795ee Service sessions + Home redesign + feedback loop
Service sessions (new slot semantics):
- Sidecar maps isServiceSession OR isPlenumSession -> service_session
  (Excel path also matches 'plenum' in Session Format).
- checkin_attendee rejects service sessions; Scan check-in dropdown
  excludes them.
- New _assign_service_session_speakers helper links every registered
  staff member as a speaker of a service session; both sync RPCs call
  it (and the API sync now actually types slots from is_service_session).
- No material requirement + no mic emoji for service sessions.

Home redesign:
- Now/Next cards show all concurrent sessions as sub-sections when
  there's no pick (1/2/3 sessions -> 1/2/3 sub-sections), with a
  "Nothing scheduled" fallback for empty slots.
- My picks today lists every pick (slot order) + empty state.
- Demo clock EVENT_DATE fixed to 2026-02-20 (matches seed) so a slot
  is live at 10:20.

Feedback loop:
- Attendee pending-feedback pill on Home (checked into an over session,
  not its speaker, no feedback yet); clears on submit.
- Speaker sees rating + AI summary for their own session in the Agenda
  sheet only after it's over.

Migration 20260833000000_service_sessions_feedback.sql. Docs updated.
2026-08-25 08:58:16 +02:00
Lago 1cbbd1b529 Registration optionset + speaker auto-promote + welcome check-in
- registrations.type is now a Postgres ENUM (registration_type)
- session_speakers trigger auto-promotes attendee -> speaker (never overrides staff/sponsor)
- new welcome_checkin RPC: staff marks an attendee present at the event
- admin Registrations: QR token is final (no reset); failed sponsor change opens in-place sponsor lookup
- Convivo Home: Now/Next cards always render; red pending-material pill + popup for speakers
- Convivo Agenda: speakers can delete their material to re-upload
- Convivo Scan: staff Session/Welcome check-in toggle (uiverse switch)
- seed: staff (Bruno/Rita) get a password so staff QR login works after reset
2026-08-23 21:33:44 +02:00
Lago 1bffae9777 Convivo login: staff QR asks for staff password (not email)
When a staff QR is detected, the confirm step now shows a password field
instead of the email field. Login uses the resolved contact's email + the
entered staff password (signInWithPassword). Attendees are unchanged (QR +
ticket email). Docs updated (screens.md, architecture.md).
2026-08-23 19:18:59 +02:00
Lago 698bf13551 Staff exclusions + contact-password auth sync
- contacts.password now auto-syncs to auth.users.encrypted_password via
  trg_contact_password_sync, so setting a password on the contact row in the
  Supabase UI makes it work with signInWithPassword immediately (fixes staff
  like Bruno not being able to log in with a UI-set password). One-time
  reconciliation in the migration.
- Staff excluded from the leaderboard: _sync_leaderboard skips/removes staff
  rows, get_leaderboard() filters type='staff', seed no longer inserts staff.
  Affects the attendee Leaderboard and the admin Dashboard 'Top points'.
- Home/Agenda/Profile identical for all roles: Home quick-action always
  'Scan & connect' (no 'Check-in' relabel), footer role badge removed, tab
  label always 'Scan' (staff keep check-in via the Scan screen mode toggle).
- Profile: removed the duplicate Staff pill (type pill already shows Staff).
- Agenda session sheet: 'Download material' moved to the bottom of the button
  stack with spacing.
- Docs updated (schema, rpcs, seed, screens, architecture, next-steps).
2026-08-23 18:27:01 +02:00
Lago 8b1130f078 Admin password login + attendee profile self-service
- contacts.password: admin-only APPE Admin login password (event-independent);
  must match the bcrypt hash in auth.users.encrypted_password (set in Supabase).
- APPE Admin login is now email + password (was QR token).
- update_my_profile RPC (security definer, scoped to current_email()): attendees
  set their LinkedIn URL + show_email / show_linkedin toggles from the Profile.
- Convivo Profile gains a 'Profile settings' card (LinkedIn + 2 toggles + Save).
- Visibility enforced server-side in the public projection (linkedin nulled when
  show_linkedin off, email omitted when show_email off).
- Seed: admin password appe-admin-2026; staff keep QR tokens as auth passwords.
- Docs updated (schema, rpcs, seed, admin-app, screens, api-client,
  architecture, next-steps, README, docker-compose).
2026-08-23 14:11:26 +02:00
Lago b52d8ab007 Fixes & Refinements: QR token on registration, role caps, connection detail + red dot, admin schedule/sponsors
Datamodel:
- Move qr_token from contacts to registrations (per event); new migration
  20260826000000. lanyard_lookup / create_connection_request / checkin_attendee
  resolve via registrations + active event.
- reset_qr_token -> reset_registration_qr_token (fixes ambiguous 'email' col).
- upsert_contact drops the token arg; create_registration generates + syncs it.
- Pretix sync writes the token to the registration (keeps it on re-sync).

Registration types:
- Distinct pill colors; red reserved for Staff (both apps).
- Roles capitalized everywhere (Attendee/Speaker/Sponsor/Staff); 'Attendee'
  hidden only at the Home footer.
- Reset-token button moved from Contacts to Registrations (per registration).

Sessions (APPE Admin):
- Slot types capitalized; material submitted/not-submitted state.
- Speaker selection = multi-select search dropdown.
- Fix 'a session must have a speaker' on edit (diff-based setSessionSpeakers)
  and the file-upload bug (speaker save no longer aborts first).

APPE Admin:
- Sponsors contact lookup = search field (filter + pick).

Convivo App:
- Other people's QR codes hidden; connection detail sheet shows public info +
  points.
- Connect red dot recalculates immediately on accept/decline/send.
- 'My picks today' = 2 rows (current + next); 'tap to change' links to Agenda.

Docs updated across backend + frontend.
2026-08-23 10:39:21 +02:00
Lago 22f5f1d317 Redesign Phases 3-6: multi-event model, APPE Admin, Convivo App behaviors, APPE branding
- Phase 3: new migration 20260824000000_redesign.sql (contacts/events/registrations/sponsors, slot types, session speakers + feedback/material), seed rewrite
- Phase 4: APPE Admin rebrand + Contacts/Registrations/Sponsors/Schedule/Activity/Events views
- Phase 5: Convivo App (24h login, 5s polling, QR type badge, red dot, speaker material)
- Phase 6: APPE favicon + PWA icons for both apps
- Docs: schema/rpcs/rls/seed/screens/api-client/admin-app/architecture/next-steps/README/roadmap updated
2026-08-23 02:53:16 +02:00
Lago 4abdc7691b docs: add /docs living documentation per AGENT.MD
- docs/README.md: navigation hub
- docs/architecture.md: system overview, tech stack, data flows, ports
- docs/backend/: supabase-core, schema, rpcs, rls, seed, docker
- docs/frontend/: app-structure, screens, api-client
- docs/next-steps.md: Phase 2/3/4 plan + open decisions
- Fix README demo-account emails to match the actual seed
2026-08-22 17:10:50 +02:00