Sub-Task #119
Updated by Bricklou 22 days ago
Technical specification of the profile settings page.
Page (`settings/profile`, replaces the placeholder):
* Two separate forms in two cards, so one failure never loses the other's input: the username, and the email address.
* The username form submits `PUT /api/v1/me/profile`. The shared user state is refreshed from the response.
* The email form asks for the new address and the current password, and for the authenticator code only when the account has an authenticator app. It submits `POST /api/v1/me/email-change`.
* Server refusals show on the field they belong to: taken or invalid username, wrong password, wrong code, address already used.
* A pending email change shows as a banner: the new address, what it still waits for, and a cancel button.
* An account managed by a login provider shows one notice at the top of the page, and every field is disabled.
Public pages (`verify-email-change`, `approve-email-change`, `cancel-email-change`):
* Each reads its token from the URL fragment, posts it once and shows the outcome (applied, waiting for the other address, cancelled, expired).
Only design-system classes and tokens, no inline style, Lucide icons only.
Acceptance criteria:
* [x] Both forms work and show server errors on their field.
* [x] The pending change shows its state and can be cancelled.
* [x] A provider-managed account sees one notice and disabled fields.
* [x] The three link pages show their outcome.
* [x] Every behaviour is covered by a browser test.