Repository navigation
Onboarding - Setup specialist has the onboarded user's email and a fallback avatar - #91112
Conversation
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aff157c230
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| assignedGuideAccountID = generateAccountID(assignedGuideEmail); | ||
| isOptimisticAssignedGuide = !assignedGuidePersonalDetail; | ||
| assignedGuideAccountID = assignedGuideEmail === CONST.EMAIL.QA_GUIDE ? CONST.ACCOUNT_ID.QA_GUIDE : generateAccountID(assignedGuideEmail); | ||
| isOptimisticAssignedGuide = !assignedGuidePersonalDetail && assignedGuideEmail !== CONST.EMAIL.QA_GUIDE; |
There was a problem hiding this comment.
Mark QA guide placeholder as optimistic when merged
When assignedGuideEmail is CONST.EMAIL.QA_GUIDE and that user is not yet in the local personal-details cache (e.g., fresh session or offline onboarding), this sets isOptimisticAssignedGuide to false even though the same else branch still merges a fallback personal detail entry. The cleanup block later in prepareOnboardingOnyxData() only runs when isOptimisticAssignedGuide is true, so the fallback QA-guide record can persist under the real QA guide account ID and continue showing placeholder name/avatar instead of the canonical guide details until another sync overwrites it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — there was a real inconsistency here. The merged personal detail record was flagged isOptimisticPersonalDetail: true while isOptimisticAssignedGuide was false, so the placeholder under ACCOUNT_ID.QA_GUIDE was never cleaned up.
I didn't take the suggested cleanup path, because the QA guide is a real account with a fixed ACCOUNT_ID.QA_GUIDE — running the success/failure cleanup would null out the record and drop the avatar (the exact issue this PR fixes). Instead I made the merged record consistent with isOptimisticAssignedGuide:
- isOptimisticPersonalDetail: !assignedGuidePersonalDetail,
+ isOptimisticPersonalDetail: isOptimisticAssignedGuide,Now the QA guide record is correctly treated as non-optimistic, the placeholder flag no longer lingers, and the avatar stays visible. Tested locally via the onboarding flow — works as expected.
|
Commits should be verified |
5fb5bd2 to
8f8cb8d
Compare
Thanks for flagging this! I've re-signed both commits and re-authored them under a single account (@dilshodmackbook-sketch) — they now show as Verified. Apologies for the |
|
@ZhenjaHorbach this is resolved 🙏 Both commits are signed and show as Verified ✅, and both are authored under a single account (@dilshodmackbook-sketch). Ready for your re-review whenever you get a chance! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-05-22.15.58.33.movAndroid: mWeb Chrome2026-05-22.15.58.33.moviOS: HybridApp2026-05-22.16.00.43.moviOS: mWeb Safari2026-05-22.15.54.52.movMacOS: Chrome / Safari2026-05-22.15.47.48.mov |
|
Looks like the wrong avatar is used 2026-05-22.14.57.00.mov |
The QA guide row used getDefaultAvatarURL with only the accountID, which hashes ACCOUNT_ID.QA_GUIDE into a different default-avatar bucket than the backend assigns. The backend hashes the account's email, so the optimistic avatar did not match the canonical guide avatar. Pass accountEmail so the optimistic avatar matches the backend-assigned one. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Good catch — fixed in the latest commit. The QA guide row was calling Fix — pass - avatar: getDefaultAvatarURL({accountID: assignedGuideAccountID}),
+ avatar: getDefaultAvatarURL({accountID: assignedGuideAccountID, accountEmail: assignedGuideEmail}),This is consistent with existing usages of |
|
After fix video Screen.Recording.2026-05-22.at.18.18.07.mp4 |
|
@dilshodmackbook-sketch jest tests are failing |
The hardcoded 515109196 fails in CI because CONST.ACCOUNT_ID.QA_GUIDE resolves to the env-configured value (default 14365522). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Fixed the failing Jest test. The test in |
|
🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.80-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This PR fixes an internal code bug in The existing help site articles already correctly describe the Setup Specialist at a high level — this fix just ensures it renders as documented. |
|
This was not QAed properly because of #91384 (comment) @JS00001 @ZhenjaHorbach @dilshodmackbook-sketch Can you please make sure to QA this change? I wont block the deploy on it but lets make sure to follow up |
|
Following up on QA as requested. ✅ Verified on dev (https://dev.new.expensify.com:8082/) using the exact QA steps from the PR description:
Screenshot attached.
Since the staging QA flow is currently blocked by #91384 (onboarding tasks not rendering for MANAGE_TEAM users), I'll re-run the full staging QA across all platforms (Web, iOS Demo: Screen.Recording.2026-05-25.at.15.30.35.mp4 |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.81-2 🚀
|

Explanation of Change
During onboarding, the setup specialist row in the
#adminsroom was showing the just-onboarded user's email and a fallback avatar instead ofqa.guide@team.expensify.comwith the correct guide avatar.This happened because
prepareOnboardingOnyxDatainsrc/libs/ReportUtils.tsusedgenerateAccountID(assignedGuideEmail)as the optimistic account ID for the QA guide. The generated ID did not match the real QA guide accountID, so personal details and the avatar could not be resolved and the row fell back to the current user's data.This PR:
CONST.EMAIL.QA_GUIDEas the fallback email (instead of the existingCONST.SETUP_SPECIALIST_LOGINconstant) so the lookup is consistent with the rest of the app.CONST.ACCOUNT_ID.QA_GUIDEinstead of generating a random optimistic ID, so the correct personal details / avatar are matched.Fixed Issues
$ #90693
PROPOSAL: #90693 (comment)
Tests
https://dev.new.expensify.com:8082/) in an incognito window.anything@tstsg.com.51-100 - QBOand finish onboarding.#adminsroom for the newly created workspace.qa.guide@team.expensify.com(not the just-onboarded user's email).#adminsroom — the setup specialist details still render correctly.Offline tests
#adminsroom still shows the setup specialist asqa.guide@team.expensify.comwith the correct avatar.QA Steps
staging.expensify.comand pick "Manage my company's expenses (10+)".[anything]@tstsg.com, click "Get Started" and complete signup.51-100 - QBOand finish onboarding.#adminsroom of the newly created workspace.qa.guide@team.expensify.comwith the correct (non-fallback) avatar.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
androidmWebChrome.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
iosmWebSafari.mp4
MacOS: Chrome / Safari
macOS-chrome.mp4
macOS-safari.mp4