Repository navigation
Description
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: 9.3.49-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/folder/13176677/test-cases/43685222
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: MacBook Air 15.7.4 Chrome
App Component: Other
Action Performed:
- Navigate to staging.expensify.com.
- Select the option "Manage my team (1-9)"
- Enter a private domain email that is associated with existing accounts (e.g., xyz+anything@futebr.com)
- Click "Get started for free", then "Join"
- When redirected to the NewDot, verify that the first step of the onboarding flow displayed is the 'What is your name" modal
- Verify that the next step asks the user if they want to "Join existing policies"
Expected Result:
'What is your name" and "Join existing policies" modals are shown, when user with a private domain account is redirected from OD to ND during onboarding
Actual Result:
'What is your name" and "Join existing policies" modals are not shown, when user with a private domain account is redirected from OD to ND during onboarding
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
bug.mp4
Issue Owner
Current Issue Owner: @stitesExpensifyUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022037296580589870031
- Upwork Job ID: 2037296580589870031
- Last Price Increase: 2026-04-16
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
MelvinBot commentedon Mar 26, 2026
Proposal
What is the root cause of that problem?
When a private domain user is redirected from OldDot to NewDot during onboarding, the
OnboardingGuardinOnboardingGuard.ts:104-113callsgetOnboardingInitialPath()to determine which onboarding screen to start on. This function checksaccount.hasAccessibleDomainPoliciesto decide if the user should see the private domain flow (Personal Details → Private Domain → Workspaces).The problem is that when the guard evaluates after the OD-to-ND transition completes, the
accountOnyx data may not yet includehasAccessibleDomainPolicies = true. In the guard,accountis read from a module-level Onyx subscription (OnboardingGuard.ts:45-50), and it's passed togetOnboardingInitialPathas!!account?.hasAccessibleDomainPolicies(line 108). Whenaccountis undefined or doesn't yet have this field,hasAccessiblePoliciesevaluates tofalse.In
OnboardingFlow.ts:133-138, the private domain branch is:With
hasAccessiblePolicies = false, this branch is skipped. The function falls through to either the VSB/SMB paths (returningONBOARDING_ACCOUNTINGorONBOARDING_EMPLOYEES) or the defaultONBOARDING_ROOT(PURPOSE screen) at line 148. The user never sees Personal Details ("What is your name") or Workspaces ("Join existing policies").The same issue exists in
OnboardingModalNavigator.tsx:50-56, whereinitialRouteNamedefaults toPURPOSEunlessaccount?.hasAccessibleDomainPoliciesis truthy. Notably, the navigator already waits for account metadata to load (line 106), but the guard does not have this same check.What changes do you think we should make in order to solve the problem?
The
OnboardingGuardshould not calculate the onboarding route until account data is available. Currently, the guard checkscontext.isLoadingbut doesn't verify that theaccountOnyx data has actually been populated.The fix should add a check in the guard's
evaluatefunction (OnboardingGuard.ts:162-221): ifaccountisundefinedornull(meaning it hasn't been loaded from the server yet), treat it as a loading state and include it in theshouldSkipOnboardingconditions (returningALLOWto defer the onboarding redirect until account data is available).This mirrors what
OnboardingModalNavigatoralready does — it returnsnullwhileisLoadingOnyxValue(accountMetadata)is true (line 106-108).What alternative solutions did you explore? (Optional)
Server-side fix: Ensure
hasAccessibleDomainPoliciesis always populated in theOpenAppresponse for users transitioning from OD. However, this would only fix one manifestation — any other scenario where account data loads slowly would still be broken.Saving onboarding state during OD signup: When the user selects "Manage my team" on OldDot and enters a private domain email, the server could set
ONBOARDING_LAST_VISITED_PATHto the personal details route. This would be used bygetOnboardingInitialPathat line 134 as a fallback. However, this requires backend changes and is more complex.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.melvin-bot commentedon Mar 26, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @FitseTLT (
External)[-]Onboarding - Name and "Join existing policies" modals not shown when redirected from OD[/-][+][$250] Onboarding - Name and "Join existing policies" modals not shown when redirected from OD[/+]melvin-bot commentedon Mar 26, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022037296580589870031
twilight2294 commentedon Mar 26, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a private-domain user is redirected from OldDot to NewDot during onboarding, the "What is your name" (Personal Details) and "Join existing policies" (Workspaces) modals are never shown — the user lands directly in the app without completing the guided setup flow.
What is the root cause of that problem?
The issue is a logic error in the
evaluatefunction of OnboardingGuard. TheisInvitedOrGroupMembervariable is computed as:For a private-domain user arriving from OldDot on web:
!CONFIG.IS_HYBRID_APPistrue, andhasNonPersonalPolicyistrue(the domain has existing policies). SoisInvitedOrGroupMemberevaluates totrue, which feeds intoshouldSkipOnboardingbecomingtrue. The guard then returnsALLOWand never redirects to the onboarding flow.The routing logic in
getOnboardingInitialPath()in OnboardingFlow is actually correct — it would route toPERSONAL_DETAILSfor private-domain users with accessible policies. But that code is never reached because the guard short-circuits first.The core flaw is that
isInvitedOrGroupMemberdoesn't account for whether the user has actually completed the guided setup flow. A user who has non-personal policies but hasn't finished onboarding is incorrectly treated the same as one who has.What changes do you think we should make in order to solve the problem?
In OnboardingGuard, add a check for
hasCompletedGuidedSetupFlowso that users who still need onboarding aren't skipped:This ensures:
hasCompletedGuidedSetupFlow === false):isInvitedOrGroupMemberbecomesfalse, the guard proceeds to the redirect logic, and they correctly see Personal Details → Private Domain → Workspaces.hasCompletedGuidedSetupFlowwon't befalse, so the current behavior is unchanged.What alternative solutions did you explore? (Optional)
The existing proposal suggests this is a timing/loading issue — that
account.hasAccessibleDomainPoliciesisn't populated yet when the guard runs, so adding a loading check would fix it. While that race condition may exist as a secondary issue, the primary root cause is the logic flaw inisInvitedOrGroupMember: even after all data is fully loaded, this condition will still skip onboarding for private-domain users who have non-personal policies but haven't completed the guided setup flow. Adding a loading guard alone would not fix this — once the data loads, the same incorrect skip would occur.My fix is a single-line change that addresses the actual logic error, is consistent with how
isOnboardingCompletedis already used elsewhere in the guard, and carries minimal regression risk.Fix onboarding modals not shown for private domain users from OD
trasnake87 commentedon Mar 26, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a private domain user is redirected from OldDot to NewDot during onboarding, the "What is your name" and "Join existing policies" modals are not shown — the user lands directly on the home screen.
What is the root cause of that problem?
The
isInvitedOrGroupMembercondition inOnboardingGuard.ts:173unconditionally skips onboarding for any non-HybridApp user who has a non-personal policy:When a private domain user signs up through OldDot ("Manage my team" → "Join"), the backend creates a policy membership before redirecting to NewDot. So when
OpenAppreturns,HAS_NON_PERSONAL_POLICYistrue. The guard treats this user identically to an existing user who was invited to a workspace — it setsshouldSkipOnboarding = trueat line 197 and returnsALLOW, bypassing the private domain onboarding flow (Personal Details → Workspaces) entirely.What changes do you think we should make in order to solve the problem?
In
OnboardingGuard.ts, exclude users who need the private domain onboarding flow from theisInvitedOrGroupMemberskip. These users havehasAccessibleDomainPolicies = trueandisFromPublicDomain = false— they must still enter onboarding even though they already have a non-personal policy.This is safe because users who have already completed onboarding are caught earlier by the
isOnboardingCompletedcondition on line 190, so the change only affects users whosehasCompletedGuidedSetupFlowisfalse— exactly the OD-redirect scenario described in the issue.What alternative solutions did you explore? (Optional)
Gating
isInvitedOrGroupMemberonisOnboardingCompletedwas considered, but that would make the entire condition redundant (sinceisOnboardingCompletedis already a separate term inshouldSkipOnboarding). The narrowerneedsPrivateDomainOnboardingcheck preserves the existing skip for genuinely invited users while unblocking only the private domain flow.trasnake87 commentedon Mar 26, 2026
Contributor details
Your Expensify account email: trasnake87@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~010f770315ab181656
melvin-bot commentedon Mar 26, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
67 remaining items
stitesExpensify commentedon Aug 18, 2026
No update, we don't have another usable email at the moment.
woahwhattheheck commentedon Sep 20, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-09-20 20:31:30 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The onboarding regression report expects a user arriving from OldDot with a private-domain account that has joinable policies to see the Name step and then Join existing policies. The current reproduction instead uses
futebr.com, which the issue owner confirmed is now treated as a public domain. That fixture no longer represents the private-domain flow the test is trying to exercise, so it can route to Work email for valid reasons and cannot currently distinguish a real onboarding regression from an invalid test account.What is the root cause of that problem?
The reported test case assumes
futebr.comis a private domain that can join existing policies. The issue owner found that it is on the public-domain list and has not found a suitable replacement account. That makes the current fixture unable to establish the reported private-domain onboarding regression.The routing code distinguishes these inputs.
getOnboardingInitialPath()sends an unvalidated public-domain account to Work Email, while a private-domain account with accessible policies starts at Personal Details unless a saved onboarding path takes precedence. I prepared three route-level characterization cases for those combinations, including a saved Work Email path. They do not reproduce the OldDot-to-NewDot transition or establish a product-code root cause.What changes do you think we should make in order to solve the problem?
First, use an approved test account on a non-public, non-domain-controlled domain with joinable policies, then rerun the OldDot-to-NewDot case and update the test fixture. At the transition, check the actual
isFromPublicDomain,hasAccessibleDomainPolicies, account-validation state, and saved onboarding path.If that valid private-domain case still skips the two modals, use those observed values to identify and fix the specific guard or route decision, with regression coverage for these routing combinations:
If the approved private-domain fixture follows the expected route, then the product code is behaving correctly and the fix for this issue is to replace the stale QA fixture rather than modify onboarding logic.
What alternative solutions did you explore? (Optional)
Delaying the guard until account metadata loads or overriding a saved route could change other onboarding flows without explaining this fixture's behavior. Those changes need a valid end-to-end reproduction first.
melvin-bot commentedon Sep 20, 2026
📣 @woahwhattheheck! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
github-actions commentedon Sep 20, 2026
woahwhattheheck commentedon Sep 20, 2026
melvin-bot commentedon Sep 20, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
github-actions commentedon Sep 20, 2026
stitesExpensify commentedon Sep 21, 2026
I think we should just close this. We don't have the ability to QA it, and we are redirecting from OD less and less