Skip to content

fix: align password change dialogs#969

Merged
perber merged 2 commits into
mainfrom
fix/password-dialogs-and-me-password
May 5, 2026
Merged

fix: align password change dialogs#969
perber merged 2 commits into
mainfrom
fix/password-dialogs-and-me-password

Conversation

@perber

@perber perber commented May 5, 2026

Copy link
Copy Markdown
Owner

Add coverage for the /users/me/password flow and fix the frontend payload shape. Also improve browser autofill behavior across password-related dialogs and add consistent success feedback in user management.

Add coverage for the /users/me/password flow and fix the frontend payload shape. Also improve browser autofill behavior across password-related dialogs and add consistent success feedback in user management.
Copilot AI review requested due to automatic review settings May 5, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the password-change UI flows with the backend API and improves UX for password-related dialogs by standardizing payload shape, adding autofill hints, and providing consistent success feedback. It also adds a backend router test to cover the /api/users/me/password endpoint.

Changes:

  • Fix /api/users/me/password request payload keys to oldPassword/newPassword (matching the backend contract).
  • Add name/autoComplete attributes across user/password dialogs to improve browser/password-manager autofill behavior.
  • Add router test coverage for changing a user’s own password and verifying old-password login fails while new-password login succeeds.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ui/leafwiki-ui/src/lib/api/users.ts Updates changeOwnPassword payload shape to match backend JSON fields.
ui/leafwiki-ui/src/features/users/UserFormDialog.tsx Adds name and autoComplete hints to user create/edit inputs.
ui/leafwiki-ui/src/features/users/ChangePasswordDialog.tsx Adds success toast + autofill-related hidden username field and input attributes.
ui/leafwiki-ui/src/features/users/ChangeOwnPasswordDialog.tsx Adds autofill-related hidden username field and input attributes; adjusts dialog default action behavior.
ui/leafwiki-ui/src/components/FormInput.tsx Extends reusable input component to support name and autoComplete.
internal/http/router_test.go Adds test coverage for /api/users/me/password flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/features/users/ChangePasswordDialog.tsx
Comment thread ui/leafwiki-ui/src/features/users/ChangeOwnPasswordDialog.tsx
Comment thread ui/leafwiki-ui/src/components/FormInput.tsx
Comment thread internal/http/router_test.go
Close open dialogs before using the user toolbar during Playwright cleanup so modal overlays do not block logout clicks in afterEach hooks.
@perber
perber merged commit 428ce7b into main May 5, 2026
5 checks passed
@perber
perber deleted the fix/password-dialogs-and-me-password branch May 5, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants