AZ-007 — Account settings and password change

Status

Done

Context

Read README. Settings already has device language/theme controls and is protected by AZ-006. Users/session API and common password policy exist. There is no profile-update or password change operation. This increment gives settings an account purpose without inventing admin/RBAC.

Goal

Deliver a small mobile account page with display-name editing, persisted user preferences and secure password change, preserving explicit device/account preference precedence.

Requirements

Non-goals

No email change/verification, avatar upload, billing/business settings, organization membership, roles/admin screen, other-user editing, invitation/registration, or runtime business branding.

Implementation guidance

Extend Settings and auth/user endpoint modules, application services and concrete repositories; keep networking in API boundary and DTO in Query. Let UI drafts differ from saved settings without globally changing language mid-failed-save. Profile controls use labels/autocomplete, touch targets and field focus from AZ-003. Backend password-operation logic is separate from HTTP/session adapter but coordinates durable hash change and revocation within a real repository transaction capability. Avoid a generic transaction/unit-of-work framework for this one concrete atomic operation.

Acceptance criteria

Verification

pnpm db:generate
pnpm quality
pnpm test
pnpm build
pnpm test:coverage
pnpm validate:docker

Run migration generation only for schema changes. Add frontend preference-merge/unit/RTL tests, backend injection and real transaction tests, and Playwright profile/password-change journeys in both viewport projects. Check 320px, 360×800, tablet/desktop, virtual keyboard and zoom manually. Never change a developer's real credentials as a test; use the dedicated fixture lifecycle.

Documentation

Update OpenAPI, architecture (account/device preference source and password transaction), development (Settings behavior/provisioning recovery), testing (two-user/concurrency cases), current-state/handover. Document unsupported email/admin/business operations explicitly.

Dependencies

AZ-006 and its prerequisites. Password recovery is AZ-010, not required for this increment.

Future considerations

A future business settings area needs ownership and authorization distinct from personal account settings. Static theme brand and personal appearance are not tenant branding.