fix(web): show per-field registration errors and preserve inputs #339

Merged
Claude-Run merged 1 commit from fix/BUNYIP-271-register-field-errors into main 2026-07-04 07:10:50 +02:00
Member

A failed registration submit re-rendered register_card with only the typed email preserved and a single generic banner, so the user lost their input and could not tell which field was wrong. Attribute each failing rule to the field it governs (email / password / confirm) and render the message next to the offending input via a new RegisterErrors struct; an API-side rejection with no clear field attribution still renders as the top banner while the email stays preserved. Passwords are still never echoed into the HTML, and on any rejected submit a hint tells the user to re-enter the (now-cleared) password. The successful-registration path (redirect to /onboarding) is unchanged.

bunyip-web is a bin-only crate, so cargo test --workspace --lib silently skipped its entire suite, meaning the existing auth-page tests and the new registration guards never ran in CI. Switch the CI and justfile test invocations to --all-targets so binary-crate tests actually gate.

#BUNYIP-271

A failed registration submit re-rendered `register_card` with only the typed email preserved and a single generic banner, so the user lost their input and could not tell which field was wrong. Attribute each failing rule to the field it governs (email / password / confirm) and render the message next to the offending input via a new `RegisterErrors` struct; an API-side rejection with no clear field attribution still renders as the top banner while the email stays preserved. Passwords are still never echoed into the HTML, and on any rejected submit a hint tells the user to re-enter the (now-cleared) password. The successful-registration path (redirect to /onboarding) is unchanged. `bunyip-web` is a bin-only crate, so `cargo test --workspace --lib` silently skipped its entire suite, meaning the existing auth-page tests and the new registration guards never ran in CI. Switch the CI and justfile test invocations to `--all-targets` so binary-crate tests actually gate. #BUNYIP-271
fix(web): show per-field registration errors and preserve inputs
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 40s
Check / fmt + clippy + build + tests (pull_request) Successful in 16m34s
Create release / Create release from merged PR (pull_request) Has been skipped
b8806c8eb6
A failed registration submit re-rendered `register_card` with only the typed email preserved and a single generic banner, so the user lost their input and could not tell which field was wrong. Attribute each failing rule to the field it governs (email / password / confirm) and render the message next to the offending input via a new `RegisterErrors` struct; an API-side rejection with no clear field attribution still renders as the top banner while the email stays preserved. Passwords are still never echoed into the HTML, and on any rejected submit a hint tells the user to re-enter the (now-cleared) password. The successful-registration path (redirect to /onboarding) is unchanged.

`bunyip-web` is a bin-only crate, so `cargo test --workspace --lib` silently skipped its entire suite, meaning the existing auth-page tests and the new registration guards never ran in CI. Switch the CI and justfile test invocations to `--all-targets` so binary-crate tests actually gate.

#BUNYIP-271
Claude-Run deleted branch fix/BUNYIP-271-register-field-errors 2026-07-04 07:10:50 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!339
No description provided.