A failed "Turn reminders back on" reloads the page with no error

Aperta
#785 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ShahadatTest ci sta già lavorando.

Dal 3/11/2026.

  • #788 di @ShahadatTest — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
nextjs, typescript
Ambito
backend, frontend

Direzione di ricerca

Start in src/app/s/[slug]/unsubscribe/page.tsx, where the opted-out branch of UnsubscribePage ignores the error param, then check src/app/api/public/reminder-optout/route.ts for the redirect with error=1. Open pull request #788 already targets this, so review it before starting. Done means the opted-out branch shows the existing error message when error is set, with page and route tests added and the listed pnpm checks passing.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug good first issue

What happens

On the reminders page (src/app/s/[slug]/unsubscribe/page.tsx), a participant who has turned reminders off sees "Reminders are off" and a "Turn reminders back on" button. That button posts action=start to src/app/api/public/reminder-optout/route.ts.

If the request fails, the route sends the participant back to the same page with error=1. A failure is a refusal from optInToReminders, the per-IP rate limit, or any thrown error.

UnsubscribePage reads error, but only the opted-in branch shows "That didn't work — nothing has changed. Try again below." The opted-out branch only looks at done. After a failed opt-in the participant is still opted out, so the page looks exactly as it did before the click. They can't tell the click did nothing, and they keep getting no reminders.

Turning reminders off already shows the error. Only turning them back on doesn't.

Fix, in outline

  • Show the same FormError in the opted-out branch when error is set, or move it into the shared Shell so both branches have it.

Watch for

  • Wording. Use the same wording as the existing message. Don't write a new one.
  • Existing route test. route.db.test.ts covers error=1 for opting out only.

Done when

  • A page test: rendering the opted-out branch with error: '1' shows the error message, and without it doesn't.
  • A route test: a failed action=start from the confirm page redirects with error=1.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test and pnpm test:db pass.

Found by the pipeline's bugs scout in the participant's reminder opt-out path (src/app/s/[slug]/unsubscribe, src/app/api/public/reminder-optout), at 8e63fab. Checked by an independent verifier: a page render with optedOut: true and error: '1' was identical to one without the error, and route tests showed both a rate limit and a refused opt-in redirect with error=1. https://claude.ai/code/session_016YZ9SUw2vvaNxfSUsArR5B

Held back by the scout's cap. Add pipeline:ready to queue it.

Lingua principale
TypeScript
Stelle
19
Fork
4
Merge medio
19h 46m
PR unite (30g)
194

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di richshaw/OpenSignup

Tutte le issue di richshaw/OpenSignup

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.