Skip onboarding tasks in new workspace for already-onboarded users#89000
Conversation
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.
|
…ding-tasks-admins-room
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-29.at.17.40.12.movAndroid: mWeb ChromeScreen.Recording.2026-04-29.at.17.44.47.moviOS: HybridAppScreen.Recording.2026-04-29.at.17.46.50.moviOS: mWeb SafariScreen.Recording.2026-04-29.at.17.49.35.movMacOS: Chrome / SafariScreen.Recording.2026-04-29.at.17.32.34.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @francoisl 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/francoisl in version: 9.3.65-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. The change is a purely internal bug fix to the onboarding-tasks guard condition in |
Explanation of Change
After a user signs up, picks "Track and Budget" at the onboarding purpose step, then later creates a new workspace, the full set of onboarding tasks (
testDriveAdminTask,createReportTask,setupCategoriesTask) is posted to that new workspace's#adminsroom. The expected behavior is that the#adminsroom stays empty of onboarding tasks for users who already completed onboarding.The root cause is in
buildPolicyData. The guard for "should we add onboarding tasks to this new workspace?" uses!introSelected?.createWorkspaceto mean "the user has not completed onboarding yet" — but only theMANAGE_TEAMflow ever stores that field. Every Concierge-based flow (PERSONAL_SPEND→TRACK_WORKSPACE,EMPLOYER,SUBMIT,CHAT_SPLIT,LOOKING_AROUND) leavescreateWorkspaceundefined, so the guard wrongly evaluates to truthy and posts the onboarding tasks into the new workspace's#adminsroom.The fix replaces
!introSelected?.createWorkspacewith!introSelected?.choice— the field that is actually populated by everycompleteOnboardingcall. After the change:MANAGE_TEAMusers who already went through guided onboarding still skip the block (theirchoiceisMANAGE_TEAM), preserving today's behavior for their second-or-later workspace.TRACK_WORKSPACE/PERSONAL_SPEND/EMPLOYER/SUBMIT/CHAT_SPLIT/LOOKING_AROUNDusers now also skip the block — this fixes the reported#adminsleak.TEST_DRIVE_RECEIVERstill falls into the block via the first disjunct, so the downstream special-case (completing thecreateWorkspacetask in Concierge) keeps working.choiceundefined still enters the block, preserving the fallback branch.Fixed Issues
$ #88689
PROPOSAL: #88689 (comment)
Tests
Reproduces the OP repro from the bug report:
+(e.g.useronboarding@onboarding<unique-number>.com). Plus-aliases route the tasks to Concierge instead of#admins, which would mask the bug.#adminsroom of the new workspace.#adminsroom contains only the workspace-created system message — notestDriveAdminTask,createReportTask, orsetupCategoriesTaskcards. (Before the fix: those onboarding tasks appear here.)Offline tests
Same as Tests, but disable network before step 4. The optimistic Onyx update creates the new workspace locally; verify the
#adminsroom is still empty of onboarding tasks while offline. Re-enable network and confirm the server response matches.QA Steps
Same as Tests, run on staging.
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
https://github.com/user-attachments/assets/27f66f9f-4fa4-4247-bbd5-7855b5f851e1Android: mWeb Chrome
https://github.com/user-attachments/assets/7529e374-3db9-4060-b26f-2e356118cfdfiOS: Native
https://github.com/user-attachments/assets/68ee9d53-65ef-424d-b9b7-6db315396db7iOS: mWeb Safari
https://github.com/user-attachments/assets/9eec499c-4e58-477c-a78d-ec991fb3ac4eMacOS: Chrome / Safari
Kapture.2026-04-28.at.21.56.47.mp4