Repository navigation
Make the signup view's requireEmail and sendReminders required - #1143
Conversation
SignupViewBody filled in its own defaults for the two settings, and the reminders one (false) was the opposite of the schema's sendsReminders (true when the key is missing). Every live render already gets both from toSignupViewSignup, so the fields are now required and passed straight through. The home page's showcase card sets them; it never reads them. Fixes #1140. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9STne8cnngC1cj9tcAD
Tophat: passedWhat changes for people: Nothing. The sign-up dialog and the home page's example card look and read the same as before.
No card, since nothing anyone sees changes and nothing on the high-risk list is touched. Ran cfbf232 against 2c037aa locally, Chromium at 1280×900 and 390×844, made-up data. https://claude.ai/code/session_016YZ9SW9wbz4ipqewrnw7B5 Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
requireEmail and sendReminders are now required on SignupViewSignup, the view passes them straight through, and the home card's showcase literal sets both. Every item in #1140's outline and "Done when" is done: grep -rn "requireEmail ??\|sendReminders ??" src finds nothing, Required<> is gone, and no test passes undefined. The only live caller, toSignupViewSignup, already set both, so pages render the same. The shared test SIGNUP gaining sendReminders: true changes no test, because the help line that reads it only shows when email is optional, and emailHelp always sets it.
Blocking (0)
Optional (0)
Earlier threads: none
Checks: CI green on cfbf232 (lint-type-test, e2e, CodeQL). The tophat passed on this SHA.
Not UX and not high-risk, so it goes straight to merge.
https://claude.ai/code/session_016YZ9SW9wbz4ipqewrnw7B5
Generated by Claude Code
Fixes #1140.
Session: https://claude.ai/code/session_016YZ9STne8cnngC1cj9tcAD
The problem
SignupViewSignupmarkedrequireEmailandsendRemindersas optional, andSignupViewBodyfilled them in with?? trueand?? false. No live render ever reached those fallbacks:toSignupViewSignupalways sets both from the signup's settings. They were a second copy of the settings defaults, and the reminders one (false) was the opposite ofsendsReminders, which returnstruewhen the key is missing. The home page's showcase card was the only reason the fields were optional.The fix
src/app/s/[slug]/signup-view-types.ts: both fields are now required, with one comment sayingtoSignupViewSignupfills them.src/app/s/[slug]/public-signup.ts:toSignupViewSignupreturnsSignupViewSignup, becauseRequired<>is now redundant.src/app/s/[slug]/signup-view.tsx: passes both values straight through, without??.src/app/(site)/_components/HomeExampleCard.tsx: the showcase literal sets both totrue, with a note that showcase mode never reads them. The card's markup doesn't change.Nothing anyone sees changes, so this has no CHANGELOG entry.
Tests
signup-view.test.tsx: the sharedSIGNUPnow carriesrequireEmail: true, sendReminders: true. The Trip literal spreadsSIGNUP.emailHelptakes aboolean. Theundefinedreminders case is gone, since no real page can pass one.grep -rn "requireEmail ??\|sendReminders ??" srcfinds nothing.pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test(252 files, 3887 tests), pluspnpm build && pnpm budgets, with every page within its budget.Generated by Claude Code