Skip to content

[$250] Hybrid-"Welcome to Expensify" modal not appear after login account running snippet on OD web #95558

Closed

Description

@applause-bot

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.4.29-0
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/63677665/folder/13176927/41237627/1548790859?sort=-identifier
Email or phone of affected tester (no customers): lekima20+693207@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: iPhone 16 pro/ 26.5
App Component: Other

Action Performed:

Precondition:

  • On Web go to https://staging.expensify.com, select "Organize my own expenses" and get started with a new account and complete onboarding flow with select "Submit expenses to my employer"
  • Logout and sign in again with the same account to validate it with a magic code
  • Create a Collect Workspace
  • Create a new report
  • Add some expense to the report and submit it
  • Open the console and run the following snippet:
    NVP.set('tryNewDot',
    {classicRedirect: {dismissed: false, completedHybridAppOnboarding:
    false}});
  1. Open app
  2. Login with the account at precondition

Expected Result:

Verify that the "Welcome to Expensify" modal appears

Actual Result:

The "Welcome to Expensify" modal doesn't appear

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7202536_1783492723701.Ahqs1408_1_.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7202536

Upwork Automation - Do Not Edit

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 8, 2026
  2. applause-bot commented on Jul 8, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/718af3b3be79f511e70fbd8a6ee7857fd1d5bb9b71439f0b2e213b0973bde2bc

  3. MelvinBot commented on Jul 8, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause (Medium confidence): The "Welcome to Expensify" modal is rendered by OldDot (Mobile‑Expensify), not by NewDot/App — there is no such modal in the App codebase, and the HybridApp native bridge only exposes a completeOnboarding({status}) method, so App can dismiss the modal but can't show it.

    On HybridApp login, App's onboarding router treats classicRedirect.completedHybridAppOnboarding === false as "a user switching in from OldDot who should be skipped," and immediately flips it to true — propagating status: true back to OldDot. That is exactly the state the repro sets up ({dismissed: false, completedHybridAppOnboarding: false}), so App tells OldDot "onboarding done" before OldDot would show its modal.

    This is not fully fixable in App. The modal itself and the condition that gates its display live in the Mobile‑Expensify (OldDot) repo, which I can't access. The App-side auto-completion above is the prime suspect, but confirming whether it's the root cause (vs. an OldDot-side change) requires an internal engineer with Mobile‑Expensify access. Please escalate to an internal engineer to verify the OldDot modal trigger and whether App is prematurely marking hybrid onboarding complete for returning OldDot users.

    Investigation details

    Flow in the repro:

    1. On HybridApp login, useOnboardingFlowRouter runs. For CONFIG.IS_HYBRID_APP it checks isSingleNewDotEntry first (false for a normal login), then the isHybridAppOnboardingCompleted === false branch.
    2. isHybridAppOnboardingCompleted comes from NVP_TRY_NEW_DOT.classicRedirect.completedHybridAppOnboarding via tryNewDotOnyxSelector — src/selectors/Onboarding.ts:36. The repro snippet sets it to false.
    3. Because it's === false, App calls completeHybridAppOnboarding() and returns — it never reaches the NewDot startOnboardingFlow path, and it pushes status: true to OldDot (Welcome/index.ts:125-126). The inline comment at useOnboardingFlow.ts:80 states this intent: "will not start startOnboardingFlow for users that switched from OldDot."

    Verified: no "Welcome to Expensify" copy/component exists anywhere in App/src; the hybrid-app bridge has no "show modal" method (only completeOnboarding); the exact App code path above.

    Inferred (needs Mobile‑Expensify): that OldDot reads completedHybridAppOnboarding/completeOnboarding(status) to gate its modal, and that App's auto-completion is what suppresses display.

    Log confirmation an internal engineer can run: search production logs for "[HybridApp] Onboarding status has changed. Propagating new value to OldDot" (emitted at Welcome/index.ts:125) and COMPLETE_HYBRID_APP_ONBOARDING requests for the affected account (lekima20+693207@gmail.com) around the repro time — their presence proves App flipped the flag to true and suppressed OldDot's modal.

    Possibly related open issues:


    Next Steps for Contributor+ team:
    To accept: since the fix lives outside the App repo, an internal engineer with Mobile‑Expensify access should verify the OldDot modal trigger and the App-side auto-completion before implementation.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's analysis.

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

    @yusufdeveloper2903
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-07-08 07:13:47 UTC.

    Proposal

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

    On HybridApp (iOS/Android), an existing OldDot user whose tryNewDot.classicRedirect is set to dismissed: false + completedHybridAppOnboarding: false no longer sees the "Welcome to Expensify" modal after logging in and transitioning to NewDot — they land straight in the app instead.

    What is the root cause of that problem?

    The "Welcome to Expensify" modal was the ExplanationModal component (a FeatureTrainingModal with the welcome video + a "Get started" button, whose onClose called completeHybridAppOnboarding). It was only ever shown in HybridApp — useOnboardingFlow.ts navigated to ROUTES.EXPLANATION_MODAL_ROOT whenever CONFIG.IS_HYBRID_APP && isHybridAppOnboardingCompleted === false. You can see the old trigger here:

    • if (CONFIG.IS_HYBRID_APP) {
      // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
      if (isSingleNewDotEntry) {
      return;
      }
      // When user is transitioning from OldDot to NewDot, we usually show the explanation modal
      if (isHybridAppOnboardingCompleted === false) {
      Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
      }
      (Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT))

    PR #93779 ("[No QA] Remove explanation modal", merged 2026-06-17) deleted ExplanationModal together with its navigator, route, screen and translations, and replaced that navigate call with a direct, silent completeHybridAppOnboarding():

    Nothing else about the flow changed: the return right after still skips the regular NewDot onboarding for first-time switchers (here), completeHybridAppOnboarding() still marks the NVP true and propagates it to OldDot (here), and OnboardingGuard still treats this as isFirstTimeHybridAppTransition and skips onboarding (here). The one and only difference is that the modal is no longer rendered.

    I confirmed this removal is present in both the reported build v9.4.29-0 (tag 9.4.29-0-staging) and main — the removal commit 678f644 is an ancestor of both and src/components/ExplanationModal.tsx exists in neither — which is exactly why the issue reproduces in staging and production.

    The important part: this removal was an approved product decision, not a defect. PR #93779 cites this discussion, where the plan was explicitly to "kill the mobile modal" (confirmed by @Julesssss: "it's old and I think better to just delete. Though we may need to keep checking for the NVP … so we continue to skip [the regular onboarding] for existing users who switched for the first time"). The current code does precisely that. The PR's stated justification ("probably unreachable") was only accurate for the web route (onboarding/explanation), which is why it looked like dead code there — but the real trigger was the mobile-only HybridApp path above, which is the path this regression test exercises. So the modal's absence is by design.

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

    Because the modal was removed intentionally and with sign-off, NewDot is behaving as designed and there's no frontend defect to fix here. What's outdated is the regression test case itself (BrowserStack run …/1548790859, Applause Bug 7202536): its expected result still asserts the "Welcome to Expensify" modal appears, but that modal was deliberately retired in #93779.

    The correct resolution is to update that TC so the expected result is that no welcome modal appears — the user lands directly in NewDot with the regular onboarding skipped (which is the current, intended behavior). I'd tag @Julesssss and the #93779 author to confirm before retiring the step, since they made the original call.

    Note: if the team instead decides they now want a welcome experience back, that's a product reversal rather than a bug fix. The minimal way to restore it is to revert only the useOnboardingFlow.ts hunk of #93779 — swap the silent completeHybridAppOnboarding() at L82 back to Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT) and re-add ExplanationModal (+ its navigator/route/screen/translations) whose onClose calls completeHybridAppOnboarding. I'd recommend against this unless product explicitly reverses the decision.

    What alternative solutions did you explore? (Optional)

    1. Restore the modal (full revert of [No QA] Remove explanation modal #93779). Rejected as the primary path — it directly contradicts the approved "kill the mobile modal" decision, so it should only happen if product reverses that call. I verified the removal is intentional by tracing [No QA] Remove explanation modal #93779 → the cited Migrate ExplanationModal to CenteredModalLayout #93292 discussion, not just the PR's ("probably unreachable") description, which was inaccurate for the HybridApp path.
    2. Alternate root cause — "the navigation is broken / the modal fails to open." Ruled out: the modal component, its navigator, its route (EXPLANATION_MODAL_ROOT) and its screen no longer exist anywhere in the codebase, and useOnboardingFlow.ts no longer references them, so there is no navigation to fail — it's a deliberate removal, not a broken open.
  7. nabi-ebrahimi commented on Jul 8, 2026

    @nabi-ebrahimi
    Contributor

    Proposal

    What is the root cause of that problem?

    The HybridApp welcome-modal state is split between two different sources. tryNewDotOnyxSelector() correctly reads classicRedirect.completedHybridAppOnboarding as the HybridApp onboarding-completed flag and reads nudgeMigration separately

    function tryNewDotOnyxSelector(tryNewDotData: OnyxValue<typeof ONYXKEYS.NVP_TRY_NEW_DOT>): {isHybridAppOnboardingCompleted: boolean | undefined; hasBeenAddedToNudgeMigration: boolean} {
    let isHybridAppOnboardingCompleted = tryNewDotData?.classicRedirect?.completedHybridAppOnboarding;
    const hasBeenAddedToNudgeMigration = !!tryNewDotData?.nudgeMigration?.timestamp;
    // Backend might return strings instead of booleans
    if (typeof isHybridAppOnboardingCompleted === 'string') {
    isHybridAppOnboardingCompleted = isHybridAppOnboardingCompleted === 'true';
    }
    return {isHybridAppOnboardingCompleted, hasBeenAddedToNudgeMigration};
    However, when HybridApp sees completedHybridAppOnboarding === false, useOnboardingFlowRouter() immediately calls completeHybridAppOnboarding() and returns, so the account is marked as completed without ever routing to the welcome modal
    if (CONFIG.IS_HYBRID_APP) {
    // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
    if (isSingleNewDotEntry) {
    return;
    }
    // Make sure hybrid app onboarding is completed and will not start startOnboardingFlow for users that switched from OldDot.
    if (isHybridAppOnboardingCompleted === false) {
    completeHybridAppOnboarding();
    return;
    }
    The only code that actually opens the “Welcome to New Expensify!” modal is MigratedUserWelcomeModalGuard, but that guard only checks hasBeenAddedToNudgeMigration and the product-training dismissal NVP source
    function navigateToMigratedUserWelcomeModalIfReady() {
    if (
    !session?.authToken ||
    isLoadingApp ||
    hasRedirectedToMigratedUserModal ||
    !hasBeenAddedToNudgeMigration ||
    !isDismissedProductTrainingLoaded ||
    isProductTrainingElementDismissed('migratedUserWelcomeModal', dismissedProductTraining)
    ) {
    if (hasBeenAddedToNudgeMigration && !isProductTrainingElementDismissed('migratedUserWelcomeModal', dismissedProductTraining)) {
    Log.info('[MigratedUserWelcomeModalGuard] Redirecting to migrated user welcome modal');
    hasRedirectedToMigratedUserModal = true;
    return {
    type: 'REDIRECT',
    route: getMigratedUserWelcomeModalRoute(),
    So after setting tryNewDot.classicRedirect.completedHybridAppOnboarding = false, the App has enough state to know the HybridApp welcome flow is incomplete, but the router silently completes it while the modal guard ignores it.

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

    Use classicRedirect.completedHybridAppOnboarding === false as an additional source of truth for showing the existing migrated-user welcome modal in HybridApp. The modal already renders the expected welcome content from MigratedUserWelcomeModal

    <FeatureTrainingContent
    {...illustrationProps}
    title={translate('migratedUserWelcomeModal.title')}
    description={translate('migratedUserWelcomeModal.subtitle')}
    confirmText={translate('migratedUserWelcomeModal.confirmText')}
    helpText={translate('migratedUserWelcomeModal.helpText')}
    onHelp={onHelp}
    onClose={handleClose}
    , so we should not add another modal.

    Concretely, update the migrated-user welcome guard to track both hasBeenAddedToNudgeMigration and isHybridAppOnboardingCompleted from tryNewDotOnyxSelector(). The guard should navigate when either the user is in nudge migration or CONFIG.IS_HYBRID_APP && isHybridAppOnboardingCompleted === false, while preserving the existing checks for auth, app loading, one-time redirect, and NVP_DISMISSED_PRODUCT_TRAINING loading/dismissal.

    Then remove the silent completion from useOnboardingFlowRouter(). For HybridApp users with isHybridAppOnboardingCompleted === false, it should skip the regular onboarding wizard but not call completeHybridAppOnboarding() before the welcome modal is shown. Move the completion to the modal dismissal path instead: when the existing welcome modal is dismissed or the help CTA is used, call completeHybridAppOnboarding() for HybridApp users whose completedHybridAppOnboarding flag is still false. That action already writes classicRedirect.completedHybridAppOnboarding: true optimistically and propagates the completed status back to OldDot

    function completeHybridAppOnboarding() {
    if (!CONFIG.IS_HYBRID_APP) {
    return;
    }
    const optimisticData: Array<OnyxUpdate<typeof ONYXKEYS.NVP_TRY_NEW_DOT>> = [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.NVP_TRY_NEW_DOT,
    value: {
    classicRedirect: {
    completedHybridAppOnboarding: true,
    },
    },
    },
    ];
    // eslint-disable-next-line rulesdir/no-api-side-effects-method
    API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.COMPLETE_HYBRID_APP_ONBOARDING, {}, {optimisticData}).then((response) => {
    if (!response) {
    return;
    }
    // No matter what the response is, we want to mark the onboarding as completed.
    Log.info(`[HybridApp] Onboarding status has changed. Propagating new value to OldDot`, true);
    HybridAppModule.completeOnboarding({status: true});
    Keep the existing dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL) calls so migrated-user modal dismissal behavior remains unchanged
    const handleDismiss = () => {
    Log.hmmm('[MigratedUserWelcomeModal] dismissing product training');
    dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL);
    Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query: buildCannedSearchQuery({type: CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT})}));
    };
    useBeforeRemove(handleDismiss);
    )
    const onHelp = () => {
    Log.info('[MigratedUserWelcomeModal] onHelp called, opening help URL based on admin status and device type');
    const adminUrl = shouldUseNarrowLayout ? CONST.STORYLANE.ADMIN_MIGRATED_MOBILE : CONST.STORYLANE.ADMIN_MIGRATED;
    const employeeUrl = shouldUseNarrowLayout ? CONST.STORYLANE.EMPLOYEE_MIGRATED_MOBILE : CONST.STORYLANE.EMPLOYEE_MIGRATED;
    const helpUrl = isCurrentUserPolicyAdmin ? adminUrl : employeeUrl;
    openExternalLink(helpUrl);
    dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL);
    };

    What alternative solutions did you explore? (Optional)

    I also considered making the issue depend on nudgeMigration only, but the reported snippet changes classicRedirect.completedHybridAppOnboarding, and that field is explicitly documented and selected as the HybridApp onboarding-completed flag. I also considered leaving completeHybridAppOnboarding() in the onboarding router, but that keeps the current bug because it marks the welcome flow complete before the user can see the modal.

  8. aswin-s commented on Jul 8, 2026

    @aswin-s
    Contributor

    Note: This proposal is not a duplicate. It changes a different location in the code to address the issue.

    Proposal

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

    On the Hybrid App (iOS/Android), when a user's tryNewDot.classicRedirect.completedHybridAppOnboarding NVP is false on login (as forced by the repro snippet), the "Welcome to Expensify" modal is expected to appear but does not. The hybrid-onboarding branch silently marks onboarding complete instead of surfacing the welcome modal to the migrated/hybrid user.

    What is the root cause of that problem?

    In src/hooks/useOnboardingFlow.ts:81, the hybrid branch treats isHybridAppOnboardingCompleted === false as a signal to immediately call completeHybridAppOnboarding() and return — with no code path that presents the "Welcome to Expensify" modal first. completeHybridAppOnboarding() in src/libs/actions/Welcome/index.ts:101-128 optimistically merges completedHybridAppOnboarding: true into NVP_TRY_NEW_DOT and calls HybridAppModule.completeOnboarding({status: true}), so by the time any downstream guard could react, the flag is already true. Separately, the only guard that opens the MIGRATED_USER_WELCOME modal (src/libs/Navigation/guards/MigratedUserWelcomeModalGuard.ts:146) is gated on hasBeenAddedToNudgeMigration (derived from nudgeMigration.timestamp in src/selectors/Onboarding.ts:37), never on isHybridAppOnboardingCompleted, so nothing in the hybrid false branch triggers the welcome modal.

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

    1. In src/hooks/useOnboardingFlow.ts:74-85, before short-circuiting via completeHybridAppOnboarding() when isHybridAppOnboardingCompleted === false, first navigate to the MIGRATED_USER_WELCOME modal route (via Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.MIGRATED_USER_WELCOME.path, ...))) when the user has not yet dismissed migratedUserWelcomeModal in NVP_DISMISSED_PRODUCT_TRAINING.
    2. Move the completeHybridAppOnboarding() call so it fires when the welcome modal is dismissed (on the modal's confirm/close handler) instead of eagerly on mount, so the optimistic completedHybridAppOnboarding: true merge does not happen before the user sees the modal.
    3. In src/libs/Navigation/guards/MigratedUserWelcomeModalGuard.ts:72-79, extend the NVP_TRY_NEW_DOT callback to also track isHybridAppOnboardingCompleted, and update navigateToMigratedUserWelcomeModalIfReady/evaluate (lines 46-59, 146) so the modal proactively opens when CONFIG.IS_HYBRID_APP && isHybridAppOnboardingCompleted === false — mirroring the existing hasBeenAddedToNudgeMigration path.
    4. Verify the same trigger fires on both iOS and Android hybrid builds (the guard file is platform-shared, but confirm no platform split exists for useOnboardingFlow/completeHybridAppOnboarding).

    What alternative solutions did you explore? (Optional)

  9. David-2002065 commented on Jul 8, 2026

    @David-2002065
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-07-08 07:13:55 UTC.

    Proposal

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

    On HybridApp (iOS/Android), a first-time OldDot→NewDot user whose tryNewDot.classicRedirect.completedHybridAppOnboarding is false no longer sees the "Welcome to Expensify" modal after login.

    What is the root cause of that problem?

    The "Welcome to Expensify" modal is the ExplanationModal (a FeatureTrainingModal with title: onboarding.explanationModal.title = "Welcome to Expensify" and videoURL: CONST.WELCOME_VIDEO_URL). It was removed in #93779 (commit 678f644).

    Previously, when hybrid onboarding was incomplete, useOnboardingFlow navigated to the modal:

    if (isHybridAppOnboardingCompleted === false) {
        Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
    }

    That PR replaced the navigation with a direct completeHybridAppOnboarding() call, so the flag is now silently set to true and nothing is rendered:

    // Make sure hybrid app onboarding is completed and will not start startOnboardingFlow for users that switched from OldDot.
    if (isHybridAppOnboardingCompleted === false) {
    completeHybridAppOnboarding();
    return;
    }

    The type definition still documents the original intent (completedHybridAppOnboarding = "Indicates if explanation modal on NewDot was dismissed"):

    /**
    * Indicates if explanation modal on NewDot was dismissed.
    */
    completedHybridAppOnboarding: boolean;

    Note: this removal was intentional (per the discussion behind #93779), so the modal is currently gone by design — no code path renders it anymore. The QA "expected result" tracks the pre-#93779 behavior, so restoring the modal requires reintroducing what that PR deleted.

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

    Restore the explanation-modal path that #93779 removed. The core change in useOnboardingFlow is to navigate to the modal again instead of silently completing:

    if (isHybridAppOnboardingCompleted === false) {
        Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
        return;
    }

    and re-add the pieces that PR deleted:

    • src/components/ExplanationModal.tsx — the FeatureTrainingModal whose onClose calls completeHybridAppOnboarding.
    • ExplanationModalNavigator, ROUTES.EXPLANATION_MODAL_ROOT, SCREENS.EXPLANATION_MODAL, NAVIGATORS.EXPLANATION_MODAL_NAVIGATOR, plus the linkingConfig and AuthScreens registration.
    • The onboarding.explanationModal.* strings in the language files.

    Because the modal calls completeHybridAppOnboarding on close (which sets completedHybridAppOnboarding: true via COMPLETE_HYBRID_APP_ONBOARDING), it self-dismisses permanently after the first view and will not re-appear. The OnboardingGuard isFirstTimeHybridAppTransition check should stay as-is so the regular guided-setup flow remains skipped for these users.

    Since the removal was a deliberate decision, we should confirm the desired direction first: restore the modal (above), or keep it removed and update the outdated test expectation (see alternatives).

    What specific scenarios should we cover in automated tests to prevent this from being reintroduced in the future?

    • On HybridApp with completedHybridAppOnboarding === false (not a single-entry or nudge-migration user), login navigates to EXPLANATION_MODAL_ROOT and the "Welcome to Expensify" modal renders.
    • Closing the modal calls completeHybridAppOnboarding, sets completedHybridAppOnboarding: true, and the modal does not re-appear on the next login.
    • completedHybridAppOnboarding === false still skips the regular guided-setup onboarding flow (OnboardingGuard isFirstTimeHybridAppTransition).
    • Single-entry hybrid entries (e.g. Travel launched from OldDot) still show no modal.

    What alternative solutions did you explore? (Optional)

    • If the modal is meant to stay removed per [No QA] Remove explanation modal #93779, there is no app-code bug — the fix is to update the regression test's expected result so it no longer asserts a welcome modal on first-time hybrid transition.
    • Repurpose the existing MigratedUserWelcomeModal ("Welcome to New Expensify!") for the hybrid-onboarding path. This modal is copy/asset-tuned for nudge-migration cohorts and is gated on tryNewDot.nudgeMigration.timestamp, so wiring it to completedHybridAppOnboarding blurs the two flows; restoring the dedicated ExplanationModal keeps them separate and preserves the original "Welcome to Expensify" content and video.
  10. samranahm commented on Jul 8, 2026

    @samranahm
    Contributor

    Proposal

    What is the root cause of that problem?

    After a tester sets tryNewDot.classicRedirect.completedHybridAppOnboarding to false on OldDot web and then opens the hybrid app and logs in, the "Welcome to Expensify" modal (MigratedUserWelcomeModal) does not appear, even though completedHybridAppOnboarding: false is meant to force it.

    On the hybrid app, the transition is driven by HybridAppHandler. Its effect reads the tryNewDot NVP and passes it into setupNewDotAfterTransitionFromOldDot(hybridAppSettings, tryNewDot) inside finalizeTransitionFromOldDot:

    function HybridAppHandler() {
    const {setSplashScreenState} = useSplashScreenActions();
    const [tryNewDot, tryNewDotMetadata] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT);
    const isLoadingTryNewDot = isLoadingOnyxValue(tryNewDotMetadata);
    const finalizeTransitionFromOldDot = (hybridAppSettings: HybridAppSettings) => {
    const loggedOutFromOldDot = !!hybridAppSettings.hybridApp.loggedOutFromOldDot;
    setupNewDotAfterTransitionFromOldDot(hybridAppSettings, tryNewDot).then(() => {
    if (loggedOutFromOldDot) {
    endSpan(CONST.TELEMETRY.SPAN_APP_STARTUP);
    endSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.ROOT);
    endSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT);
    } else {
    setSplashScreenState(CONST.BOOT_SPLASH_STATE.READY_TO_BE_HIDDEN);
    }
    });
    };
    useEffect(() => {
    if (!CONFIG.IS_HYBRID_APP || isLoadingTryNewDot) {
    return;
    }
    addBootsplashBreadcrumb('HybridAppHandler: Requesting settings');
    getHybridAppSettings().then((hybridAppSettings: HybridAppSettings | null) => {
    if (!hybridAppSettings) {
    // Native method can send non-null value only once per NewDot lifecycle. It prevents issues with multiple initializations during reloads on debug builds.
    Log.info('[HybridApp] `getHybridAppSettings` called more than once during single NewDot lifecycle. Skipping initialization.');
    addBootsplashBreadcrumb('HybridAppHandler: null settings, skipping');
    return;
    }
    addBootsplashBreadcrumb('HybridAppHandler: Settings received', {loggedOutFromOldDot: String(!!hybridAppSettings.hybridApp.loggedOutFromOldDot)});
    // Resolve splash state ASAP — this is the earliest moment we know
    // whether the native splash is on screen or not
    if (hybridAppSettings.hybridApp.loggedOutFromOldDot) {
    setSplashScreenState(CONST.BOOT_SPLASH_STATE.HIDDEN);
    } else {
    setSplashScreenState(CONST.BOOT_SPLASH_STATE.VISIBLE);
    }
    if (hybridAppSettings.hybridApp.loggedOutFromOldDot) {
    startSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT, {
    name: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT,
    op: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT,
    startTime: hybridAppSettings.hybridApp.transitionStartTimestamp,
    });
    } else if (hybridAppSettings.hybridApp.pressedTryNewExpensify) {
    startSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION, {
    name: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION,
    op: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION,
    startTime: hybridAppSettings.hybridApp.transitionStartTimestamp,
    });
    }
    finalizeTransitionFromOldDot(hybridAppSettings);
    });
    }, [finalizeTransitionFromOldDot, isLoadingTryNewDot, setSplashScreenState]);
    return null;
    }

    The problem is a timing/value mismatch: the handler only runs its setup once per NewDot lifecycle (it early-returns when getHybridAppSettings returns null and when isLoadingTryNewDot is true), and the settings received from the native side (hybridAppSettings.hybridApp) are what actually drive the migrated-user onboarding decision. When the tester flips completedHybridAppOnboarding to false directly on the NVP via the console, that manually-set value is not what the transition path uses to decide whether to surface the modal, so the gate that shows MigratedUserWelcomeModal never evaluates to "should show".

    MigratedUserWelcomeModal itself only handles its own dismissal via dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL); it does not re-check the freshly written tryNewDot?.classicRedirect?.completedHybridAppOnboarding value:

    function MigratedUserWelcomeModal() {
    const {translate} = useLocalize();
    const styles = useThemeStyles();
    const StyleUtils = useStyleUtils();
    const {shouldUseNarrowLayout} = useResponsiveLayout();
    const isReduceMotionEnabled = Accessibility.useReducedMotion();
    const illustrations = useMemoizedLazyIllustrations(['ChatBubbles', 'ConciergeBot', 'PlanetWithMobileApp', 'MagnifyingGlassReceipt']);
    const isCurrentUserPolicyAdmin = useIsPaidPolicyAdmin();
    const ExpensifyFeatures = useMemo<FeatureListItem[]>(
    () => [
    {
    icon: illustrations.MagnifyingGlassReceipt,
    translationKey: 'migratedUserWelcomeModal.features.search',
    },
    {
    icon: illustrations.ConciergeBot,
    translationKey: 'migratedUserWelcomeModal.features.concierge',
    },
    {
    icon: illustrations.ChatBubbles,
    translationKey: 'migratedUserWelcomeModal.features.chat',
    },
    ],
    [illustrations.ChatBubbles, illustrations.ConciergeBot, illustrations.MagnifyingGlassReceipt],
    );
    const handleDismiss = () => {
    Log.hmmm('[MigratedUserWelcomeModal] dismissing product training');
    dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL);
    Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query: buildCannedSearchQuery({type: CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT})}));
    };
    useBeforeRemove(handleDismiss);
    const handleClose = () => Navigation.goBack();
    const illustrationProps = isReduceMotionEnabled
    ? {image: illustrations.PlanetWithMobileApp}
    : {
    videoURL: '',
    animation: LottieAnimations.WorkspacePlanet,
    animationStyle: [styles.emptyWorkspaceIllustrationStyle],
    };
    const onHelp = () => {
    Log.info('[MigratedUserWelcomeModal] onHelp called, opening help URL based on admin status and device type');
    const adminUrl = shouldUseNarrowLayout ? CONST.STORYLANE.ADMIN_MIGRATED_MOBILE : CONST.STORYLANE.ADMIN_MIGRATED;
    const employeeUrl = shouldUseNarrowLayout ? CONST.STORYLANE.EMPLOYEE_MIGRATED_MOBILE : CONST.STORYLANE.EMPLOYEE_MIGRATED;
    const helpUrl = isCurrentUserPolicyAdmin ? adminUrl : employeeUrl;
    openExternalLink(helpUrl);
    dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL);
    };
    return (
    <CenteredModalLayout
    onBackdropPress={handleClose}
    contentStyle={[styles.pt0, styles.pb0]}
    >
    <FeatureTrainingContent
    {...illustrationProps}
    title={translate('migratedUserWelcomeModal.title')}
    description={translate('migratedUserWelcomeModal.subtitle')}
    confirmText={translate('migratedUserWelcomeModal.confirmText')}
    helpText={translate('migratedUserWelcomeModal.helpText')}
    onHelp={onHelp}
    onClose={handleClose}
    illustrationInnerContainerStyle={[StyleUtils.getBackgroundColorStyle(LottieAnimations.WorkspacePlanet.backgroundColor), styles.cardSectionIllustration]}
    illustrationOuterContainerStyle={styles.p0}
    contentInnerContainerStyles={[styles.mb5, styles.gap2]}
    contentOuterContainerStyles={!shouldUseNarrowLayout && [styles.mt8, styles.mh8]}
    shouldUseScrollView
    >
    <View
    style={[styles.gap3, styles.pt1, styles.pl1]}
    fsClass={CONST.FULLSTORY.CLASS.UNMASK}
    >
    {ExpensifyFeatures.map(({translationKey, icon}) => (
    <View
    key={translationKey}

    So the NVP write is effectively ignored during the login/transition and the modal stays hidden.

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

    1. In HybridAppHandler.tsx, base the migrated-user onboarding decision on the current tryNewDot NVP value (classicRedirect.completedHybridAppOnboarding) rather than only on the native settings, so a fresh login honors the console-set flag.

    function HybridAppHandler() {
    const {setSplashScreenState} = useSplashScreenActions();
    const [tryNewDot, tryNewDotMetadata] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT);
    const isLoadingTryNewDot = isLoadingOnyxValue(tryNewDotMetadata);
    const finalizeTransitionFromOldDot = (hybridAppSettings: HybridAppSettings) => {
    const loggedOutFromOldDot = !!hybridAppSettings.hybridApp.loggedOutFromOldDot;
    setupNewDotAfterTransitionFromOldDot(hybridAppSettings, tryNewDot).then(() => {
    if (loggedOutFromOldDot) {
    endSpan(CONST.TELEMETRY.SPAN_APP_STARTUP);
    endSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.ROOT);
    endSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT);
    } else {
    setSplashScreenState(CONST.BOOT_SPLASH_STATE.READY_TO_BE_HIDDEN);
    }
    });
    };
    useEffect(() => {
    if (!CONFIG.IS_HYBRID_APP || isLoadingTryNewDot) {
    return;
    }
    addBootsplashBreadcrumb('HybridAppHandler: Requesting settings');
    getHybridAppSettings().then((hybridAppSettings: HybridAppSettings | null) => {
    if (!hybridAppSettings) {
    // Native method can send non-null value only once per NewDot lifecycle. It prevents issues with multiple initializations during reloads on debug builds.
    Log.info('[HybridApp] `getHybridAppSettings` called more than once during single NewDot lifecycle. Skipping initialization.');
    addBootsplashBreadcrumb('HybridAppHandler: null settings, skipping');
    return;
    }
    addBootsplashBreadcrumb('HybridAppHandler: Settings received', {loggedOutFromOldDot: String(!!hybridAppSettings.hybridApp.loggedOutFromOldDot)});
    // Resolve splash state ASAP — this is the earliest moment we know
    // whether the native splash is on screen or not
    if (hybridAppSettings.hybridApp.loggedOutFromOldDot) {
    setSplashScreenState(CONST.BOOT_SPLASH_STATE.HIDDEN);
    } else {
    setSplashScreenState(CONST.BOOT_SPLASH_STATE.VISIBLE);
    }
    if (hybridAppSettings.hybridApp.loggedOutFromOldDot) {
    startSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT, {
    name: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT,
    op: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION_LOGGED_OUT,
    startTime: hybridAppSettings.hybridApp.transitionStartTimestamp,
    });
    } else if (hybridAppSettings.hybridApp.pressedTryNewExpensify) {
    startSpan(CONST.TELEMETRY.SPAN_OD_ND_TRANSITION, {
    name: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION,
    op: CONST.TELEMETRY.SPAN_OD_ND_TRANSITION,
    startTime: hybridAppSettings.hybridApp.transitionStartTimestamp,
    });
    }
    finalizeTransitionFromOldDot(hybridAppSettings);
    });
    }, [finalizeTransitionFromOldDot, isLoadingTryNewDot, setSplashScreenState]);
    return null;
    }

    The effect already has tryNewDot in scope. Before calling finalizeTransitionFromOldDot, read the flag and forward it so the setup path knows onboarding is not complete:

    const hasCompletedHybridOnboarding = tryNewDot?.classicRedirect?.completedHybridAppOnboarding ?? false;

    Pass hasCompletedHybridOnboarding through to setupNewDotAfterTransitionFromOldDot so it does not skip the welcome modal when the NVP says onboarding is incomplete. This fixes the root cause because the modal decision then follows the actual NVP state the tester set.

    1. In MigratedUserWelcomeModal.tsx, guard the render/navigation so it appears whenever completedHybridAppOnboarding is false and the training was not dismissed, matching the expected behavior.

    function MigratedUserWelcomeModal() {
    const {translate} = useLocalize();
    const styles = useThemeStyles();
    const StyleUtils = useStyleUtils();
    const {shouldUseNarrowLayout} = useResponsiveLayout();
    const isReduceMotionEnabled = Accessibility.useReducedMotion();
    const illustrations = useMemoizedLazyIllustrations(['ChatBubbles', 'ConciergeBot', 'PlanetWithMobileApp', 'MagnifyingGlassReceipt']);
    const isCurrentUserPolicyAdmin = useIsPaidPolicyAdmin();
    const ExpensifyFeatures = useMemo<FeatureListItem[]>(
    () => [
    {
    icon: illustrations.MagnifyingGlassReceipt,
    translationKey: 'migratedUserWelcomeModal.features.search',
    },
    {
    icon: illustrations.ConciergeBot,
    translationKey: 'migratedUserWelcomeModal.features.concierge',
    },
    {
    icon: illustrations.ChatBubbles,
    translationKey: 'migratedUserWelcomeModal.features.chat',
    },
    ],
    [illustrations.ChatBubbles, illustrations.ConciergeBot, illustrations.MagnifyingGlassReceipt],
    );
    const handleDismiss = () => {
    Log.hmmm('[MigratedUserWelcomeModal] dismissing product training');
    dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL);
    Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query: buildCannedSearchQuery({type: CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT})}));
    };
    useBeforeRemove(handleDismiss);
    const handleClose = () => Navigation.goBack();
    const illustrationProps = isReduceMotionEnabled
    ? {image: illustrations.PlanetWithMobileApp}
    : {
    videoURL: '',
    animation: LottieAnimations.WorkspacePlanet,
    animationStyle: [styles.emptyWorkspaceIllustrationStyle],
    };
    const onHelp = () => {
    Log.info('[MigratedUserWelcomeModal] onHelp called, opening help URL based on admin status and device type');
    const adminUrl = shouldUseNarrowLayout ? CONST.STORYLANE.ADMIN_MIGRATED_MOBILE : CONST.STORYLANE.ADMIN_MIGRATED;
    const employeeUrl = shouldUseNarrowLayout ? CONST.STORYLANE.EMPLOYEE_MIGRATED_MOBILE : CONST.STORYLANE.EMPLOYEE_MIGRATED;
    const helpUrl = isCurrentUserPolicyAdmin ? adminUrl : employeeUrl;
    openExternalLink(helpUrl);
    dismissProductTraining(CONST.MIGRATED_USER_WELCOME_MODAL);
    };
    return (
    <CenteredModalLayout
    onBackdropPress={handleClose}
    contentStyle={[styles.pt0, styles.pb0]}
    >
    <FeatureTrainingContent
    {...illustrationProps}
    title={translate('migratedUserWelcomeModal.title')}
    description={translate('migratedUserWelcomeModal.subtitle')}
    confirmText={translate('migratedUserWelcomeModal.confirmText')}
    helpText={translate('migratedUserWelcomeModal.helpText')}
    onHelp={onHelp}
    onClose={handleClose}
    illustrationInnerContainerStyle={[StyleUtils.getBackgroundColorStyle(LottieAnimations.WorkspacePlanet.backgroundColor), styles.cardSectionIllustration]}
    illustrationOuterContainerStyle={styles.p0}
    contentInnerContainerStyles={[styles.mb5, styles.gap2]}
    contentOuterContainerStyles={!shouldUseNarrowLayout && [styles.mt8, styles.mh8]}
    shouldUseScrollView
    >
    <View
    style={[styles.gap3, styles.pt1, styles.pl1]}
    fsClass={CONST.FULLSTORY.CLASS.UNMASK}
    >
    {ExpensifyFeatures.map(({translationKey, icon}) => (
    <View
    key={translationKey}

    This ensures the modal is not permanently suppressed once the transition path is corrected.

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  11. KJ21-ENG commented on Jul 8, 2026

    @KJ21-ENG
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-07-08 07:19:51 UTC.

    Proposal

    What is the root cause of that problem?

    When the HybridApp receives the OldDot transition NVP used in the repro, tryNewDotOnyxSelector reads classicRedirect.completedHybridAppOnboarding and exposes it as isHybridAppOnboardingCompleted.

    function tryNewDotOnyxSelector(tryNewDotData: OnyxValue<typeof ONYXKEYS.NVP_TRY_NEW_DOT>): {isHybridAppOnboardingCompleted: boolean | undefined; hasBeenAddedToNudgeMigration: boolean} {
    let isHybridAppOnboardingCompleted = tryNewDotData?.classicRedirect?.completedHybridAppOnboarding;
    const hasBeenAddedToNudgeMigration = !!tryNewDotData?.nudgeMigration?.timestamp;
    // Backend might return strings instead of booleans
    if (typeof isHybridAppOnboardingCompleted === 'string') {
    isHybridAppOnboardingCompleted = isHybridAppOnboardingCompleted === 'true';
    }
    return {isHybridAppOnboardingCompleted, hasBeenAddedToNudgeMigration};

    useOnboardingFlowRouter then handles isHybridAppOnboardingCompleted === false by immediately calling completeHybridAppOnboarding() and returning, instead of showing the HybridApp welcome/explanation modal first.

    if (CONFIG.IS_HYBRID_APP && isLoadingOnyxValue(isSingleNewDotEntryMetadata)) {
    return;
    }
    if (CONFIG.IS_HYBRID_APP) {
    // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
    if (isSingleNewDotEntry) {
    return;
    }
    // Make sure hybrid app onboarding is completed and will not start startOnboardingFlow for users that switched from OldDot.
    if (isHybridAppOnboardingCompleted === false) {
    completeHybridAppOnboarding();
    return;

    That completion action optimistically writes classicRedirect.completedHybridAppOnboarding: true, calls CompleteHybridAppOnboarding, and notifies the native HybridApp module, so the first-run welcome state is consumed before the user sees the expected Welcome to Expensify modal.

    function completeHybridAppOnboarding() {
    if (!CONFIG.IS_HYBRID_APP) {
    return;
    }
    const optimisticData: Array<OnyxUpdate<typeof ONYXKEYS.NVP_TRY_NEW_DOT>> = [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.NVP_TRY_NEW_DOT,
    value: {
    classicRedirect: {
    completedHybridAppOnboarding: true,
    },
    },
    },
    ];
    // eslint-disable-next-line rulesdir/no-api-side-effects-method
    API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.COMPLETE_HYBRID_APP_ONBOARDING, {}, {optimisticData}).then((response) => {
    if (!response) {
    return;
    }
    // No matter what the response is, we want to mark the onboarding as completed.
    Log.info(`[HybridApp] Onboarding status has changed. Propagating new value to OldDot`, true);
    HybridAppModule.completeOnboarding({status: true});

    The currently registered auth modal stack has the migrated-user welcome modal and the generic feature-training modal, but the dedicated HybridApp explanation modal route/component that used this NVP completion path is no longer registered.

    <RootStack.Screen
    name={NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR}
    options={rootNavigatorScreenOptions.centeredModalNavigator}
    component={MigratedUserWelcomeModalNavigator}
    />
    <RootStack.Screen
    name={NAVIGATORS.TEST_DRIVE_DEMO_NAVIGATOR}
    options={rootNavigatorScreenOptions.basicModalNavigator}
    component={TestDriveDemoNavigator}
    />
    <RootStack.Screen
    name={NAVIGATORS.FEATURE_TRAINING_MODAL_NAVIGATOR}
    options={rootNavigatorScreenOptions.centeredModalNavigator}
    component={FeatureTrainingModalNavigator}
    listeners={modalScreenListeners}
    />
    {isOnboardingCompleted === false && !Navigation.isValidateLoginFlow() && (
    <RootStack.Screen
    name={NAVIGATORS.ONBOARDING_MODAL_NAVIGATOR}
    options={{...rootNavigatorScreenOptions.basicModalNavigator, gestureEnabled: false}}
    component={OnboardingModalNavigator}

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

    Restore the dedicated HybridApp welcome/explanation modal flow instead of completing the NVP directly from useOnboardingFlowRouter.

    Re-add the small ExplanationModal built on the existing FeatureTrainingModal, with the Welcome to Expensify copy and a close/confirm handler that calls completeHybridAppOnboarding(). Re-add the matching navigator, route, screen, and navigation type entries, then register that navigator in AuthScreens.

    function FeatureTrainingModal({modalInnerContainerStyle, onConfirm, onClose, shouldUseScrollView: shouldUseScrollViewProp = false, ...contentProps}: FeatureTrainingModalProps) {
    const styles = useThemeStyles();
    const {onboardingIsMediumOrLargerScreenWidth} = useResponsiveLayout();
    const {windowWidth, windowHeight} = useWindowDimensions();
    const shouldUseScrollView = shouldUseScrollViewProp || isInLandscapeModeUtil(windowWidth, windowHeight);
    const [isModalVisible, setIsModalVisible] = useState(false);
    const pendingCloseRef = useRef(false);
    useEffect(() => {
    const handle = TransitionTracker.runAfterTransitions({
    callback: () => {
    setIsModalVisible(true);
    },
    });
    return () => handle.cancel();
    }, []);
    const pendingCloseModalAction = () => {
    Log.hmmm(`[FeatureTrainingModal] Modal hidden - hasOnClose: ${!!onClose}`);
    if (onClose) {
    Log.hmmm('[FeatureTrainingModal] Calling onClose callback');
    onClose();
    } else {
    Log.hmmm('[FeatureTrainingModal] No onClose callback provided');
    }
    };
    const closeModal = () => {
    Log.hmmm(`[FeatureTrainingModal] closeModal called - hasOnClose: ${!!onClose}`);
    Log.hmmm('[FeatureTrainingModal] Setting modal invisible');
    pendingCloseRef.current = true;
    setIsModalVisible(false);
    };
    const handleModalHide = () => {
    if (!pendingCloseRef.current) {
    return;
    }
    pendingCloseRef.current = false;
    pendingCloseModalAction();
    };
    return (
    <Modal
    isVisible={isModalVisible}
    type={onboardingIsMediumOrLargerScreenWidth ? CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE : CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED}
    onClose={closeModal}
    innerContainerStyle={{
    boxShadow: 'none',
    ...(shouldUseScrollView ? styles.pb0 : styles.pb5),
    paddingTop: onboardingIsMediumOrLargerScreenWidth ? undefined : MODAL_PADDING,
    ...(onboardingIsMediumOrLargerScreenWidth
    ? {
    flex: undefined,
    width: 'auto',
    }
    : {}),
    ...modalInnerContainerStyle,
    }}
    onModalHide={handleModalHide}
    shouldDisableBottomSafeAreaPadding={shouldUseScrollView}
    shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={!shouldUseScrollView}
    >
    <FeatureTrainingContent
    {...contentProps}
    shouldUseScrollView={shouldUseScrollViewProp}
    onConfirm={onConfirm}
    onClose={closeModal}
    />
    </Modal>
    );
    }
    export default FeatureTrainingModal;

    Change the HybridApp branch in useOnboardingFlowRouter so non-single-entry HybridApp users with isHybridAppOnboardingCompleted === false navigate to the explanation modal route and return. Keep the existing single-entry bypass, migrated-user skip, invited/group-member skip, and guided onboarding flow unchanged. The NVP should only be completed after the modal is dismissed.

    Test coverage: Add a regression test for the HybridApp onboarding flow where classicRedirect.dismissed === false and completedHybridAppOnboarding === false navigates to the explanation modal without calling completeHybridAppOnboarding() immediately. Add a modal test that dismissing/confirming the explanation modal calls completeHybridAppOnboarding(). Keep or add coverage proving isSingleNewDotEntry still bypasses this modal.

    What alternative solutions did you explore? (Optional)

    I considered reusing MigratedUserWelcomeModal by broadening its nudgeMigration gate, but that modal has different copy, product-training dismissal state, and purpose. The reported flow is keyed by classicRedirect.completedHybridAppOnboarding, so restoring the HybridApp explanation modal keeps the fix scoped to the state that the repro changes.

  12. melvin-bot commented on Jul 8, 2026

    @melvin-bot

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

  13. 2 remaining items

  14. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

    ⚠️ @KJ21-ENG 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.

  15. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

    ⚠️ @aswin-s 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.

  16. Abdukhamid000 commented on Jul 8, 2026

    @Abdukhamid000
    Contributor

    Proposal

    What is the root cause of that problem?

    The "Welcome to Expensify" modal is the HybridApp ExplanationModal, and the only place that opens it is [useOnboardingFlowRouter](https://github.com/Expensify/App/blob/main/src/hooks/useOnboardingFlow.ts#L70-L80):

    if (CONFIG.IS_HYBRID_APP) {
        // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
        if (isSingleNewDotEntry) {
            return;
        }
    
        // When user is transitioning from OldDot to NewDot, we usually show the explanation modal
        if (isHybridAppOnboardingCompleted === false) {
            Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
        }
    }

    The repro is a fresh login in the app with completedHybridAppOnboarding: false. On fresh login this effect fires as soon as its data gates pass (isLoadingApp === false, tryNewDot loaded) — a moment when the navigation tree is still settling into the authenticated state. The ExplanationModalNavigator is registered inside [AuthScreens](https://github.com/Expensify/App/blob/main/src/libs/Navigation/AppNavigator/AuthScreens.tsx#L303-L305), i.e. it only exists once protected routes are mounted.

    Navigation.navigate does not protect against this window. Its only fallback is for the container not being ready at all ([Navigation.ts:293-303](https://github.com/Expensify/App/blob/main/src/libs/Navigation/Navigation.ts#L293-L303)):

    if (!canNavigate('navigate', {route})) {
        if (!navigationRef.isReady()) {
            // Store intended route if the navigator is not yet available...
            pendingNavigationCall = {route, options};
        }
        return;
    }

    During fresh login the container is ready (it was mounted for the sign-in screens), so no pending route is stored — the dispatched action just resolves against a tree where the explanation-modal target isn't available yet and is dropped. And because this navigate is fire-once inside the effect, nothing retries it: after the drop, none of the effect's dependencies change again, so the modal never appears.

    The tell is five lines below in the same effect — the sibling call that starts NewDot onboarding was already hardened against exactly this, with a comment naming the failure mode:

    https://github.com/Expensify/App/blob/main/src/hooks/useOnboardingFlow.ts#L90-L107

    // waitForProtectedRoutes ensures navigation is ready, which is critical during fresh login.
    if (isOnboardingCompleted === false && ...) {
        Navigation.waitForProtectedRoutes().then(() => {
            startOnboardingFlow({...});
        });
    }

    The explanation-modal branch never got the same treatment, so the HybridApp path regresses precisely in the fresh-login scenario the QA repro exercises. (The [OnboardingGuard](https://github.com/Expensify/App/blob/main/src/libs/Navigation/guards/OnboardingGuard.ts#L171) isn't the blocker — needsExplanationModal makes it ALLOW this navigation.)

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

    Wrap the explanation-modal navigation in Navigation.waitForProtectedRoutes(), mirroring the sibling onboarding call in the same effect:

     if (CONFIG.IS_HYBRID_APP) {
         // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
         if (isSingleNewDotEntry) {
             return;
         }
    
         // When user is transitioning from OldDot to NewDot, we usually show the explanation modal
         if (isHybridAppOnboardingCompleted === false) {
    -        Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
    +        // Same rationale as startOnboardingFlow below: on a fresh login this can fire before
    +        // protected routes (where ExplanationModalNavigator lives) are mounted. The container is
    +        // already "ready" at that point, so Navigation.navigate won't store a pending route — the
    +        // action is silently dropped and this effect never re-fires to retry.
    +        Navigation.waitForProtectedRoutes().then(() => {
    +            Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
    +        });
         }
     }

    This makes the modal deterministic on fresh login while leaving the warm-app path unchanged (waitForProtectedRoutes resolves immediately when protected routes are already mounted). The return-less fallthrough below is unaffected: the NewDot onboarding start already skips itself when the explanation modal is pending via the !(CONFIG.IS_HYBRID_APP && isHybridAppOnboardingCompleted === false) condition, so no double-modal risk is introduced.

    Verification needs a HybridApp build (Android/iOS): run the issue's NVP.set('tryNewDot', {classicRedirect: {dismissed: false, completedHybridAppOnboarding: false}}) snippet on OldDot web, then cold-open the app and log in — the modal should now appear; dismissing it should call completeHybridAppOnboarding and not reappear on next launch.

    What alternative solutions did you explore?

    • Make Navigation.navigate store a pending route whenever the target can't be resolved, not just when the container isn't ready. Fixes the whole class, but changing global navigate semantics risks side effects across every caller that relies on dropped actions being dropped. Too broad for this regression; worth a separate discussion.
    • Render the ExplanationModal conditionally at the AuthScreens root (driven by isHybridAppOnboardingCompleted === false) instead of navigating to it. More robust conceptually (no navigation race at all), but it changes the modal's mounting model and back-handling, and duplicates what the navigator-based approach already provides. The one-line waitForProtectedRoutes matches the codebase's established pattern for this exact situation.
    • Add a retry (e.g. re-run the effect on navigation-state changes). More moving parts than needed — the deterministic "wait until protected routes exist, then navigate once" is simpler and already proven by the sibling call.
  17. abbasifaizan70 commented on Jul 8, 2026

    @abbasifaizan70
    Contributor

    Proposal

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

    For a HybridApp user who signed up on the web (NewDot), then set NVP.set('tryNewDot', {classicRedirect: {dismissed: false, completedHybridAppOnboarding: false}}) and logs into the mobile app, the "Welcome to Expensify" explanation modal that is supposed to greet OldDot users the first time they land in NewDot never appears.

    What is the root cause of that problem?

    useOnboardingFlowRouter is the single hook that decides which onboarding UI to show after login. For HybridApp builds it reads isHybridAppOnboardingCompleted (derived from tryNewDot.classicRedirect.completedHybridAppOnboarding), and when that flag is false — exactly the state the reproduction snippet sets — it is supposed to show the "Welcome to Expensify" modal for users switching from OldDot. Instead, it immediately calls completeHybridAppOnboarding() and returns, without ever displaying anything:

    if (CONFIG.IS_HYBRID_APP) {
    // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
    if (isSingleNewDotEntry) {
    return;
    }
    // Make sure hybrid app onboarding is completed and will not start startOnboardingFlow for users that switched from OldDot.
    if (isHybridAppOnboardingCompleted === false) {
    completeHybridAppOnboarding();
    return;
    }
    }

    completeHybridAppOnboarding() optimistically merges classicRedirect.completedHybridAppOnboarding: true into Onyx and tells the native OldDot side (HybridAppModule.completeOnboarding) that onboarding is done, so the flag flips to true before any modal has a chance to render:

    function completeHybridAppOnboarding() {
    if (!CONFIG.IS_HYBRID_APP) {
    return;
    }
    const optimisticData: Array<OnyxUpdate<typeof ONYXKEYS.NVP_TRY_NEW_DOT>> = [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.NVP_TRY_NEW_DOT,
    value: {
    classicRedirect: {
    completedHybridAppOnboarding: true,
    },
    },
    },
    ];
    // eslint-disable-next-line rulesdir/no-api-side-effects-method
    API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.COMPLETE_HYBRID_APP_ONBOARDING, {}, {optimisticData}).then((response) => {
    if (!response) {
    return;
    }
    // No matter what the response is, we want to mark the onboarding as completed.
    Log.info(`[HybridApp] Onboarding status has changed. Propagating new value to OldDot`, true);
    HybridAppModule.completeOnboarding({status: true});
    });
    }

    This is a regression from 678f644fc865d021626617ea043cc5f11c779f59 ("Remove explanation modal"), which deleted the ExplanationModal component and its route/screen/navigator entirely and replaced Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT) with the direct completeHybridAppOnboarding() call above — so today there is no screen left to navigate to even if the guard wanted to show one. The deleted translation string onboarding.explanationModal.title: 'Welcome to Expensify' matches the modal name QA expects verbatim, confirming this is the same modal referenced by the test case.

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

    Restore the explanation modal using the app's current dynamic-route pattern (the same one MigratedUserWelcomeModalNavigator/DYNAMIC_ROUTES.MIGRATED_USER_WELCOME already use), and navigate to it instead of completing onboarding immediately. completeHybridAppOnboarding() should only run once the user actually dismisses the modal.

    Add a translation entry for the modal copy:

    App/src/languages/en.ts

    Lines 3170 to 3174 in 243120a

    onboarding: {
    welcome: 'Welcome!',
    welcomeSignOffTitleManageTeam: 'Once you finish the tasks above, we can explore more functionality like approval workflows and rules!',
    welcomeSignOffTitle: "It's great to meet you!",
    getStarted: 'Get started',

            welcomeSignOffTitle: "It's great to meet you!",
            getStarted: 'Get started',
            explanationModal: {
                title: 'Welcome to Expensify',
                description:
                    'One app to handle your business and personal spend at the speed of chat. Try it out and let us know what you think. Much more to come! To switch back to Expensify Classic, just tap your profile picture > Go to Expensify Classic.',
            },

    Register a dynamic screen for the modal, alongside the existing MIGRATED_USER_WELCOME_MODAL one:

    App/src/SCREENS.ts

    Lines 945 to 951 in 243120a

    CURRENCY: {
    DYNAMIC_SELECTION: 'Dynamic_Currency_Selection',
    },
    MIGRATED_USER_WELCOME_MODAL: {
    DYNAMIC_ROOT: 'Dynamic_MigratedUserWelcomeModal_Root',
    },

        EXPLANATION_MODAL: {
            DYNAMIC_ROOT: 'Dynamic_ExplanationModal_Root',
        },
    
        MIGRATED_USER_WELCOME_MODAL: {

    Add the navigator name constant:

    App/src/NAVIGATORS.ts

    Lines 5 to 12 in 243120a

    export default {
    CENTRAL_PANE_NAVIGATOR: 'CentralPaneNavigator',
    RIGHT_MODAL_NAVIGATOR: 'RightModalNavigator',
    ONBOARDING_MODAL_NAVIGATOR: 'OnboardingModalNavigator',
    FEATURE_TRAINING_MODAL_NAVIGATOR: 'FeatureTrainingModalNavigator',
    MIGRATED_USER_MODAL_NAVIGATOR: 'MigratedUserModalNavigator',
    TEST_DRIVE_DEMO_NAVIGATOR: 'TestDriveDemoNavigator',
    REPORTS_SPLIT_NAVIGATOR: 'ReportsSplitNavigator',

        FEATURE_TRAINING_MODAL_NAVIGATOR: 'FeatureTrainingModalNavigator',
        EXPLANATION_MODAL_NAVIGATOR: 'ExplanationModalNavigator',
        MIGRATED_USER_MODAL_NAVIGATOR: 'MigratedUserModalNavigator',

    Add the dynamic route definition next to MIGRATED_USER_WELCOME, entered from anywhere (like TWO_FACTOR_AUTH_ROOT) since it is triggered proactively right after login rather than from a fixed set of screens:

    App/src/ROUTES.ts

    Lines 143 to 146 in 243120a

    MIGRATED_USER_WELCOME: {
    path: 'migrated-user-welcome',
    entryScreens: [SCREENS.HOME, SCREENS.INBOX, SCREENS.REPORT, SCREENS.SEARCH.ROOT, SCREENS.WORKSPACES_LIST, SCREENS.WORKSPACE.PROFILE, SCREENS.SETTINGS.ROOT],
    },

        MIGRATED_USER_WELCOME: {
            path: 'migrated-user-welcome',
            entryScreens: [SCREENS.HOME, SCREENS.INBOX, SCREENS.REPORT, SCREENS.SEARCH.ROOT, SCREENS.WORKSPACES_LIST, SCREENS.WORKSPACE.PROFILE, SCREENS.SETTINGS.ROOT],
        },
        EXPLANATION_MODAL: {
            path: 'explanation',
            entryScreens: ['*'],
        },

    Add the navigator param types next to MigratedUserModalNavigatorParamList and register it on AuthScreensParamList, exporting the new type:

    type MigratedUserModalNavigatorParamList = {
    [SCREENS.MIGRATED_USER_WELCOME_MODAL.DYNAMIC_ROOT]: undefined;
    };

    type MigratedUserModalNavigatorParamList = {
        [SCREENS.MIGRATED_USER_WELCOME_MODAL.DYNAMIC_ROOT]: undefined;
    };
    
    type ExplanationModalNavigatorParamList = {
        [SCREENS.EXPLANATION_MODAL.DYNAMIC_ROOT]: undefined;
    };

    [NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR]: NavigatorScreenParams<MigratedUserModalNavigatorParamList>;

            [NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR]: NavigatorScreenParams<MigratedUserModalNavigatorParamList>;
            [NAVIGATORS.EXPLANATION_MODAL_NAVIGATOR]: NavigatorScreenParams<ExplanationModalNavigatorParamList>;

    FeatureTrainingNavigatorParamList,

        FeatureTrainingNavigatorParamList,
        ExplanationModalNavigatorParamList,

    Map the dynamic route to the screen in the linking config, mirroring the migrated-user-welcome entry:

    [NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR]: {
    screens: {
    [SCREENS.MIGRATED_USER_WELCOME_MODAL.DYNAMIC_ROOT]: DYNAMIC_ROUTES.MIGRATED_USER_WELCOME.path,
    },
    },

            [NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR]: {
                screens: {
                    [SCREENS.MIGRATED_USER_WELCOME_MODAL.DYNAMIC_ROOT]: DYNAMIC_ROUTES.MIGRATED_USER_WELCOME.path,
                },
            },
            [NAVIGATORS.EXPLANATION_MODAL_NAVIGATOR]: {
                screens: {
                    [SCREENS.EXPLANATION_MODAL.DYNAMIC_ROOT]: DYNAMIC_ROUTES.EXPLANATION_MODAL.path,
                },
            },

    Create the navigator component, following MigratedUserWelcomeModalNavigator as a template:

    https://github.com/Expensify/App/blob/243120adb8affee7c7fe1750be46f1095af621c6/src/libs/Navigation/AppNavigator/Navigators/MigratedUserWelcomeModalNavigator.tsx#L1-L33

    import NoDropZone from '@components/DragAndDrop/NoDropZone';
    import ExplanationModal from '@components/ExplanationModal';
    
    import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator';
    import type {ExplanationModalNavigatorParamList} from '@libs/Navigation/types';
    
    import SCREENS from '@src/SCREENS';
    
    import React from 'react';
    
    const Stack = createPlatformStackNavigator<ExplanationModalNavigatorParamList>();
    
    function ExplanationModalNavigator() {
        return (
            <NoDropZone>
                <Stack.Navigator
                    screenOptions={{
                        headerShown: false,
                        web: {cardStyle: {backgroundColor: 'transparent'}},
                        native: {contentStyle: {backgroundColor: 'transparent'}},
                    }}
                >
                    <Stack.Screen
                        name={SCREENS.EXPLANATION_MODAL.DYNAMIC_ROOT}
                        component={ExplanationModal}
                    />
                </Stack.Navigator>
            </NoDropZone>
        );
    }
    
    export default ExplanationModalNavigator;

    Create the modal content component, using FeatureTrainingModal (the current onClose/onConfirm both mark hybrid app onboarding complete, so the flag only flips once the user actually sees and dismisses the modal):

    import React from 'react';
    import FeatureTrainingModal from '@components/FeatureTrainingModal';
    import useLocalize from '@hooks/useLocalize';
    import {completeHybridAppOnboarding} from '@userActions/Welcome';
    
    function ExplanationModal() {
        const {translate} = useLocalize();
    
        return (
            <FeatureTrainingModal
                title={translate('onboarding.explanationModal.title')}
                description={translate('onboarding.explanationModal.description')}
                confirmText={translate('onboarding.getStarted')}
                onClose={completeHybridAppOnboarding}
                onConfirm={completeHybridAppOnboarding}
            />
        );
    }
    
    export default ExplanationModal;

    Register the new navigator in AuthScreens, next to MigratedUserWelcomeModalNavigator:

    import {ShareModalStackNavigator} from './ModalStackNavigators';
    import FeatureTrainingModalNavigator from './Navigators/FeatureTrainingModalNavigator';
    import MigratedUserWelcomeModalNavigator from './Navigators/MigratedUserWelcomeModalNavigator';

    import {ShareModalStackNavigator} from './ModalStackNavigators';
    import ExplanationModalNavigator from './Navigators/ExplanationModalNavigator';
    import FeatureTrainingModalNavigator from './Navigators/FeatureTrainingModalNavigator';

    <RootStack.Screen
    name={NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR}
    options={rootNavigatorScreenOptions.centeredModalNavigator}
    component={MigratedUserWelcomeModalNavigator}
    />

                            <RootStack.Screen
                                name={NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR}
                                options={rootNavigatorScreenOptions.centeredModalNavigator}
                                component={MigratedUserWelcomeModalNavigator}
                            />
                            <RootStack.Screen
                                name={NAVIGATORS.EXPLANATION_MODAL_NAVIGATOR}
                                options={rootNavigatorScreenOptions.centeredModalNavigator}
                                component={ExplanationModalNavigator}
                            />

    Finally, fix the actual bug: navigate to the explanation modal instead of silently completing onboarding when isHybridAppOnboardingCompleted === false:

    import getCurrentUrl from '@libs/Navigation/currentUrl';
    import Navigation from '@libs/Navigation/Navigation';
    import TransitionTracker from '@libs/Navigation/TransitionTracker';
    import {isLoggingInAsNewUser} from '@libs/SessionUtils';
    import {completeHybridAppOnboarding} from '@userActions/Welcome';
    import {startOnboardingFlow} from '@userActions/Welcome/OnboardingFlow';
    import CONFIG from '@src/CONFIG';
    import ONYXKEYS from '@src/ONYXKEYS';
    import ROUTES from '@src/ROUTES';

    import getCurrentUrl from '@libs/Navigation/currentUrl';
    import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
    import Navigation from '@libs/Navigation/Navigation';
    import TransitionTracker from '@libs/Navigation/TransitionTracker';
    import {isLoggingInAsNewUser} from '@libs/SessionUtils';
    
    import {startOnboardingFlow} from '@userActions/Welcome/OnboardingFlow';
    
    import CONFIG from '@src/CONFIG';
    import ONYXKEYS from '@src/ONYXKEYS';
    import ROUTES, {DYNAMIC_ROUTES} from '@src/ROUTES';

    if (CONFIG.IS_HYBRID_APP) {
    // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
    if (isSingleNewDotEntry) {
    return;
    }
    // Make sure hybrid app onboarding is completed and will not start startOnboardingFlow for users that switched from OldDot.
    if (isHybridAppOnboardingCompleted === false) {
    completeHybridAppOnboarding();
    return;
    }
    }

    // Users switching from OldDot see the "Welcome to Expensify" explanation modal instead of the NewDot
    // onboarding flow. Hybrid app onboarding is only marked complete once they dismiss that modal.
    if (isHybridAppOnboardingCompleted === false) {
        Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EXPLANATION_MODAL.path, Navigation.getActiveRoute() || ROUTES.HOME));
        return;
    }

    With this change, setting classicRedirect.completedHybridAppOnboarding to false and logging into the HybridApp will route the user to the "Welcome to Expensify" modal again, and the flag will only be flipped to true once they close or confirm it.

  18. neerajbachani commented on Jul 8, 2026

    @neerajbachani
    Contributor

    Proposal

    What is the root cause of that problem?

    The "Welcome to Expensify" modal was removed in PR #93779 (chore/remove-explanation-modal, merged Jun 17 2026). Previously, when a Hybrid App user had tryNewDot.classicRedirect.completedHybridAppOnboarding === false (as set by the regression test's NVP.set snippet), useOnboardingFlowRouter navigated to ExplanationModal — a FeatureTrainingModal titled "Welcome to Expensify". That modal's close handler called completeHybridAppOnboarding().

    After the PR, the same code path in useOnboardingFlow.ts calls completeHybridAppOnboarding() immediately with no navigation, so the modal never renders. The regression test correctly sets completedHybridAppOnboarding: false and expects the modal; the app now auto-completes onboarding silently instead.

    This is separate from MigratedUserWelcomeModal ("Welcome to New Expensify!"), which requires nudgeMigration.timestamp and is not involved in this test.

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

    Restore the Hybrid App explanation modal flow removed in PR #93779:

    Re-create ExplanationModal using the existing FeatureTrainingModal pattern. On close/confirm, call completeHybridAppOnboarding() (same as before).

    In useOnboardingFlow.ts, when CONFIG.IS_HYBRID_APP and isHybridAppOnboardingCompleted === false, navigate to ROUTES.EXPLANATION_MODAL_ROOT instead of calling completeHybridAppOnboarding() directly. Keep the early return so guided onboarding does not also start.

    Re-wire navigation: restore ExplanationModalNavigator, register it in AuthScreens, and restore the route/screen/linking/type entries in ROUTES, SCREENS, NAVIGATORS, linkingConfig, and Navigation/types.

    Restore copy and assets: re-add onboarding.explanationModal translations in all locales and CONST.WELCOME_VIDEO_URL.

    After this, the regression steps (set NVP on web → open Hybrid App → login) will show "Welcome to Expensify" again, and dismissing it will persist completedHybridAppOnboarding: true as before.

    What alternative solutions did you explore? (Optional)

    Update the BrowserStack regression test to expect no modal, matching the post-#93779 behavior. Rejected because the test and Help Wanted issue both expect the modal, and the removal PR was labeled chore with no indication QA/product signed off on dropping this user-facing step.

    Show a different existing modal (e.g. MigratedUserWelcomeModal). Rejected because it is a different product flow (nudge-migration cohort) with different copy and gating conditions.

    Keep silent auto-complete. Rejected — it removes the only moment where transitioning Classic users are told they are in New Expensify and how to switch back.

  19. x-dev90 commented on Jul 8, 2026

    @x-dev90
    Contributor

    Proposal

    What is the root cause of that problem?

    The App already reads tryNewDot.classicRedirect.completedHybridAppOnboarding in tryNewDotOnyxSelector, but it only exposes that value separately from the nudge-migration modal signal:

    function tryNewDotOnyxSelector(tryNewDotData: OnyxValue<typeof ONYXKEYS.NVP_TRY_NEW_DOT>): {isHybridAppOnboardingCompleted: boolean | undefined; hasBeenAddedToNudgeMigration: boolean} {
    let isHybridAppOnboardingCompleted = tryNewDotData?.classicRedirect?.completedHybridAppOnboarding;
    const hasBeenAddedToNudgeMigration = !!tryNewDotData?.nudgeMigration?.timestamp;
    // Backend might return strings instead of booleans
    if (typeof isHybridAppOnboardingCompleted === 'string') {
    isHybridAppOnboardingCompleted = isHybridAppOnboardingCompleted === 'true';
    }
    return {isHybridAppOnboardingCompleted, hasBeenAddedToNudgeMigration};

    When HybridApp starts and completedHybridAppOnboarding === false, useOnboardingFlowRouter immediately calls completeHybridAppOnboarding() and returns:

    if (CONFIG.IS_HYBRID_APP) {
    // For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
    if (isSingleNewDotEntry) {
    return;
    }
    // Make sure hybrid app onboarding is completed and will not start startOnboardingFlow for users that switched from OldDot.
    if (isHybridAppOnboardingCompleted === false) {
    completeHybridAppOnboarding();
    return;
    }

    That action optimistically flips classicRedirect.completedHybridAppOnboarding to true and propagates completion to OldDot:

    function completeHybridAppOnboarding() {
    if (!CONFIG.IS_HYBRID_APP) {
    return;
    }
    const optimisticData: Array<OnyxUpdate<typeof ONYXKEYS.NVP_TRY_NEW_DOT>> = [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.NVP_TRY_NEW_DOT,
    value: {
    classicRedirect: {
    completedHybridAppOnboarding: true,
    },
    },
    },
    ];
    // eslint-disable-next-line rulesdir/no-api-side-effects-method
    API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.COMPLETE_HYBRID_APP_ONBOARDING, {}, {optimisticData}).then((response) => {
    if (!response) {
    return;
    }
    // No matter what the response is, we want to mark the onboarding as completed.
    Log.info(`[HybridApp] Onboarding status has changed. Propagating new value to OldDot`, true);
    HybridAppModule.completeOnboarding({status: true});
    });

    The migrated welcome modal guard only checks hasBeenAddedToNudgeMigration, which comes from tryNewDot.nudgeMigration.timestamp, so the repro state {classicRedirect: {dismissed: false, completedHybridAppOnboarding: false}} never qualifies for the modal:

    function navigateToMigratedUserWelcomeModalIfReady() {
    if (
    !session?.authToken ||
    isLoadingApp ||
    hasRedirectedToMigratedUserModal ||
    !hasBeenAddedToNudgeMigration ||
    !isDismissedProductTrainingLoaded ||
    isProductTrainingElementDismissed('migratedUserWelcomeModal', dismissedProductTraining)
    and
    if (hasBeenAddedToNudgeMigration && !isProductTrainingElementDismissed('migratedUserWelcomeModal', dismissedProductTraining)) {
    Log.info('[MigratedUserWelcomeModalGuard] Redirecting to migrated user welcome modal');
    hasRedirectedToMigratedUserModal = true;
    return {
    type: 'REDIRECT',
    route: getMigratedUserWelcomeModalRoute(),
    };

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

    Add a derived selector value for the classic-redirect welcome state, then use it only as a HybridApp modal trigger.

    Required changes:

    • In tryNewDotOnyxSelector, derive shouldShowClassicRedirectWelcomeModal from classicRedirect.dismissed === false && completedHybridAppOnboarding !== true, while preserving the existing nudge-migration flag.
    • In MigratedUserWelcomeModalGuard, trigger the existing migrated welcome modal when either nudge migration is present or CONFIG.IS_HYBRID_APP && shouldShowClassicRedirectWelcomeModal.
    • In useOnboardingFlowRouter, stop calling completeHybridAppOnboarding() before the modal can appear when the classic-redirect welcome state is pending.
    • In MigratedUserWelcomeModal, call completeHybridAppOnboarding() when the pending HybridApp welcome modal is dismissed or the help CTA is used.
    • In ProductTrainingContext, suppress other product-training tooltips while either the nudge-migration welcome modal or pending HybridApp welcome modal is waiting to be dismissed.

    Tests that should be added:

    • Selector coverage for classicRedirect: {dismissed: false, completedHybridAppOnboarding: false} and string boolean variants.
    • MigratedUserWelcomeModalGuard coverage showing the modal redirects for the HybridApp classic-redirect state without nudgeMigration.
    • ProductTrainingContextProvider coverage showing other tooltips are hidden while the HybridApp welcome modal is pending.
    • Modal/action coverage proving completeHybridAppOnboarding() is called only after the welcome modal dismissal path.

    Several existing proposals identify the same root cause, but each misses at least one part needed for a clean App-side fix. Guard-only proposals still allow useOnboardingFlowRouter to mark onboarding complete before the modal is shown. Router/modal proposals that do not update product-training suppression leave other tooltips eligible while the welcome modal is pending. A shared “show migrated welcome modal” selector without HybridApp gating can leak the classic-redirect test state into regular NewDot web behavior. This proposal keeps the existing nudge-migration modal behavior intact and only adds the classic-redirect trigger inside HybridApp.

    What alternative solutions did you explore? (Optional)

  20. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

    ⚠️ @x-dev90 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.

  21. Harxhit commented on Jul 8, 2026

    @Harxhit

    Proposal

    What is the root cause of that problem?

    The "Welcome to Expensify" modal isn't part of App at all — it's rendered by Mobile-Expensify (OldDot). The only thing connecting the two codebases here is the HybridApp native bridge, and that bridge exposes exactly one relevant method: completeOnboarding({status}). App can use it to dismiss OldDot's modal, but there's nothing on the App side that can make that modal appear in the first place.

    The actual bug is in how App decides when to fire that "done" signal. In src/hooks/useOnboardingFlow.ts (around lines 81-84), the onboarding router checks classicRedirect.completedHybridAppOnboarding. If it's false, App assumes this must be an existing OldDot user who should skip NewDot's onboarding, calls completeHybridAppOnboarding(), and returns early. That function, in src/libs/actions/Welcome/index.ts (lines 101-128), sets completedHybridAppOnboarding: true in Onyx and calls HybridAppModule.completeOnboarding({status: true}), which tells OldDot the modal has already been handled.

    The repro sets the NVP to {dismissed: false, completedHybridAppOnboarding: false} before logging in, which is exactly the state that trips this logic. So on login, App immediately reports "onboarding done" back to OldDot, before OldDot ever gets a chance to show its modal.

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

    The problem with the current check is that it can't tell apart two situations that look identical from App's side: a returning OldDot user who's genuinely already been onboarded, and a brand-new user who hasn't seen the modal yet. Both show up with completedHybridAppOnboarding: false, so both get auto-completed the same way.

    A safer version would only auto-complete when there's an actual signal that this session went through App's onboarding, rather than firing just because the flag showed up unset:

    - if (isHybridAppOnboardingCompleted === false) {
    -     completeHybridAppOnboarding();
    -     return;
    - }
    + if (isHybridAppOnboardingCompleted === false && hasJustFinishedAppOnboarding) {
    +     completeHybridAppOnboarding();
    +     return;
    + }

    I want to flag that this only covers App's side of things. Whether OldDot's own modal-trigger condition is correct, or has a separate issue of its own, lives in Mobile-Expensify, which isn't accessible from here. I'd treat this as needing sign-off from someone who can check both repos side by side before calling it a complete fix.

    What alternative solutions did you explore?

    I considered whether the fix should be a platform check instead, loosening whatever gates the modal on the OldDot side. That doesn't hold up once you look at where the modal actually lives — there's no modal-trigger function in App to loosen a gate on in the first place. The only thing App genuinely controls is when it tells OldDot that onboarding is finished, which is why the fix above targets that signal instead of reaching into OldDot's rendering logic from a repo that doesn't contain it.

  22. KJ21-ENG commented on Jul 8, 2026

    @KJ21-ENG
    Contributor

    Updated my proposal.

    What changed: The final body now targets the HybridApp explanation modal completion path instead of the migrated-user welcome modal gate.

    Why: The reported surface is the classic Welcome to Expensify HybridApp modal, and the current code marks that flow complete before showing it.

  23. mjunaid125 commented on Jul 8, 2026

    @mjunaid125

    Root Cause Analysis:
    The issue is likely in the HybridApp onboarding check logic. When completedHybridAppOnboarding: false is set via NVP snippet, the modal condition check is probably not re-evaluating correctly after login because:

    The tryNewDot NVP value is being read at app initialization only — not re-checked after authentication completes
    The classicRedirect.dismissed: false flag may not be triggering the modal display condition on the hybrid web path

    Files to investigate:

    src/libs/actions/Welcome.ts — modal trigger logic
    src/components/OnboardingWizard/ — modal display conditions
    src/hooks/useOnboardingFlowRouter.ts — routing after login
    NVP tryNewDot reading logic in hybrid app flow

    Proposed Fix:

    Locate where completedHybridAppOnboarding is checked after login
    Ensure the modal trigger re-evaluates NVP tryNewDot state after authentication is complete, not only at cold start
    Add a condition check: if classicRedirect.dismissed === false AND completedHybridAppOnboarding === false → show modal
    Verify the fix on both iOS and Android native app (not mWeb)

    Testing Plan:

    Reproduce exactly per precondition steps
    Run NVP snippet, login, verify modal appears
    Test on iOS App + Android App
    Confirm no regression on normal onboarding flow

    Contributor details
    Your Expensify account email: muhammadjunaidtanveer20@gmail.com
    Upwork Profile Link:
    Regard
    Xino Solutions

  24. melvin-bot commented on Jul 8, 2026

    @melvin-bot

    📣 @mjunaid125! 📣
    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:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  25. Julesssss commented on Jul 8, 2026

    @Julesssss
    Contributor

    Not a bug but expected behaviour.

  26. self-assigned this
    on Jul 8, 2026
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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions