Skip to content

Add a private community survey with one-per-email sticker codes - #6564

Closed
brsbl wants to merge 60 commits into
mainfrom
web/community-forms
Closed

brsbl wants to merge 60 commits into
mainfrom
web/community-forms

Conversation

@brsbl

@brsbl brsbl commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

getbb.app had no private community survey or sticker claim page. Standalone form pages also lacked the site's shared navigation and footer. This replaces #5543, which was closed automatically for age.

What changed

  • Adds an unlisted /community/survey with up to ten required questions, then a required email.
  • Three questions appear only for matching work answers; hidden answers are discarded on the server.
  • Choosing "Other" turns that row into a text box.
  • Progress is saved in the browser and cleared once the survey is sent.
  • Each finished survey gets one hashed, one-use sticker code, at most one per email.
  • Rate limits key IPv6 clients by their /64 network.
  • Pages are noindex, absent from the sitemap and navigation, and use a nonce-only CSP.
  • Adds migration 0011_community_survey with three unjoined tables.
  • pnpm cloud:dev now generates the site chrome bundle before starting web.
  • docs/community/forms.md documents the submission contract and launch steps.

Collection stays off (COMMUNITY_FORMS_ENABLED=false) until launch review.

How you verified

  • Community web tests pass, including email dedupe and IPv6 key tests (39 tests).
  • Web typecheck passes.
  • Remote CI: pending.
  • Headless Chromium at 1440×900 and 390×844: conditional questions, Other text, progress restore, validation recovery and completion all passed, with no console errors.

BB-Thread-ID: thr_2xnhqqv56h
BB-Thread-ID: thr_yz6t8hi7s8

AGENT GENERATED

brsbl and others added 30 commits October 14, 2026 20:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brsbl and others added 28 commits October 29, 2026 05:19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e, US-only stickers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n style

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes:
- One sticker code per normalized email, and IPv6 rate limits keyed by /64,
  so a script can't drain the pool.
- pnpm cloud:dev generates the site chrome bundle before starting web.
- docs/community/forms.md matches the current questions and rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rkers

- Q2 is role, then bb use at work, then company size.
- Other shows a "Please specify" box below the choices again.
- The organizer note and a no-marketing line are small footnotes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The thank-you page now hands out one unused Shopify discount code per
email as a claim link that opens a $0 checkout with the email filled in.
Codes live in community_gift_code and are loaded outside the repo; the
old 250-slot hashed pool is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rack unsent

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Failed sends keep their claim link so the cron trigger can resend the
same email later; Resend idempotency keys stop duplicate deliveries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e site button

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Recover outbox rows whose request ended before the first attempt.
- Only email finishers who claimed a code, so sends are capped by codes.
- Retry auth errors, block double submits, and say nothing about email
  when none was queued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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