Skip to content

Onboarding - Old UI briefly appears after page reload #90284

Closed

Description

@mitarachim

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


Version Number: v9.3.70-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #88796
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 11, Chrome
App Component: Other

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Sign up using a Gmail address
  3. Click Skip > Manage my team's expenses > 11-50 employees > Continue
  4. Reload the page

Expected Result:

The new onboarding UI should remain consistent after reloading the page without briefly showing the old onboarding UI.

Actual Result:

After reloading the page, the old onboarding UI briefly appears before switching back to the new onboarding UI.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7151381_1778545546749.sGbckXxtej.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 12, 2026
  2. melvin-bot commented on May 12, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #88796

  3. melvin-bot commented on May 12, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on May 12, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. OSBotify commented on May 12, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #88796 - "Update onboarding purpose modal for Release 4.0" by @jayeshmangwani (High confidence)
    Related Issues: #88219

    Recommendation: REVERT

    PR #88796 modified the onboarding purpose screen and how custom choices are set, and is the only change in this staging cycle that touches the affected code path. The bug is staging-only (not in production), which aligns with this PR being newly merged on 2026-05-11.

    Assigned: @jayeshmangwani (PR author), @dangrous (approving reviewer) from highest-confidence causing PR only
    Labels: DeployBlockerCash kept (frontend App PR caused the issue). No label changes made.

    Detailed Analysis

    Evidence

    Verification

    Affected files:

    • src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx — controls which choices are displayed
    • src/libs/actions/Welcome/OnboardingFlow.ts — sets ONYXKEYS.ONBOARDING_CUSTOM_CHOICES based on the signupQualifier
    • src/libs/Navigation/AppNavigator/Navigators/OnboardingModalNavigator.tsx — controls the navigator's initialRouteName

    PR #88796 modifies all three of these files.

    Root Cause

    The flash of old UI on page reload is a loading race condition introduced by PR #88796's changes:

    1. BaseOnboardingPurpose.tsx reads ONYXKEYS.ONBOARDING_CUSTOM_CHOICES from Onyx and defaults to an empty array until the value loads from storage.
    2. getOnboardingChoices returns ALL selectableOnboardingChoices when customChoices is empty.
    3. PR Update onboarding purpose modal for Release 4.0 #88796 changed the selectableOnboardingChoices shape (adding new TRACK_BUSINESS/TRACK_PERSONAL, removing PERSONAL_SPEND/CHAT_SPLIT) and updated OnboardingFlow.ts to call Onyx.set(ONYXKEYS.ONBOARDING_CUSTOM_CHOICES, [...]) for individual users.
    4. On page reload, there is a brief window where ONBOARDING_CUSTOM_CHOICES has not loaded yet, causing the purpose screen to render with the full (unfiltered) selectable choice set instead of the individual-user subset. This creates the visual flash the tester observed.
    5. The addition of animationTypeForReplace: 'push' to the PURPOSE screen in OnboardingModalNavigator.tsx may also contribute to the animation behavior on reload.

    The reproduction steps (sign up with Gmail, choose "Manage my team's expenses", 11-50 employees, continue, then reload) are directly affected by the isIndividual / signupQualifier logic path added in this PR.

  6. MelvinBot commented on May 12, 2026

    @MelvinBot
    Contributor

    Proposal

    Updated 2026-05-18: Revised to cover all onboarding modals per feedback from jayeshmangwani.

    Problem

    On page reload during onboarding, the PURPOSE screen briefly flashes before the correct screen appears. This affects all onboarding modals (not just PURPOSE → EMPLOYEES), because the initialRouteName logic only handles 4 of 13 screens — any unhandled screen falls back to PURPOSE on reload.

    Solution

    The root cause is that OnboardingModalNavigator.tsx renders before startOnboardingFlow has had a chance to compute the correct route via getOnboardingInitialPath.

    Fix in OnboardingModalNavigator.tsx:

    1. Wait for all required Onyx values to load before rendering. The current loading guard (lines 111-113) only waits for ACCOUNT metadata. It must also wait for ONBOARDING_PURPOSE_SELECTED, ONBOARDING_POLICY_ID, and critically NVP_ONBOARDING (which contains signupQualifier and lastVisitedPath used by getOnboardingInitialPath). Capture the metadata results from the existing useOnyx calls at lines 49-51 and add a useOnyx call for NVP_ONBOARDING, then include all metadata in the isLoadingOnyxValue check.

    2. This is sufficient because once all Onyx values are loaded, getOnboardingInitialPath (which already handles all 13 screens — VSB → accounting, SMB → employees, public domain → work email, private domain → personal details, plus lastVisitedPath resume) will route correctly on the first render. No need to duplicate its routing logic in the navigator's initialRouteName.

    This eliminates the flash for all onboarding modals by ensuring the navigator never renders until the routing system has the data it needs.

    Investigation details

    Why the flash happens on reload:

    1. User is on any non-default onboarding screen (e.g., WORK_EMAIL, EMPLOYEES), reloads
    2. ACCOUNT loads from Onyx cache quickly; other values (NVP_ONBOARDING, ONBOARDING_PURPOSE_SELECTED) may still be loading
    3. Navigator passes its loading check (only checks accountMetadata) and renders
    4. initialRouteName evaluates to PURPOSE (default) since the logic doesn't handle most screens
    5. Stack.Navigator mounts showing PURPOSE — the "old" UI flashes
    6. startOnboardingFlow fires later → getOnboardingInitialPath returns the correct path → navigationRef.resetRoot replaces nav state — correct screen appears

    Screens covered by getOnboardingInitialPath but NOT by initialRouteName:
    EMPLOYEES, ACCOUNTING, WORKSPACES, INTERESTED_FEATURES, WORK_EMAIL_VALIDATION, PRIVATE_DOMAIN, WORKSPACE_OPTIONAL, WORKSPACE_CONFIRMATION, WORKSPACE_CURRENCY

    Key code references:


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

  7. jayeshmangwani commented on May 12, 2026

    @jayeshmangwani
    Contributor

    @mitarachim Can we please retest this? I’m not able to reproduce the issue right now.

  8. 23 remaining items

  9. dangrous commented on May 22, 2026

    @dangrous
    Contributor

    hrm those PRs are quite old. Can you investigate specifically what might cause the Expensify logo to show up in these onboarding flows, as it relates to Convert Experiences? @MelvinBot

  10. MelvinBot commented on May 22, 2026

    @MelvinBot
    Contributor

    The Expensify logo on onboarding modals is not from Convert Experiences — it's the App's own built-in HTML splash screen.

    web/index.html:174-178 contains a #splash div with an environment-specific Expensify logo SVG inlined at build time via webpack.common.ts:166. For staging, this is new-expensify-stg.svg (the green "E" with "STG" badge). It renders at z-index: 10000 immediately on page load and stays visible until Onyx migration, navigation init, locale loading, and public room check all complete (Expensify.tsx:139-140), then fades out over 250ms (BootSplash/index.ts:18).

    Why it doesn't appear on ad hoc: It actually does — but the ad hoc splash uses a different logo file (new-expensify-adhoc.svg per the suffix map at webpack.common.ts:82-87), which may look different or be less noticeable. The staging logo is the distinctive large green "E" + "STG" badge.

    Convert Experiences is not the cause — it loads on ALL web builds (staging, ad hoc, dev) because it's gated only on isWeb (web/index.html:43), not useThirdPartyScripts. The team was already aware of Convert overlays — there's even an explicit comment: z-index: 10000; /* Ensure splash stays above third-party overlays like Convert survey */ at web/index.html:144.

    One caveat: We can't inspect Convert's remote configuration from code alone. If Convert has staging-specific A/B experiments that modify onboarding DOM elements (configured per-domain in their dashboard), that could contribute. But the logo itself is definitively from the splash screen, not Convert injection. iwiznia would be the person to check Convert's dashboard for active experiments targeting onboarding pages if you want to fully rule it out.

  11. melvin-bot commented on May 25, 2026

    @melvin-bot

    @dangrous, @jayeshmangwani Whoops! This issue is 2 days overdue. Let's get this updated quick!

  12. dangrous commented on May 26, 2026

    @dangrous
    Contributor

    Wait @jayeshmangwani I'm now a little confused on what the problem is. Is it:

    It seems like we (except Melvin, haha) are discussing the first one, but was the original issue the last one?

  13. melvin-bot commented on May 26, 2026

    @melvin-bot

    @dangrous @jayeshmangwani this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  14. jayeshmangwani commented on May 27, 2026

    @jayeshmangwani
    Contributor

    The wrong onboarding step is showing (see #90284 (comment))

    @dangrous I tried reloading every onboarding modal page, and the correct page loads each time. The only issue I can reproduce is that the logo appears after about a second.

    onboardin-modal-reload.mov
  15. dangrous commented on May 28, 2026

    @dangrous
    Contributor

    Oh, okay.

    @MelvinBot please analyze why the full Expensify logo doesn't load immediately on top of the onboarding (NOT the splash screen).

  16. MelvinBot commented on May 28, 2026

    @MelvinBot
    Contributor

    The delayed wordmark overlay is being injected by Convert Experiences (LeanConvert), not the App itself. This is a configuration in Convert's dashboard, not a code bug in Expensify/App.

    The ~1s delay is Convert's async bootstrap: the third-party script at web/index.html:43-48 loads, fetches the experiment bundle, evaluates audience targeting, then injects DOM — all after first paint. That's why it appears after the onboarding modal renders.

    Why staging but not ad hoc: The Convert script tag itself is gated only on isWeb, so it actually loads on both. But the experiment that paints the overlay is configured per-domain in Convert's dashboard — its audience targets staging.new.expensify.com and does not match the ad hoc hostname (91155.pr-testing.expensify.com). That's why jayeshmangwani sees the logo on staging but not on ad hoc.

    Why we know it's not in-app code:

    • No onboarding page in src/pages/Onboarding* renders ExpensifyWordmark. The only consumers are sign-in / error / breadcrumb / nav-tab components — none of which display during onboarding.
    • The bootsplash logo (web/index.html:174-178) fades after ~250ms (BootSplash/index.ts:18) and cannot produce a delayed overlay.
    • The team already documented Convert as a known overlay source: web/index.html:144 has the comment /* Ensure splash stays above third-party overlays like Convert survey */.

    Recommended next steps

    1. Escalate to whoever owns the Convert Experiences account (Growth/Marketing — iwiznia is a good starting point as they authored the integration). Ask them to identify which experiment is targeting staging.new.expensify.com and rendering an Expensify wordmark over onboarding, then either disable it on onboarding routes or update its audience.
    2. Confirm definitively in DevTools. Have jayeshmangwani reproduce on staging, right-click the logo overlay → Inspect Element. The DOM node's class/id/data attributes will identify Convert (look for convert_* classes or elements from convertexperiments.com) vs any other source. Also check the Network tab for convertexperiments.com requests around the logo appearance time.

    What this means for Expensify/App#90947

    The PR addresses the original reported bug (wrong onboarding step flashing on reload), which is a real App-side race in OnboardingModalNavigator. That fix is still valid and worth shipping. The delayed-logo concern is a separate third-party / Convert dashboard issue and should be handled independently — don't block the PR on it.

    Alternative explanations considered
    • Ketch consent UI (web/index.html:37-41) — also useThirdPartyScripts && isWeb-gated and staging-only vs ad hoc, but it renders a cookie banner, not an Expensify-branded logo. Unlikely match.
    • GTM (web/index.html:154-163) — staging-only but doesn't render visible UI by itself.
    • In-app A/B feature flag delivering an onboarding welcome screen — searched OnboardingWelcomeVideo, IntroLogo, WelcomeVideoIfNeeded and found no matches in src/.

    Confidence: Medium-High. The mechanism fits every clue (delay, staging-only by domain, not present in any in-app component, team already calls Convert out as an overlay source). The remaining uncertainty is that I can't inspect the live DOM or Convert dashboard from code alone — the DevTools step above will close that gap in 30 seconds.


    Next Steps for Contributor+ team:
    To accept: Escalate to the Convert owner (no App-side code change needed).
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you think the logo is App-rendered after all.

  17. dylanexpensify commented on May 29, 2026

    @dylanexpensify
    Contributor

    @jayeshmangwani we had all experiments turned off now in staging too, can you see if this is still happening?

  18. jayeshmangwani commented on May 29, 2026

    @jayeshmangwani
    Contributor

    @dylanexpensify it’s not happening anymore. We’re no longer seeing the logo on staging, so unable to reproduce the issue now.

    logo-on-refresh.mov
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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions