feat: profile edit page (password change)#16
Merged
Conversation
Adds GET /profile (app.profile.edit) and PUT /profile (app.profile.update) routes under auth middleware, with ProfileController stub and Profile/Edit page placeholder. Update tests confirm guest redirect and authenticated render. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a top-level
/profilepage where the logged-in user views their name & email (read-only) and changes their password. Wires up the previously dead Profile entry in the user menu.GET /profile(app.profile.edit) andPUT /profile(app.profile.update),auth-only, not project-scoped (noProjectBindingMiddleware).ProfileControllerreadsauth()->user();updatevalidates viaProfileUpdateRequest(current_password+passwordmin:8confirmed) and relies on theUsermodel'shashedcast.ProfileLayout(logo + Back link to/);Profile/Edit.tsxmirrors theAdmin/Users/Editstyling, shows read-only name/email, field errors, and a success banner.Testing
ddev php artisan test --filter=ProfileTest→ 6 passed (27 assertions): guest redirect, authenticated render, happy-path change (Hash::check), wrong current password, mismatched confirmation, too-short password.ddev npm run build→ clean (tsc + Vite, zero errors).Notes / follow-ups (non-blocking)
AuthenticateSessionisn't enabled app-wide — standard Laravel default, matchesAdmin/Users/Edit). Deliberate follow-up if "log out other sessions" is wanted.<label>/<input>(nohtmlFor/id), matching the existingAdmin/Users/Editpattern — candidate for a repo-wide a11y pass.🤖 Generated with Claude Code