Skip to content

Collector: an unsubscribe page for email written by hand (genclass.dev/unsubscribe) - #262

Merged
MeharPro merged 1 commit into
mainfrom
feat/unsubscribe-page
Nov 20, 2026
Merged

MeharPro merged 1 commit into
mainfrom
feat/unsubscribe-page

Conversation

@MeharPro

Copy link
Copy Markdown
Contributor

What

genclass.dev/unsubscribe: a form with one field, for the email a person at GenClass writes by hand. The link in their signature was a mailto: before.

  • GET /unsubscribe shows the form; POST /unsubscribe (the form, or JSON { email }) saves the address, lower case, in a new table unsubscribes (migration 0024) and shows "You are unsubscribed".
  • The answer is the same for an address already on the list.
  • No sign-in. Nothing is ever sent to the typed address. No account or report setting changes: GenClass reports keep their own signed link (/api/report/unsubscribe).
  • A new address sends one notice to UNSUBSCRIBE_NOTIFY (set in wrangler.toml) through the EMAIL binding, at most 50 a day, so whoever writes that email sees it before writing again.
  • AUTH_LIMIT per network. 400 for something that is not an address; 503 with a contact when the table is missing.
  • New route in wrangler.toml: genclass.dev/unsubscribe*.

Migration number: 0024, because #242 (partner API) uses 0023.

Checks

  • telemetry-worker: npx vitest run, 36 files, 938 tests pass (14 new in test/unsubscribe.test.ts).
  • The three states of the page (form, bad address, done) rendered and looked at in a browser.
  • Not checked: the deployed route and the real notice email. Both need the deploy.

To go live

  1. wrangler d1 migrations apply genclass-dashboard --remote (0024).
  2. Deploy the collector from main.
  3. Point the signature's link at https://genclass.dev/unsubscribe.
  4. The privacy page (site repository) should say that this page keeps the address.

🤖 Generated with Claude Code

…v/unsubscribe)

A form with one field. A post saves the address (lower case) in a new table, unsubscribes (migration 0024), and
answers the same whether or not it was already there. No sign-in; nothing is sent to the typed address; no account
or report setting changes. A new address sends one notice to UNSUBSCRIBE_NOTIFY through the EMAIL binding, at most
50 a day. AUTH_LIMIT per network. The link in a signature was a mailto before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@MeharPro
MeharPro merged commit ee45ac2 into main Nov 20, 2026
4 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