feat: Add actionable account controls to Settings page#1964
Open
fennhelloworld wants to merge 2 commits into
Open
feat: Add actionable account controls to Settings page#1964fennhelloworld wants to merge 2 commits into
fennhelloworld wants to merge 2 commits into
Conversation
…abs#1810) - Add Change Password section with current/new/confirm password fields - Add Update Profile section with name, email, and bio fields - Add Delete Account section with confirmation dialog and password verify - Add backend API endpoints: PUT /api/settings/password, PUT /api/settings/profile, DELETE /api/settings/account - All settings routes protected by authMiddleware - Zod validation for all request payloads - Style consistent with existing dark theme - Add Settings link to Navigation Closes SecureBananaLabs#1810
…e auth/validation tests - Wrap all 3 settings controller handlers in try/catch for ZodError - Return 400 with validation message instead of unhandled rejection - Add test suite for all settings endpoints: auth (401), valid requests (200), password mismatch, missing password, short password validation
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
Closes #1810 — Settings page should provide actionable account controls.
Problem
The Settings page was a placeholder with only a heading and a sentence. No actual controls were available for users to manage their account.
Changes
Frontend (
apps/web)apps/web/app/settings/page.tsxas a full client component with three sections:Navigation.tsxBackend (
apps/api)PUT /api/settings/password— change password (auth-protected)PUT /api/settings/profile— update profile fields (auth-protected)DELETE /api/settings/account— delete account with password confirmation (auth-protected)settingsController.js,settingsService.js,settingsRoutes.js,validators/settings.jsauthMiddlewareenforced on all routesapp.jsunder/api/settingsSecurity Considerations
authMiddleware)Testing
next buildcompletes successfully with no TypeScript errors/settings(static) ✅