Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Sign-up errors can show participants the server's English text

Aperta
#631 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Read src/app/s/[slug]/participant-error.ts, src/services/commitments.ts, src/lib/errors.ts and src/lib/api-response.ts; first trace how error codes and details reach the signup dialog and edit form. Then map server errors to reasons and catalog messages while preserving the API's English message and suggestion. Done means every participant error has English and Swedish catalog text, with the listed checks and database tests passing.

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

Descrizione

enhancement pipeline:proposed pipeline:ux

Needs your OK: this makes every error a participant can see come from the catalog, picked by error code, instead of from the server's English. Swap pipeline:proposed for pipeline:ready to have it built.

What happens

src/app/s/[slug]/participant-error.ts maps most error codes to its own copy, but some server text still reaches the screen word for word:

  • Missing email. "Email is required for this signup." / "Add your email and try again." (src/services/commitments.ts).
  • Zod's defaults. "Invalid email" and "Number must be less than or equal to 999", with a suggestion built in src/lib/errors.ts (`Check the value of "${path}".`).
  • The edit page shows rate_limited "too many requests", forbidden "invalid edit token" and conflict "commitment is not active".
  • Fallbacks typed in the client: 'save failed', 'cancel failed', 'something went wrong' and 'network error'.

Fix, in outline

  • Add a details.reason where a code is too coarse: email_required, email_invalid, quantity_too_large, and whatever the edit page needs.
  • Map Zod issues by field and issue code to reasons on the server, rather than passing issue.message through.
  • Map code plus reason to catalog messages in the dialog and the edit form, and make the client fallbacks messages too.
  • Keep the API's message and suggestion in English for API callers.

Watch for

  • The error shape is shared. src/lib/api-response.ts also serves the MCP tools, so adding details.reason mustn't change existing fields.
  • Tests that pin today's English messages will need updating where the participant now sees catalog text.

Order

After #629, because the participant catalog and the translator-taking helpers come from it.

Done when

  • Every error path in the sign-up dialog and the edit form renders catalog text, in English and Swedish (unit tests per code and reason).
  • No server message reaches the participant's screen.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test and pnpm test:db pass.

Planned with the owner in https://claude.ai/code/session_01EFKmj716ZY3b3SwR8TV8Y2 and checked against the code on main at 35288fa. The full plan is private to the owner's account: https://claude.ai/artifact/VgQH6U2s2EVx3LX991fJi8 (a Claude session on that account can open it with the Artifact tool's read action). This is step 1.3 there.

Lingua principale
TypeScript
Stelle
19
Fork
4
Merge medio
21h 3m
PR unite (30g)
176

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.