[PR #333] [CLOSED] Update user Email Address #327

Closed
opened 2026-06-06 22:10:14 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/pentagi/pull/333
Author: @Akalanka1337
Created: 6/4/2026
Status: Closed

Base: mainHead: aka-update-ui-user-email-address


📝 Commits (1)

  • 619d902 Update user Email Address

📊 Changes

7 files changed (+185 additions, -20 deletions)

View changed files

📝 backend/pkg/server/models/users.go (+1 -0)
📝 backend/pkg/server/response/errors.go (+1 -0)
📝 backend/pkg/server/response/http_test.go (+1 -0)
📝 backend/pkg/server/services/users.go (+29 -4)
📝 backend/pkg/server/services/users_test.go (+75 -0)
📝 frontend/src/components/layouts/main-sidebar.tsx (+9 -10)
📝 frontend/src/features/authentication/password-change-form.tsx (+69 -6)

📄 Description

This PR adds support for local users to update their profile email address from the Web UI.

Changes

  • Renamed the sidebar action from Change Password to Profile.
  • Added an editable email field to the profile form.
  • Sends the updated email address to the backend only when it has changed.
  • Normalizes email input by trimming whitespace and converting it to lowercase.
  • Refreshes the current user info after a successful profile update.
  • Added backend validation for the optional email field.
  • Added duplicate email detection with a 409 Conflict response.
  • Added tests for successful email update and duplicate email handling.

Motivation

Local users were able to change their password, but not update the email address associated with their profile. This improves account/profile management from the Web UI.

Testing

Added backend tests for:

  • Updating the current user's email address successfully.
  • Preventing email updates when the new email is already used by another user.

I am happy to make any changes requested during review. , Thank You!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/pentagi/pull/333 **Author:** [@Akalanka1337](https://github.com/Akalanka1337) **Created:** 6/4/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `aka-update-ui-user-email-address` --- ### 📝 Commits (1) - [`619d902`](https://github.com/vxcontrol/pentagi/commit/619d9024d763ab5b109d5f25624b7d82dc8bf20d) Update user Email Address ### 📊 Changes **7 files changed** (+185 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `backend/pkg/server/models/users.go` (+1 -0) 📝 `backend/pkg/server/response/errors.go` (+1 -0) 📝 `backend/pkg/server/response/http_test.go` (+1 -0) 📝 `backend/pkg/server/services/users.go` (+29 -4) 📝 `backend/pkg/server/services/users_test.go` (+75 -0) 📝 `frontend/src/components/layouts/main-sidebar.tsx` (+9 -10) 📝 `frontend/src/features/authentication/password-change-form.tsx` (+69 -6) </details> ### 📄 Description This PR adds support for local users to update their profile email address from the Web UI. ## Changes * Renamed the sidebar action from **Change Password** to **Profile**. * Added an editable email field to the profile form. * Sends the updated email address to the backend only when it has changed. * Normalizes email input by trimming whitespace and converting it to lowercase. * Refreshes the current user info after a successful profile update. * Added backend validation for the optional email field. * Added duplicate email detection with a `409 Conflict` response. * Added tests for successful email update and duplicate email handling. ## Motivation Local users were able to change their password, but not update the email address associated with their profile. This improves account/profile management from the Web UI. ## Testing Added backend tests for: * Updating the current user's email address successfully. * Preventing email updates when the new email is already used by another user. **I am happy to make any changes requested during review. , Thank You!** --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:10:14 -04:00
yindo closed this issue 2026-06-06 22:10:14 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#327