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).
This commit is contained in:
lago committed 2026-10-20 22:15:29 +02:00
1 parent b7c2abb73b
commit 35b88d50ca
22 files changed
+809 -166

No files matched your search

+3 -2
View File
@@ -43,7 +43,9 @@ export function Dashboard({ onNavigate }: { onNavigate: (v: View) => void }) {
if (cancelledRef.current) return;
setContacts(c);
setCheckins(ck.filter((x) => x.event_id === ev.id));
setConnections(conn.filter((x) => x.event_id === ev.id));
// `auto` rows are the staff auto-pairings (migration 20261020120000):
// background bookkeeping, not real activity — keep them out of the feed.
setConnections(conn.filter((x) => x.event_id === ev.id && !x.auto));
setFeedback(f.filter((x) => x.event_id === ev.id));
setLb(l.filter((x) => x.event_id === ev.id));
setLoaded(true);
@@ -172,7 +174,6 @@ export function Dashboard({ onNavigate }: { onNavigate: (v: View) => void }) {
<Avatar name={r.full_name} id={r.contact_email} size={36} fs={13} />
<div className="grow">
<div style={{ fontWeight: 700, fontSize: 14 }}>{r.full_name}</div>
<div className="muted small">{r.contact_email}</div>
</div>
<span className="pts">{r.points}</span>
</div>