Contact page: a public contact form with Turnstile, email confirmation and admin review #329
Intentwhat this change is meant to do
Give people who aren't signed in a safe way to reach the team, and give site administrators one place to read, answer and sort what they send.
test-bot merged commit bc4d1ba into main
Pull request successfully merged and closed
test-bot merged bc4d1ba into main
Sign in to join the conversation.
Requested by Can · project thread
#What this changes
A public contact form at
/contact, for people who aren't signed in (and those who are), and a Contact messages page in Site administration to read and manage what arrives.?topic=presspreselects a topic. Signed-in people skip the email field (their account's address is used), Turnstile and confirmation.RL_AUTHper minute, daily limits (10 per network, 3 emails per address, 300 emails in total; 20 per signed-in person), at most 5 links, strict lengths, control and bidi characters stripped, plain text everywhere./settings/admin/contacthas New, Handled, Spam, Unconfirmed and All tabs, search, Reply by email, Mark handled, Spam, Reopen, a note for the other admins, and Delete. While an address has a message marked spam, its new messages are dropped silently.GET/PATCH/DELETE /api/v3/diffinery/admin/contact[/{id}], site administrators only (404 for everyone else)./contact/confirmis noindex and disallowed in robots.txt.contactis a reserved login.contact_messages,contact_attempts), claimed in the migration registry.#How it was tested
pnpm -r typecheckand the unit tests pass (newtest/unit/contact.test.ts: validation, opt-in, limits, spam blocking, admin changes, audit, retention).test/e2e/contact.test.mjspasses locally onwrangler dev(7 tests: links and SEO, the visitor flow with hostile input, signed-in flow, bots and oversized bodies, admin-only access, handle/spam/reopen/note/delete with audit, daily limits).#Checklist
pnpm -r typecheckandpnpm -r testpassapps/diffinery/docsapps/diffinery/migrations🤖 Generated with Claude Code
https://claude.ai/code/session_017TYj8AD92uS2DjQVGd59Fi