Repository navigation
Conversation
A new address on the newsletter or the FTW box waitlist now posts one line to the incoming webhook in the SIGNUP_WEBHOOK_URL secret: the list, the country and both totals. The address itself stays in D1, so the privacy notice holds. Slack reads the text field and Discord reads content, so one webhook URL of either kind works. The insert now tells a new address from a repeat: a repeat updates country and consent and sends nothing. The notice runs after the answer through waitUntil, and a failing webhook is logged, never shown to the visitor. Without the secret nothing is sent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying ftw with
|
| Latest commit: |
694ec54
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9cc00e7a.ftw-613.pages.dev |
| Branch Preview URL: | https://web-signup-notices.ftw-613.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
miravoss26
reviewed
Nov 5, 2026
miravoss26
left a comment
There was a problem hiding this comment.
Posts a one-line notice to a Slack/Discord webhook (SIGNUP_WEBHOOK_URL) when a new address joins a list. CI green.
Looks good. Security screen:
- The notice carries list, country and totals only. Test asserts no
@in the payload, so addresses stay in D1 as the privacy notice says. - New outbound host is whatever the secret points to, set by the operator, not from request input. No SSRF surface.
- Webhook runs via
ctx.waitUntiland failures are caught, so a bad webhook can't break the form or leak an error to the client. ON CONFLICT DO NOTHING+ follow-upUPDATEkeeps repeat sign-ups silent and the response identical for new and known addresses.
Small nit, optional: the COUNT(*) per sign-up is fine at this volume, just worth remembering if the list gets big. Safe to merge from my read.
This was referenced Nov 28, 2026
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.
Problem
Fredrik wants to hear about every newsletter and FTW box waitlist sign-up without querying D1 by hand.
What changes
SIGNUP_WEBHOOK_URLsecret, for example:New sign-up: FTW box waitlist (SE) · Waitlist 12 · Newsletter 40.textand Discord readscontent, and the worker sends both, so a webhook URL of either kind works.waitUntil. A failing webhook is logged and never reaches the visitor.cf d1 query.To turn it on
ftwunder Settings → Variables and Secrets, as a secret namedSIGNUP_WEBHOOK_URL, for Production.Evidence
node --test tests/*.test.mjs: 36 passed, 0 failed.@anywhere in it🤖 Generated with Claude Code