Conversation
…rt not in collection When getChatByParticipants fails to find the Concierge 1:1 chat in deprecatedAllReports (common for brand-new accounts during onboarding), fall back to using the module-level conciergeReportIDOnyxConnect which is populated via Onyx.connect to CONCIERGE_REPORT_ID. Without this fallback, prepareOnboardingOnyxData returns undefined, completeOnboarding bails out without sending COMPLETE_GUIDED_SETUP, hasCompletedGuidedSetupFlow stays false, but navigateAfterOnboarding still dismisses the modal. The OnboardingGuard then redirects back, creating an infinite loop. Made-with: Cursor
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-hybrid.mp4Android: mWeb Chromeandroid.chrome.mp4iOS: HybridAppios.hybrid.mp4iOS: mWeb Safariios.safari.mp4MacOS: Chrome / Safarimac.safari.mp4linux.chrome.mp4 |
@roryabraham, you forgot to tick this checkbox 😅 |
dmkt9
left a comment
There was a problem hiding this comment.
The changes look good to me.
I was initially unable to reproduce the bug because the OpenApp API always sends the Concierge report to me. However, once I delete that report, the issue can be reproduced consistently. And the solution works effectively.
|
🚧 @lakchote 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/lakchote in version: 9.3.55-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. The change is a purely internal bug fix in |
Explanation of Change
When a new user signs up with a gmail address and selects "Track and budget expenses" during onboarding,
prepareOnboardingOnyxDatatries to find the Concierge 1:1 chat viagetChatByParticipants()indeprecatedAllReports. For brand-new accounts, the Concierge report may not yet be in the reports collection, causing the lookup to returnundefined. This triggers an early return, preventing theCOMPLETE_GUIDED_SETUPAPI call from being sent and leavinghasCompletedGuidedSetupFlowasfalse. However,navigateAfterOnboardingWithMicrotaskQueuestill dismisses the modal, and then theOnboardingGuardsees incomplete onboarding and redirects back — creating an infinite loop.The fix adds a fallback: when
getChatByParticipantsfails to find the Concierge chat, we use the module-levelconciergeReportIDOnyxConnect(populated viaOnyx.connecttoCONCIERGE_REPORT_ID) to construct a minimal report object. This mirrors the existing fallback pattern already used for the admins room path.Note: This is reproducible in the dev environment only, not staging.
Fixed Issues
$ #87286
Tests
Offline tests
N/A — This flow requires network for account creation and API calls.
QA Steps
This is reproducible in dev only, not staging. QA steps are the same as the Tests section above but should be run against dev.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mov
Made with Cursor