fix(resend): keep a rejected resend submission on the resend view #239
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web!239
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "work/140"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Posting a malformed username to the resend form redirected to
?status=input, and that status rendered the main sign-up form. The visitor was silently moved to a different task.Root cause is wider than the title.
resend-setup-link.tsreused the literal status stringscaptcha,error,inputandratelimitedfromsignup.ts. Both endpoints redirect to the same page, soshowResendcould not tell a rejected resend from a rejected sign-up. All four fell through to the sign-up form, not justinput.Fix: the resend endpoint gets its own prefixed status values, and the list lives in one place so the form, the route and the step indicator cannot drift apart.
src/lib/resend.ts:RESEND_VIEW_STATUSESandisResendViewStatus().src/pages/api/resend-setup-link.ts:Statusderived from that list; the four redirects renamed.sentwas already unique and is unchanged.src/components/signup-form.astro:showResendusesisResendViewStatus(). Four error notices added, three reusing existing sign-up strings, one new.aria-invalidandaria-describedbywired on the resend identifier field and the resend captcha widget, mirroring the username field.src/lib/signup-steps.ts: a rejected resend keeps step 2 current. The visitor never left it.signup.resend.error.invalidin both languages.Tests:
isResendViewStatuscoverage including proof it does not match sign-up's same-named statuses, step-indicator coverage for the rejected-resend statuses, and updatedLocationexpectations in the route test.Minor version bump: new user-facing copy in two languages.
Verified:
pnpm lint,pnpm check,pnpm test(365 passed),pnpm lang-checkall pass.Closes #140