GRI-2105: Users > Edit can set a new password (panel half of #226) #258

Merged
vivy merged 3 commits from feature/GRI-2105-set-password-ui into dev 2026-11-15 22:55:06 +00:00
Member

The panel half of signage #226. The server half is #256 (Nyssa).

Merge #256 first. Today's UpdateUserRequest has no deny_unknown_fields, so a server without #256 silently drops password. The panel would then report "New password set" when nothing changed.

What it does:

  • Users > Edit gets a "Set new password" section: New password and Repeat new password. If both are empty, the password stays as it is and no password field is sent.
  • Refused in the panel before any request: the two fields differ ("do not match"), or the password is under 8 characters (the same rule as create, and the same rule #256 applies on the server).
  • When it succeeds, the edit form closes and a status line says the password was set and the user is signed out everywhere (#256 ends all their sessions).
  • UpdateUserForm.password is sent as password on PATCH /users/{id}. The mock enforces the same weak_password rule.

Tests: four acceptance tests in UsersScreen.test.tsx, committed on their own before the code (93622df): set, mismatch, too short, empty leaves it alone. ./scripts/local-gates.sh --frontend-only passed every gate (prettier, oxlint, tsc, vitest, build).

The panel half of signage #226. The server half is #256 (Nyssa). **Merge #256 first.** Today's `UpdateUserRequest` has no `deny_unknown_fields`, so a server without #256 silently drops `password`. The panel would then report "New password set" when nothing changed. What it does: - Users > Edit gets a "Set new password" section: **New password** and **Repeat new password**. If both are empty, the password stays as it is and no `password` field is sent. - Refused in the panel before any request: the two fields differ ("do not match"), or the password is under 8 characters (the same rule as create, and the same rule #256 applies on the server). - When it succeeds, the edit form closes and a status line says the password was set and the user is signed out everywhere (#256 ends all their sessions). - `UpdateUserForm.password` is sent as `password` on `PATCH /users/{id}`. The mock enforces the same `weak_password` rule. Tests: four acceptance tests in `UsersScreen.test.tsx`, committed on their own before the code (93622df): set, mismatch, too short, empty leaves it alone. `./scripts/local-gates.sh --frontend-only` passed every gate (prettier, oxlint, tsc, vitest, build).
GRI-2105: Users > Edit can set a new password, typed twice
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 9s
CI / cargo fmt (pull_request) Successful in 6s
CI / cargo deny (pull_request) Successful in 20s
CI / cargo deny advisories (pull_request) Successful in 25s
CI / cargo clippy (pull_request) Successful in 1m37s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m9s
CI / cargo test (pull_request) Successful in 3m54s
CI / CI (pull_request) Successful in 2s
CI / Notify gate failed (pull_request) Has been skipped
9fc4978732
vivy approved these changes 2026-11-15 21:45:07 +00:00
Dismissed
vivy left a comment

Correct. Both-empty keeps the password, mismatch and <8 refused client-side, notice says the user is signed out. Depends on #256 (server PATCH password); merges right after #256.

Correct. Both-empty keeps the password, mismatch and <8 refused client-side, notice says the user is signed out. Depends on #256 (server PATCH password); merges right after #256.
vivy approved these changes 2026-11-15 21:47:04 +00:00
Dismissed
vivy left a comment

CI is green on 9fc49787. I read the code in the last pass and found nothing to change. Approved. It merges after #256 (the server half), one per CI cycle.

CI is green on 9fc49787. I read the code in the last pass and found nothing to change. Approved. It merges after #256 (the server half), one per CI cycle.
Merge branch 'dev' into feature/GRI-2105-set-password-ui
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 9s
CI / cargo fmt (pull_request) Successful in 5s
CI / cargo deny (pull_request) Successful in 20s
CI / cargo deny advisories (pull_request) Successful in 23s
CI / cargo clippy (pull_request) Successful in 1m35s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m7s
CI / cargo test (pull_request) Successful in 2m44s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
0a8516c96e
vivy dismissed vivy's review 2026-11-15 22:34:05 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

vivy merged commit e0f6e21174 into dev 2026-11-15 22:55:06 +00:00
vivy deleted branch feature/GRI-2105-set-password-ui 2026-11-15 22:55:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
Grimoirix/grimoire-of-digital-signage!258
No description provided.