fix: New user is dropped in self dm first after creating a workspace during onboarding#73612
Conversation
…during onboarding
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safari73612-web.mp4 |
|
@tgolen I updated. |
| // We need to send the user to the #admins room from the policy that was created while onboarding, not newly created workspaces nor selfDM chats | ||
| // See https://github.com/Expensify/App/issues/61417 and https://github.com/Expensify/App/issues/73559 for more details. |
There was a problem hiding this comment.
Here is a better version of the comment that doesn't require someone to go research those GH issues:
When the user goes through the onboarding flow, a workspace can be created if the user selects specific options. The user should be taken to the #admins room for that workspace because it is the most natural place for them to start their experience in the app. The user should never go to the self DM or the Concierge chat if a workspace was created during the onboarding flow.
While I was writing that, a couple of things occurred to me:
- This logic is not very readable, I think it would be mroe clear if the logic did an early return for the workspace case:
if (lastAccessedReportID && lastAccessedReport.policyID === onboardingPolicyID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID));
return;
}
- I think there should always be a return after calling
Navigation.navigate(), right? Otherwise, there is a possibility of also running theNavigation.navigate(ROUTES.TEST_DRIVE_MODAL_ROOT.route);trigger too?
|
bump @mkzie2 to address the above comment |
|
bump @mkzie2 Is there any way we can get this one addressed and merged soon? |
I updated.
Your logic above is not correct. For the workspace/concierge report/selfDM case we don't want to navigate to this report and keep the user in LHN instead in small screen
I think we always want to go to test drive modal except the user joined a policy then we should keep the logic as it is. |
|
✋ 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/tgolen in version: 9.2.47-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.2.47-1 🚀
|





Explanation of Change
Fixed Issues
$ #73559
PROPOSAL:
Tests
Offline tests
None
QA Steps
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
Screen.Recording.2025-10-28.at.11.18.41.mov
Android: mWeb Chrome
Screen.Recording.2025-10-28.at.11.17.35.mov
iOS: Native
Screen.Recording.2025-10-28.at.11.20.32.mov
iOS: mWeb Safari
Screen.Recording.2025-10-28.at.11.19.48.mov
MacOS: Chrome / Safari
Screen.Recording.2025-10-28.at.11.16.26.mov
MacOS: Desktop
desktop-1.mp4