feat(vote): let Sympla buyers log in with ticket number and email - #63
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the four moderate findings involving cancellation verification, admin warnings and drill-down filtering, and the canonical Sympla purchase link.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds Sympla ticket-number/email authentication for voting while preserving Guild.host login and excluding cancelled tickets from admin tallies.
Changes:
- Added Sympla validation, sessions, persistence, and cancellation handling.
- Updated voting UI, navigation, translations, and invite flow.
- Extended tests, schema, configuration, and documentation.
| File | Summary |
|---|---|
TODO.md |
Sympla deployment and testing notes |
test/server/routes/vote.test.ts |
Voting-window tests |
test/server/routes/sympla.test.ts |
Sympla authentication tests |
test/server/routes/admin.test.ts |
Admin response tests |
test/server/routes/admin-sympla.test.ts |
Cancellation filtering tests |
test/server/routes/admin-roster.test.ts |
Sympla roster tests |
src/website/scss/pages/voting.scss |
Voting login styling |
src/website/pages/vote/index.tsx |
Dual login UI and invite |
src/website/configs/definitions.ts |
Guild invite configuration |
src/website/components/_partial/AuthButton.tsx |
Navbar routing |
src/server/types.ts |
Sympla environment typing |
src/server/routes/vote.ts |
Vote deadline and session data |
src/server/routes/auth.ts |
Sympla authentication endpoint |
src/server/routes/admin.ts |
Cancellation-aware admin data |
src/server/routes.ts |
Route registration |
src/server/repositories/vote.ts |
Cancelled-voter filtering |
src/server/repositories/sympla.ts |
Sympla login persistence |
src/server/index.ts |
Worker route dispatch |
src/server/helpers/sympla.ts |
Sympla API integration |
src/server/helpers/session.ts |
Session-cookie helper |
src/server/configs/vote.ts |
Voting deadline |
src/server/configs/sympla.ts |
Sympla constants |
resources/schema.sql |
Sympla voter table |
i18n/pt-BR/code.json |
Portuguese translations |
i18n/es-419/code.json |
Spanish translations |
i18n/en-US/code.json |
English translations |
DEVELOPMENT.md |
Architecture and operations documentation |
.dev.vars.example |
Sympla token configuration |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| votes: row.votes, | ||
| })), | ||
| total: talks.reduce((sum, row) => sum + row.votes, 0), | ||
| symplaChecked: cancelled !== null, |
| name: attendee?.name ?? null, | ||
| tier, | ||
| budget: tier ? (budgets.get(tier) ?? 1) : 1, | ||
| ...voterIdentity(userId, roster, budgets), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

We had problems with Stripe and moved ticket sales to Sympla, which left voting with a problem: people who buy on Sympla most likely don't have a guild.host account, and we can't create one for them.
So
/votenow asks how you bought your ticket and shows both ways in side by side. Guild buyers log in like before, Sympla buyers put their ticket number and the email on the ticket, we check it against Sympla and they get one vote. The ticket number works with or without dashes, since the PDF prints it without them. The navbar "Entrar" button now goes to this page instead of straight to guild.I tested it with a real Sympla ticket and it turns out the API doesn't match the docs in a few places: it wants the event hash instead of the number in the public URL, approved orders come back as
APPROVED, and unknown tickets answer 404. That's all handled now. I also cancelled my ticket to see what happens, the login gets blocked, and the admin dashboard now leaves cancelled tickets out of the count, so a vote cast before a cancellation or refund doesn't count either.Every Sympla login is saved with its email so later we can backfill and tie those votes to guild accounts. At the end of the ballot Sympla voters get an invite to follow NodeBR on guild.host, and the dashboard shows them as the "Sympla" tier.
Also, voting is open until the end of November 1st, the vote tests no longer depend on the real clock, and the prod D1 command in
TODO.mdnow uses the database UUID, the name doesn't work. The table is already created in prod.