You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Profile - Avatar changes to non-letter avatar after saving letter avatar #96797
Version Number: 9.4.43-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#96269 Email or phone of affected tester (no customers):sdsjodijnsdojsosjio@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: User Settings
Action Performed:
Go to staging.new.expensify.com
Create a new Gmail account.
Complete onboarding with Managa my team's expenses.
Go to Account > Profile.
Click on the avatar.
Select any letter avatar and save it.
Expected Result:
The selected letter avatar will be saved.
Actual Result:
Avatar changes to non-letter avatar after saving letter avatar.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #96269 - "Let users pick a letter avatar color" by @grgia (High confidence) Related Issues: #93810 (the feature issue this PR implemented)
Recommendation: REVERT
The regression is entirely contained in this single feature PR (letter-avatar color picking), it is not yet in production, and it carries a cross-repo Auth/Web dependency ("requires the Auth and Web changes to be deployed to staging first"), so a clean revert is safer than a targeted hotfix under deploy-blocker time pressure.
Assigned: @grgia (PR author), @bernhardoj (approving reviewer), @mjasikowski (approving reviewer) from the highest-confidence causing PR only Labels: No label changes. Kept DeployBlockerCash — this is a frontend bug fixed in Expensify/App, and the issue is not reproducible in production, so the App-deploy blocker must remain. No DeployBlocker (Web) label was present.
The issue itself is N/A in production because the entire "pick a letter avatar color" feature is new and only exists on staging via this PR — the symptom cannot pre-date it.
The PR rewrites the whole letter-avatar pipeline: it deletes ColoredLetterAvatar.tsx, replaces useLetterAvatars.tsx, adds updateAvatarStyle, reworks Avatar.tsx rendering, and changes getDefaultAvatarURL. The reported flow (select a letter avatar → save) is driven directly by code this PR introduced.
Verification
Affected files this PR modifies (confirmed via gh pr view 96269 --json files):
src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts — the save handler
src/libs/actions/PersonalDetails.ts — new updateAvatarStyle action
Saving a picked letter color does not reliably produce a letter avatar at render time; it can fall back to a numbered (non-letter) default.
Save flow: useProfileAvatarForm.save() calls updateAvatarStyle(selected, currentUserPersonalDetails) when a letter scheme key is selected (useProfileAvatarForm.ts lines 108-113).
Inside updateAvatarStyle (PersonalDetails.ts), the picked color is stored in avatarStyle.color, and because a fresh "Manage my team's expenses" account has a backend-assigned numbered default avatar (.../default-avatar_N.png, which is not a generated-letter URL), the guard willClearAvatar = !!avatar && !isGeneratedLetterAvatarURL(avatar) is true.
The optimistic update therefore overwrites avatar with getDefaultAvatarURL({accountID, accountEmail, firstName, lastName}).
getDefaultAvatarURL (UserAvatarUtils.ts line 142) does not use the picked color. It calls getLetterAvatarURL(...), which derives its color by hashing the login/accountID and returns '' (falling through to a numbered default-avatar_N) whenever getLetterAvatarInitials(firstName, lastName, login) yields no initials.
The render path is the core defect. Avatar.tsx line 139/167 only renders a letter avatar when parseLetterAvatarURL(source) is truthy, i.e. only when the avatar URL is itself a generated-letter URL. The picked avatarStyle.color is consulted exclusively inside UserLetterAvatar as a color override on an already-generated letter URL — it is never used to promote a non-letter avatar into a letter avatar. So whenever step 3 leaves a numbered default-avatar_N as the source, the picked color is silently ignored and the user sees a non-letter default avatar — exactly the reported symptom.
In short: the feature couples "which avatar type is rendered" to the stored avatar URL, but couples "which color the letter uses" to avatarStyle.color. When the optimistic/backend avatar is not a generated-letter URL, those two paths disagree and the letter avatar is dropped. This is a frontend logic gap; combined with the PR's stated Auth/Web deploy dependency, reverting from Expensify/App is the correct resolution.
Confirmed, this is a BE bug in Auth, so reverting the App PR won't fix it.
Triage:
When a user with no display name saves a letter color, UpdateUserAvatar stores avatarStyle correctly but the Onyx update it pushes re-resolves the avatar with the login-initial fallback disabled, so it falls back to the illustrated default.
OpenApp resolves the same user with the login allowed, which is why the letter avatar comes back after a reload. The recipients of this push already get the login-seeded letter (and the login itself) in their personalDetailsList, so the guard isn't protecting anything here.
Fix is a one-liner in Account::updateAvatarStyle; Auth PR incoming.
Activity
applause-bot commentedon Jul 22, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/f277513aef331410f05e9f75b8633135e3410942f60c1faf0d3afb07ecb569f8
melvin-bot commentedon Jul 22, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #96269
melvin-bot commentedon Jul 22, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 22, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Jul 22, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #96269 - "Let users pick a letter avatar color" by @grgia (High confidence)
Related Issues: #93810 (the feature issue this PR implemented)
Recommendation: REVERT
The regression is entirely contained in this single feature PR (letter-avatar color picking), it is not yet in production, and it carries a cross-repo Auth/Web dependency ("requires the Auth and Web changes to be deployed to staging first"), so a clean revert is safer than a targeted hotfix under deploy-blocker time pressure.
Assigned: @grgia (PR author), @bernhardoj (approving reviewer), @mjasikowski (approving reviewer) from the highest-confidence causing PR only
Labels: No label changes. Kept
DeployBlockerCash— this is a frontend bug fixed inExpensify/App, and the issue is not reproducible in production, so the App-deploy blocker must remain. NoDeployBlocker(Web) label was present.📋 Detailed Analysis
Evidence
StagingDeployCash(Deploy Checklist: New Expensify 2026-07-22 #96786) and is the only PR in the release that touches avatar / letter-avatar / default-avatar selection and rendering. It merged 2026-07-22, matching when the bug first appeared on staging.N/Ain production because the entire "pick a letter avatar color" feature is new and only exists on staging via this PR — the symptom cannot pre-date it.ColoredLetterAvatar.tsx, replacesuseLetterAvatars.tsx, addsupdateAvatarStyle, reworksAvatar.tsxrendering, and changesgetDefaultAvatarURL. The reported flow (select a letter avatar → save) is driven directly by code this PR introduced.Verification
Affected files this PR modifies (confirmed via
gh pr view 96269 --json files):src/pages/settings/Profile/Avatar/useProfileAvatarForm.ts— the save handlersrc/libs/actions/PersonalDetails.ts— newupdateAvatarStyleactionsrc/components/Avatar.tsx— letter-avatar render pathsrc/libs/UserAvatarUtils.ts—getDefaultAvatarURL/getLetterAvatarURL/getLetterAvatarInitialsRoot Cause
Saving a picked letter color does not reliably produce a letter avatar at render time; it can fall back to a numbered (non-letter) default.
Save flow:
useProfileAvatarForm.save()callsupdateAvatarStyle(selected, currentUserPersonalDetails)when a letter scheme key is selected (useProfileAvatarForm.tslines 108-113).Inside
updateAvatarStyle(PersonalDetails.ts), the picked color is stored inavatarStyle.color, and because a fresh "Manage my team's expenses" account has a backend-assigned numbered default avatar (.../default-avatar_N.png, which is not a generated-letter URL), the guardwillClearAvatar = !!avatar && !isGeneratedLetterAvatarURL(avatar)istrue.The optimistic update therefore overwrites
avatarwithgetDefaultAvatarURL({accountID, accountEmail, firstName, lastName}).getDefaultAvatarURL(UserAvatarUtils.tsline 142) does not use the pickedcolor. It callsgetLetterAvatarURL(...), which derives its color by hashing the login/accountID and returns''(falling through to a numbereddefault-avatar_N) whenevergetLetterAvatarInitials(firstName, lastName, login)yields no initials.The render path is the core defect.
Avatar.tsxline 139/167 only renders a letter avatar whenparseLetterAvatarURL(source)is truthy, i.e. only when theavatarURL is itself a generated-letter URL. The pickedavatarStyle.coloris consulted exclusively insideUserLetterAvataras a color override on an already-generated letter URL — it is never used to promote a non-letter avatar into a letter avatar. So whenever step 3 leaves a numbereddefault-avatar_Nas the source, the picked color is silently ignored and the user sees a non-letter default avatar — exactly the reported symptom.In short: the feature couples "which avatar type is rendered" to the stored
avatarURL, but couples "which color the letter uses" toavatarStyle.color. When the optimistic/backendavataris not a generated-letter URL, those two paths disagree and the letter avatar is dropped. This is a frontend logic gap; combined with the PR's stated Auth/Web deploy dependency, reverting fromExpensify/Appis the correct resolution.bernhardoj commentedon Jul 23, 2026
@grgia looks like a BE issue, only reproducible on an account without display name.
Here is the BE response.
grgia commentedon Jul 23, 2026
Looking now
grgia commentedon Jul 23, 2026
Confirmed, this is a BE bug in Auth, so reverting the App PR won't fix it.
Triage:
Fix is a one-liner in Account::updateAvatarStyle; Auth PR incoming.
grgia commentedon Jul 23, 2026
Auth PR in final review
mjasikowski commentedon Jul 23, 2026
@grgia Auth PR is merged, waiting for deployment
mjasikowski commentedon Jul 24, 2026
Auth deplyed, asking for a retest
m-natarajan commentedon Jul 24, 2026
Not repro on Windows 10/Chrome/Prod Build v9.4.43-1
2026-07-24.15-20-59.mp4