You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
web - AI promo modal - Promo model not displayed until page refresh #93974
Version Number: 9.4.15-1 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#92007 Email or phone of affected tester (no customers):vbfgrt56des@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Win 11/Chrome App Component: Other
Action Performed:
Precondition: clear the browser cache and do a hard refresh or try in incognito
Go to staging.new.expensify.com
Log in with a new account.
Complete onboarding (Onboard as Manage my team, 1-4, QBO).
👋 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:
Identify the pull request that introduced this issue and revert it.
The AI promo modal is gated by a session-long suppression flag, observedActiveOnboardingThisSession, introduced in AIFeaturesPromoGuard.ts (PR #92007). It is a write-once latch: it is only ever set to true, never reset within a session. For a brand-new user it trips immediately during onboarding — before they finish — so the modal stays suppressed for the rest of the session. A hard refresh re-initializes the module (flag back to false) and, since onboarding is now complete, nothing re-trips it, so the modal finally appears.
Both code paths trip the flag during the "Manage my team" flow because the server seeds NVP_ONBOARDING.hasCompletedGuidedSetupFlow = false for new users:
Onyx path — AIFeaturesPromoGuard.ts:156-157: when hasCompletedGuidedSetupFlowSelector(onboarding) === false, it latches observedActiveOnboardingThisSession = true. When onboarding completes (ReportUtils.ts:11999 merges hasCompletedGuidedSetupFlow: true), the === false branch is simply skipped — the flag is never cleared.
New user boots → server seeds NVP_ONBOARDING.hasCompletedGuidedSetupFlow = false (the field is required: Onboarding.ts:10; selector returns the explicit value at Onboarding.ts:23). useOnboardingFlow relies on the same === false to even launch onboarding (useOnboardingFlow.ts:46).
Both the Onyx callback and the nav-state listener latch observedActiveOnboardingThisSession = true — during onboarding, before completion.
User completes onboarding → hasCompletedGuidedSetupFlow flips to true, onboarding navigator unmounts. The latch is never reset.
Lands on Home → eligibility check returns false → modal not shown.
Hard refresh → module re-initializes (latch false), onboarding already complete so neither path re-trips → modal shows.
The flag is grep-confirmed to only ever be assigned true (lines 58 and 157) and never reset within a session.
What changes do you think we should make in order to solve the problem?
Stop treating observedActiveOnboardingThisSession as a one-way latch and instead evaluate the onboarding-active condition live at eligibility-check time, so completing onboarding re-opens the gate:
In the NVP_ONBOARDING callback, re-derive the flag every time instead of only ever setting true — i.e. set it to hasCompletedGuidedSetupFlowSelector(onboarding) === false so it flips back to false once onboarding completes.
Have the nav-state listener reflect the current presence of ONBOARDING_MODAL_NAVIGATOR rather than latching, so it clears once the navigator unmounts.
The "don't stack the promo on top of an active onboarding/migration modal" guarantee is preserved because the modal is only navigated to after Navigation.waitForProtectedRoutes() and TransitionTracker.runAfterTransitions settle — i.e. only once onboarding is dismissed and Home has rendered.
⚠️ Note: the guard's own comment says the promo "must not appear in the same session as ... the onboarding flow." That intent directly conflicts with this issue's expected behavior (show right after onboarding completes). Please confirm the intended product behavior before implementing — if same-session suppression was deliberate, the fix is instead to relax that requirement for the onboarding case specifically.
What alternative solutions did you explore? (Optional)
None — the root cause is a single sticky flag with two redundant trip points.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93974) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
This is expected. Promo modal is expected not to appear in the same session as onboarding/migrated user modals. It should appear the next time user opens App. I'll add it to Tests section in second attempt so QA team is aware of.
@gijoe0295 I was signing out and then back in though and then still not seeing it until there was a hard refresh. That is not expected right? Do you mind confirming that is not happening still
@gijoe0295 I was signing out and then back in though and then still not seeing it until there was a hard refresh. That is not expected right? Do you mind confirming that is not happening still
Yes my implementation is that the modal would show the next time user closes and reopens app. Signing out and back then still belongs to the same app opening so it won't show.
@gijoe0295 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!
Activity
applause-bot commentedon Jun 18, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/2ec7e88ebcd40c43b6980991714c377b6e836d16da8a26cd46baa112bc9e912a
melvin-bot commentedon Jun 18, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92007
melvin-bot commentedon Jun 18, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 18, 2026
👋 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:
MelvinBot commentedon Jun 18, 2026
Proposal
What is the root cause of that problem?
The AI promo modal is gated by a session-long suppression flag,
observedActiveOnboardingThisSession, introduced inAIFeaturesPromoGuard.ts(PR #92007). It is a write-once latch: it is only ever set totrue, never reset within a session. For a brand-new user it trips immediately during onboarding — before they finish — so the modal stays suppressed for the rest of the session. A hard refresh re-initializes the module (flag back tofalse) and, since onboarding is now complete, nothing re-trips it, so the modal finally appears.Both code paths trip the flag during the "Manage my team" flow because the server seeds
NVP_ONBOARDING.hasCompletedGuidedSetupFlow = falsefor new users:AIFeaturesPromoGuard.ts:156-157: whenhasCompletedGuidedSetupFlowSelector(onboarding) === false, it latchesobservedActiveOnboardingThisSession = true. When onboarding completes (ReportUtils.ts:11999mergeshasCompletedGuidedSetupFlow: true), the=== falsebranch is simply skipped — the flag is never cleared.AIFeaturesPromoGuard.ts:57-58: latches the same flag wheneverONBOARDING_MODAL_NAVIGATORis in the nav tree, which it is throughout onboarding (AuthScreens.tsx:331-342).Once latched,
isEligibleToShowAIFeaturesPromoModal()(which requires!observedActiveOnboardingThisSession) returnsfalsefor the rest of the session.Evidence / data flow
NVP_ONBOARDING.hasCompletedGuidedSetupFlow = false(the field is required:Onboarding.ts:10; selector returns the explicit value atOnboarding.ts:23).useOnboardingFlowrelies on the same=== falseto even launch onboarding (useOnboardingFlow.ts:46).observedActiveOnboardingThisSession = true— during onboarding, before completion.hasCompletedGuidedSetupFlowflips totrue, onboarding navigator unmounts. The latch is never reset.false→ modal not shown.false), onboarding already complete so neither path re-trips → modal shows.The flag is grep-confirmed to only ever be assigned
true(lines 58 and 157) and never reset within a session.What changes do you think we should make in order to solve the problem?
Stop treating
observedActiveOnboardingThisSessionas a one-way latch and instead evaluate the onboarding-active condition live at eligibility-check time, so completing onboarding re-opens the gate:true— i.e. set it tohasCompletedGuidedSetupFlowSelector(onboarding) === falseso it flips back tofalseonce onboarding completes.ONBOARDING_MODAL_NAVIGATORrather than latching, so it clears once the navigator unmounts.The "don't stack the promo on top of an active onboarding/migration modal" guarantee is preserved because the modal is only navigated to after
Navigation.waitForProtectedRoutes()andTransitionTracker.runAfterTransitionssettle — i.e. only once onboarding is dismissed and Home has rendered.What alternative solutions did you explore? (Optional)
None — the root cause is a single sticky flag with two redundant trip points.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93974)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
IuliiaHerets commentedon Jun 18, 2026
Chrome / v9.4.15-2
no AI modal
bandicam.2026-06-19.00-42-02-079.mp4
gijoe0295 commentedon Jun 19, 2026
This is expected. Promo modal is expected not to appear in the same session as onboarding/migrated user modals. It should appear the next time user opens App. I'll add it to
Testssection in second attempt so QA team is aware of.danielrvidal commentedon Jun 22, 2026
@gijoe0295 I was signing out and then back in though and then still not seeing it until there was a hard refresh. That is not expected right? Do you mind confirming that is not happening still
gijoe0295 commentedon Jun 25, 2026
Yes my implementation is that the modal would show the next time user closes and reopens app. Signing out and back then still belongs to the same app opening so it won't show.
danielrvidal commentedon Jun 29, 2026
Aw, got it. Thank you!
melvin-bot commentedon Jul 2, 2026
@gijoe0295 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!
gijoe0295 commentedon Jul 3, 2026
@danielrvidal Can you close this?