Skip to content

[$250] Onboarding modal not show when the invited member who not complete onboarding login #84436

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.3.32-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-7800/folder/13176677/41237677/1233303116
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Win 11/Chrome
App Component: Other

Action Performed:

  1. Go to OldDot staging.expensify.com > Choose the "Manage expenses for 1-9 employees" option and sign up with a new account
  2. Once on NewDot - don't complete the onboarding modal, exit the browser
  3. Another account invite the created account to a Collect workspace via OldDot as a member
  4. As the invited member again, open staging.new.expensify.com and login

Expected Result:

Verify the onboarding modal shows

Actual Result:

The onboarding modal isn't shown

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7095822_1772819324292.Recording__1879.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @nkdengineer
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022029984185090756051
  • Upwork Job ID: 2029984185090756051
  • Last Price Increase: 2026-03-24
  • Automatic offers:
    • aimane-chnaif | Reviewer | 110965806

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 6, 2026
  2. melvin-bot commented on Mar 6, 2026

    @melvin-bot

    Triggered auto assignment to @lydiabarclay (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. MelvinBot commented on Mar 6, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When a user signs up via OldDot, lands on NewDot but exits the browser before completing the onboarding modal, then gets invited to a Collect workspace via OldDot, and logs back into NewDot — the onboarding modal is not shown. It should still appear since the user never completed onboarding.

    What is the root cause of that problem?

    The OnboardingGuard at App/src/libs/Navigation/guards/OnboardingGuard.ts:165 computes:

    const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false;

    This flag is included in the shouldSkipOnboarding OR-chain at line 174-175:

    const shouldSkipOnboarding =
        CONFIG.SKIP_ONBOARDING || context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember;

    When the user is invited to a Collect workspace via OldDot, the backend sets hasNonPersonalPolicy = true (because the user now belongs to a non-personal policy). This is returned via OpenApp/ReconnectApp and stored in Onyx. On the next NewDot login, isInvitedOrGroupMember evaluates to true, causing shouldSkipOnboarding to be true — even though hasCompletedGuidedSetupFlow is explicitly false (the user started but never completed onboarding).

    The isInvitedOrGroupMember condition was designed to skip the onboarding modal for users who were invited to NewDot (they get an alternative invite-specific onboarding via guided setup messages). However, it doesn't distinguish between "invited user who never started onboarding" and "organic user who started onboarding but was later added to a workspace."

    What changes do you think we should make in order to solve the problem?

    Modify the isInvitedOrGroupMember condition in OnboardingGuard.ts:165 to not skip onboarding when the user has explicitly started but not completed it. Specifically, add a check that hasCompletedGuidedSetupFlow is not explicitly false:

    Change:

    isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false
    

    To:

    isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot) && onboarding?.hasCompletedGuidedSetupFlow !== false) ?? false
    

    This ensures:

    • If hasCompletedGuidedSetupFlow is false (user started onboarding but didn't finish) → onboarding is still shown regardless of workspace membership
    • If hasCompletedGuidedSetupFlow is true → the existing isOnboardingCompleted check handles it
    • If hasCompletedGuidedSetupFlow is undefined or NVP_ONBOARDING is empty → hasCompletedGuidedSetupFlowSelector already returns true, so isOnboardingCompleted handles it
    • Invited users who never started onboarding still skip the modal (intended behavior)

    What alternative solutions did you explore? (Optional)

    1. Removing hasNonPersonalPolicy from the isInvitedOrGroupMember check entirely — this would be too aggressive, as it would force onboarding on legitimate invited workspace members who should skip it.
    2. Adding a separate isOnboardingExplicitlyStarted flag — functionally equivalent but more verbose. Directly checking onboarding?.hasCompletedGuidedSetupFlow !== false in the existing condition is cleaner.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 6, 2026
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 6, 2026
  6. melvin-bot commented on Mar 6, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)

  7. changed the title [-]Onboarding modal not show when the invited member who not complete onboarding login[/-] [+][$250] Onboarding modal not show when the invited member who not complete onboarding login[/+] on Mar 6, 2026
  8. melvin-bot commented on Mar 6, 2026

    @melvin-bot
  9. abbasifaizan70 commented on Mar 6, 2026

    @abbasifaizan70
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Go to OldDot (staging.expensify.com) → choose "Manage expenses for 1-9 employees" and sign up with a new account. Once on NewDot, do not complete the onboarding modal; exit the browser. Another account invites the created account to a Collect workspace via OldDot as a member. As the invited member, open staging.new.expensify.com and log in. The onboarding modal is not shown.

    What is the root cause of that problem?

    OnboardingGuard skips the onboarding flow for any user who has hasNonPersonalPolicy === true or wasInvitedToNewDot === true. After the user is invited to a workspace, hasNonPersonalPolicy becomes true, so the guard skips onboarding even when the user never completed the guided setup.

    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false;

    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false;

    What changes do you think we should make in order to solve the problem?

    Only skip onboarding for users with a non-personal policy when they have already completed the guided setup. Users who signed up, left without completing onboarding, and were later invited to a workspace should still see the onboarding modal when they return. Users who joined via an invite link (wasInvitedToNewDot) continue to skip the full flow.

    const needsExplanationModal = (CONFIG.IS_HYBRID_APP && tryNewDot?.isHybridAppOnboardingCompleted !== true) ?? false;
    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false;

            const needsExplanationModal = (CONFIG.IS_HYBRID_APP && tryNewDot?.isHybridAppOnboardingCompleted !== true) ?? false;
            // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
            const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false;
            const needsExplanationModal = (CONFIG.IS_HYBRID_APP && tryNewDot?.isHybridAppOnboardingCompleted !== true) ?? false;
            // Skip onboarding for users with a workspace only when they have completed onboarding (so users who signed up,
            // left without completing, then were invited to a workspace still see the onboarding modal when they return).
            // Users who joined via invite link (wasInvitedToNewDot) always skip the full flow.
            // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
            const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && ((hasNonPersonalPolicy && isOnboardingCompleted) || wasInvitedToNewDot)) ?? false;
  10. MugheesMb commented on Mar 6, 2026

    @MugheesMb

    🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.

  11. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

    ⚠️ @MugheesMb Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  12. 52 remaining items

  13. m-natarajan commented on Apr 10, 2026

    @m-natarajan

    @trjExpensify

    Yep, @lanitochka17 @m-natarajan can ya'll take care of that?

    Updated the referenced test case

  14. trjExpensify commented on Apr 10, 2026

    @trjExpensify
    Contributor

    @nkdengineer I'm not following you.

    const isInvitedOrGroupMember = (!CONFIG.IS_HYBRID_APP && (hasNonPersonalPolicy || wasInvitedToNewDot)) ?? false; 
    

    So at the time of being invited to the workspace they have wasInvitedToNewDot: true don't they?

  15. nkdengineer commented on Apr 10, 2026

    @nkdengineer
    Contributor

    So at the time of being invited to the workspace they have wasInvitedToNewDot: true don't they?

    No, it's always false for this usủe if the user created account before is invited to a workspace.

  16. trjExpensify commented on Apr 10, 2026

    @trjExpensify
    Contributor

    Shouldn't we set that when someone is invited to a workspace? I guess I'm now confused what wasInvitedToNewDot is and for.

  17. nkdengineer commented on Apr 21, 2026

    @nkdengineer
    Contributor

    @trjExpensify We have two cases:

    1. Eager employee creates an account before being invited to the workspace: This case has no introSelected --> wasInvitedToNewDot is false.

    2. Eager employee signs in for the first time after being invited to the workspace: This case has introSelected like this --> wasInvitedToNewDot is true

  18. trjExpensify commented on Apr 22, 2026

    @trjExpensify
    Contributor
    1. Eager employee creates an account before being invited to the workspace: This case has no introSelected --> wasInvitedToNewDot is false.

    More specifically..

    1. User signs up
    2. Doesn't complete onboarding, closes the browser. <-- no introSelected is set yet, it's empty because they haven't completed onboarding.
    3. user gets invited to the workspace. <-- why don't we set introSelected and inviteType: workspace here now?
    4. user signs in again and onboarding is skipped.
  19. nkdengineer commented on Apr 22, 2026

    @nkdengineer
    Contributor

    <-- why don't we set introSelected and inviteType: workspace here now?

    @trjExpensify That is the reason why I mentioned we need to fix it in the backend here

  20. trjExpensify commented on Apr 27, 2026

    @trjExpensify
    Contributor

    Alright gotcha, that wasn't clear to me from what was written which didn't mention setting the introSelected / inviteType NVP and values.

  21. nkdengineer commented on May 18, 2026

    @nkdengineer
    Contributor

    @mallenexpensify, please help to handle the full payment here since we completed the PR and reviewed before decided to close this PR as expected.

  22. mallenexpensify commented on May 20, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @nkdengineer due $250 via NewDot
    Contributor+: @aimane-chnaif paid $125 via Upwork.

    $250 to @nkdengineer cuz they where hired, created a PR and requested review.
    $125 to @aimane-chnaif cuz that'd be the price for not completing test and, as a best practice, I think work should have been paused after @trjExpensify posted this

    Image
  23. twisterdotcom commented on May 21, 2026

    @twisterdotcom
    Contributor

    $250 approved for @nkdengineer in Report ID: R00O5W9hSjEU.

    Zapier Logs Run ID: 00040eee-3351-a12f-9f8a-46985f75c504

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions