Skip to content

Release: winner prize emails + email diagnostics + test-submit allowlist + defer-sign gate#176

Merged
sacha-l merged 3 commits into
mainfrom
develop
Jun 13, 2026
Merged

Release: winner prize emails + email diagnostics + test-submit allowlist + defer-sign gate#176
sacha-l merged 3 commits into
mainfrom
develop

Conversation

@sacha-l

@sacha-l sacha-l commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Promotes develop to main to deploy the post-launch judging fixes (PR #175 + the recovered defer-sign gate).

Included

  • Winner prize emails: publishing results emails each winner their prize + collection note (reply-to enabled). Deduped via prize_notified_at so republish never double-sends.
  • Email-error diagnostics: the program-admin invite surfaces the real Resend reason (send_failed: <reason>) instead of a generic message.
  • SUBMIT_TEST_EMAILS allowlist: lets specific emails bypass the checked-in (Luma) gate on the public submit form (off by default).
  • Defer-sign gate ("LOAD ADMIN DATA"): recovered — it was stranded off feat(programs): fresh-signature gate on payouts/results + PAID toggle; relax program edit #173 and never reached main.

⚠️ Deploy prerequisites (do with this merge)

  • Apply the migration to prod Supabase: supabase db push (adds prize_notified_at). The winner-email query needs it.
  • Railway: set SUBMIT_TEST_EMAILS=sacha@joinwebzero.com; optional PRIZE_CONTACT_EMAIL.
  • Resend: RESEND_FROM_EMAIL must be @stadium.joinwebzero.com (DNS/DKIM verified ✓) and the domain shown Verified — the real unblock for all outbound email.

Verification

Server 396 passed; client build + lint clean. Email paths are unit-tested here and verified end-to-end on prod (mock previews can't send email).

🤖 Generated with Claude Code

sacha-l added 3 commits June 13, 2026 21:14
Viewing an admin program page auto-mounted the stats/admins/judging/signups
sections, each of which signs an admin-action message on load — so just
*viewing* a program popped a wallet signature (and on mock previews, where
/api/admin/session can't mint the cached bearer, every navigation re-prompted).

Gate the wallet-admin sections behind a 'LOAD ADMIN DATA' control: viewing the
program needs no signature; clicking it mounts the sections, whose concurrent
loads dedup to a single wallet popup. Email-admin path unchanged (no popup).
…-submit allowlist

Part 3 (headline): when results are published, each winning submission (one with
a prize) that hasn't been notified gets an email from Stadium with the prize and
a note that the team will reach out to arrange collection (Bitrefill giftcards
are off-chain). New prize-award template + prize-award.service (best-effort,
transient, mirrors the invite/confirmation services), triggered fire-and-forget
in setResultsPublished on publish. A new prize_notified_at column makes
unpublish/republish a no-op for already-emailed winners; a failed send leaves it
unset so a later publish retries. Adds replyTo support to the email transport
(PRIZE_CONTACT_EMAIL, defaults to RESEND_FROM_EMAIL).

Part 1 (diagnostics): the program-admin invite now surfaces the real Resend
error (send_failed: <reason>) instead of a bare send_failed, so a misconfigured
sender domain is diagnosable from the UI (admin-only action).

Part 2 (testing): SUBMIT_TEST_EMAILS env allowlist lets specific emails bypass
the checked-in (Luma signup) gate on the public submit form; off by default,
case-insensitive. Such submissions stay flagged eligible:false.

Migration 20260613000000 is additive/nullable (apply to prod before deploy).
Server suite green (396).
…fixes

feat(judging): winner prize emails + email-error diagnostics + test-submit allowlist
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment Jun 13, 2026 8:55pm

@sacha-l

sacha-l commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Pre-merge checklist status

  • Migration applied to prod Supabasesupabase db push ran; 20260613000000_program_submission_prize_notified now shows on Remote. ✅
  • Railway: set SUBMIT_TEST_EMAILS=sacha@joinwebzero.com (+ optional PRIZE_CONTACT_EMAIL). Read per-request, so it can be set right after merge.
  • Resend: confirm RESEND_FROM_EMAIL is an address on @stadium.joinwebzero.com (DNS/DKIM verified). The real unblock for invites + winner emails.

Code: server 396 passed, client build + lint clean, Vercel preview passed, no conflicts. Good to merge — the two open items are Railway settings, not code.

Note: the "checked-in guest list" error sacha hit is the server's hard gate; the SUBMIT_TEST_EMAILS bypass only takes effect once this is merged (prod is still on #174) and the env var is set.

@sacha-l sacha-l merged commit a032690 into main Jun 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant