Skip to content

Nirali user management clear data#5147

Open
Nirali164 wants to merge 5 commits intodevelopmentfrom
nirali_user_management_clear_data
Open

Nirali user management clear data#5147
Nirali164 wants to merge 5 commits intodevelopmentfrom
nirali_user_management_clear_data

Conversation

@Nirali164
Copy link
Copy Markdown

@Nirali164 Nirali164 commented Apr 14, 2026

Description

a. Go to User Management, and edit a field of a user, then save changes
b. Edit the same field of the same user again, then saving changes would save the
current change and the previous change saved in a.
c. Currently, the repeated changes are not an issue, and a workaround is to refresh
the page to clear the data, but for ongoing PR#3600, the retained data would create multiple
change logs for the same user, even if the user is meant to have their role changed once per
save.
d. Video of the behaviour (Also showing console log for multiple changes being
Repeatedly saved during the same edit before a save, and the change logs of PR#3600 are being
created due to the bug)
e. Additional issue 1: The fields are still editable even after saving, only
non-editable after refresh or changing pages.NEW
f. Additional issue 2: Seems that if you click to edit any field, go to another page, then try to return to User Management, an error seems to occur, requiring a refresh of the page.
Not clicking the edit icon to switch to edit mode at all does not cause an error when going
back and forth with User Management. (Is shown at the end of the video above, and verified
by testing the behaviour on the dev site, with it occurring there too.)

Related PRS (if any):

PR#3600

Main changes explained:

After saving updated data for a user, the previously edited values were still retained in Redux. Because of that, when editing the same user again or a different user, the old changes were being included along with the new ones. To fix this, the temporarily updated user data is now cleared from Redux after a successful save.

Another issue was caused by editUser becoming undefined when navigating away from User Management and then returning. This led to errors because the page was still trying to access an edit state that no longer existed. The fix ensures the edit state is safely reset, so rerouting back to the page does not break the component.

How to test:

  1. Check out the current branch
  2. Run the project locally:
  3. npm install
    npm start
  4. Clear browser cache/site data to avoid stale Redux state
    5 Log in as an admin/owner user
  5. Navigate to User Management

Edit a user → Save → Edit again → only the latest change is saved (no old data)
Edit User A → Save → Edit User B → no data carryover
After saving, fields exit edit mode
Click edit → navigate away → come back → no crash (page loads normally)
Repeat the above steps in dark mode

Screen.Recording.2026-04-14.at.5.37.00.PM.mov

@sonarqubecloud
Copy link
Copy Markdown

@Nirali164 Nirali164 requested a review from DiyaWadhwani April 14, 2026 21:44
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 14, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit fd70dfc
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69deb40fbe456e000820e23b
😎 Deploy Preview https://deploy-preview-5147--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant