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

Abierto
#785 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@ShahadatTest ya está trabajando en esto.

Desde el 3/11/2026.

  • #788 de @ShahadatTest — abierto
  • #811 de @dafeiyupola — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
nextjs, typescript
Área
backend, frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
19
Forks
4
Merge medio
19 h 27 min
PR fusionados (30 d)
199

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de richshaw/OpenSignup

Todos los issues de richshaw/OpenSignup

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.