[BUG]: Header avatar and display name don't update after editing the profile
Maintainers usually reply within 1 day
@mithunkc017-ship-it is already working on this.
Since Oct 24, 2026.
- #771 by @mithunkc017-ship-it — open
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with frontend/src/components/Header.tsx and frontend/src/Pages/Profile.tsx, which the issue identifies as reading and updating separate user-state copies. Trace the successful avatar and display-name update handlers to find where the shared userAtom can be updated, then verify that the header reflects the new values without refreshing. Run the relevant frontend checks and reproduce both profile-update flows to confirm the fix.
Written by the indexing model from the issue text.
Description
Bug Description
When a user changes their avatar or display name on the Profile page, the change is saved and a success message appears. The header (top-right avatar and the name in its dropdown) keeps showing the old avatar and name until the page is refreshed.
Steps to Reproduce
Log in and go to the Profile page.
Hover over the avatar and choose a new one.
The message "Avatar updated successfully!" appears.
Look at the avatar in the top-right corner of the header.
Display name
On the Profile page, edit your display name and save it.
The message "DisplayName updated successfully!" appears.
Click the avatar in the header to open the dropdown and look at the name shown there.
Logs and Screenshots
https://github.com/user-attachments/assets/f55b82b2-e3f6-409e-a8af-7c466309cd5c
Actual Behavior
- The header avatar still shows the old avatar.
- The header dropdown still shows the old display name.
- The header only shows the new values after a full page refresh.
Expected Behavior
As soon as the profile update succeeds, the header avatar and display name should show the new values, with no page refresh.
Root Cause
The header and the Profile page read user data from two different places, and the Profile page only updates its own copy.
- **Header** reads the shared Jotai `userAtom`:
- `frontend/src/components/Header.tsx:62`: `const [user] = useAtom(userAtom);`
- `frontend/src/components/Header.tsx:254` and `:265`: `src={user?.avatarUrl || DEFAULT_AVATAR_URL}`
- `frontend/src/components/Header.tsx:271`: `{user?.displayName || "User"}`
- **Profile page** keeps the profile in local component state (`dashboard`, from `useState`) and never touches `userAtom`:
- `frontend/src/Pages/Profile.tsx:345-372` (`handleAvatarSelect`): calls `updateProfile(...)` and `setDashboard(...)` only.
- `frontend/src/Pages/Profile.tsx:316-337` (saving a field such as `displayName`): calls `updateProfile(...)`, then refetches with `getProfile` and calls `setDashboard(updatedData)` only.
Environment Details
No response
Impact
Medium - Feature works but has issues
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Dominant language
- TypeScript
- Stars
- 104
- Forks
- 244
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 42
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing 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.
More from AOSSIE-Org/DebateAI
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
AOSSIE-Org/DebateAI#773 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AOSSIE-Org/DebateAI#772 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG]: Signed-out visitors see a fake account menu ("User", "No email", "Sign out") on public pagesPossibly taken @dhruvbit claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/DebateAI#769 · 4 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
AOSSIE-Org/DebateAI#768 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AOSSIE-Org/DebateAI#760 ·
Maintainers usually reply within 1 day
All issues in AOSSIE-Org/DebateAI
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
microsoft/playwright#43640 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
grasshopper-protocol/grsshppr#172 ·
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Tencent/teamai-cli#1397 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DouyinFE/semi-design#3641 ·
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day