RocketChat / RocketChat/Rocket.Chat
Cancel avatar update shows new avatar until page reload
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When uploading a new profile picture and clicking Cancel instead of Save, the avatar change is still applied. The cancel action does not discard the pending avatar update, resulting in unintended profile changes and breaking expected cancel behavior.
Steps to reproduce:
- Go to Profile → Avatar / Profile Picture.
- Upload a new image.
- Click Cancel instead of Save.
- Reload the page or revisit the profile.
Expected behavior:
- Clicking Cancel should discard the uploaded avatar.
- No avatar update request should be triggered.
- The previously saved avatar should remain unchanged.
Actual behavior:
- The avatar is updated even after clicking Cancel.
- The change persists after reload.
- The cancel action does not prevent the update.
Server Setup Information:
- Version of Rocket.Chat Server: develop (local build)
- License Type: Community
- Number of Users: 1 (local)
- Operating System: Ubuntu (WSL)
- Deployment Method: Source (local development)
- Number of Running Instances: 1
- DB Replicaset Oplog: Default
- NodeJS Version: 22.16.0
- MongoDB Version: 6.0.x
Client Setup Information
- Desktop App or Browser Version: Chrome (latest)
- Operating System: Windows / Ubuntu (WSL)
Additional context
This issue appears to occur because the avatar update request is triggered before explicit user confirmation (Save), rather than being applied only after submission.
Relevant logs:
No explicit server or browser errors observed. Network activity indicates the avatar update request is sent even when Cancel is clicked.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Profile → Avatar / Profile Picture and reproduce the upload-then-Cancel flow while watching the network activity. Trace where the avatar update request is triggered relative to Save and Cancel. Done means Cancel sends no avatar update request and the previously saved avatar remains unchanged after reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100