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
[Due for payment 2026-07-21] AI promo modal - Modal reappears everytime user switches to Agent as copilot. #93973
Version Number: 9.4.15-0 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):ibellicotest+2766@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Other
Action Performed:
Prerequisite: Account has at least one Agent created.
Open the staging.new.expensify.com website.
Navigate to "Account"
Click on copilot switcher on top of the page.
Select an agent to switch account.
Note that after accounts are switched, "AI promo" modal appears.
Click on "Next" > "Next" > "Let´s go"
Click on copilot switcher and return to original account.
Click on switcher one more time and switch to the same agent´s account again.
Note that modal appears again.
Expected Result:
"AI promo" modal should only appear once on the same account.
Actual Result:
"AI promo" modal appears everyitime the user switches to agent´s account as copilot.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
The new AI features promo modal (added in #92007) reappears every time a user switches into another account as a copilot/delegate, instead of only showing once per account.
What is the root cause of that problem?
The promo modal's "show once" logic is driven entirely by the nvp_dismissedProductTraining NVP — the eligibility gate in AIFeaturesPromoGuard.ts:77-89 checks only isProductTrainingElementDismissed(...) and has no awareness of copilot/delegate mode.
When you switch into another account as a copilot, the delegate flow clears Onyx (the dismissed NVP is not in KEYS_TO_PRESERVE_DELEGATE_ACCESS) and re-runs openApp for the agent account (Delegate.ts:29-48, Delegate.ts:216-234). If the dismissal didn't persist server-side for the agent account under the delegate session, the NVP comes back empty and the guard re-shows the modal on every switch.
The established pattern for one-time training UI is to not show it at all while acting as a copilot — the analogous product-training tooltips do exactly this in ProductTrainingContext/index.tsx:192-197 (if (isActingAsDelegate) return false;). The AI promo guard simply omits this check.
Delegate switch wipes Onyx + re-fetches NVPs; the dismissed NVP is not preserved.
Ready-made selector for the fix: selectors/Account.ts:4 (isActingAsDelegateSelector); action helper equivalent isConnectedAsDelegate in Delegate.ts.
Open backend question (logs would confirm): whether DismissProductTraining actually persists the dismissal for a delegate's own session vs. no-op'ing — but the frontend fix below resolves the reappearance regardless of the answer.
What changes do you think we should make in order to solve the problem?
Add a copilot/delegate guard to the AI promo modal eligibility, mirroring ProductTrainingContext:
In AIFeaturesPromoGuard.ts, subscribe to ONYXKEYS.ACCOUNT (via Onyx.connectWithoutView, as the guard already does for other keys) and read delegate state with isActingAsDelegateSelector from selectors/Account.ts.
In isEligibleToShowAIFeaturesPromoModal (lines 77-89), return false when acting as a delegate — so the promo never shows while in copilot mode.
This makes the AI promo consistent with existing training UI and stops the deploy-blocker reappearance independent of any backend NVP-persistence question.
What alternative solutions did you explore?
Fixing server-side NVP persistence so DismissProductTraining is stored for delegate sessions. This is a valid complementary fix but lives outside the App repo (Auth/Web-Expensify) and wouldn't address the more fundamental product question of whether a copilot should see another user's promo at all — so the frontend guard is the right deploy-blocker fix.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93973) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]AI promo modal - Modal reappears everytime user switches to Agent as copilot.[/-][+][Due for payment 2026-07-21] AI promo modal - Modal reappears everytime user switches to Agent as copilot.[/+]on Jul 14, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.33-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@mjasikowski The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
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/3408d39eeb783ed984ef2c2d7ea0e83dfec68137c1e92945dafe8da56484981e
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
Please re-state the problem that we are trying to solve in this issue.
The new AI features promo modal (added in #92007) reappears every time a user switches into another account as a copilot/delegate, instead of only showing once per account.
What is the root cause of that problem?
The promo modal's "show once" logic is driven entirely by the
nvp_dismissedProductTrainingNVP — the eligibility gate inAIFeaturesPromoGuard.ts:77-89checks onlyisProductTrainingElementDismissed(...)and has no awareness of copilot/delegate mode.When you switch into another account as a copilot, the delegate flow clears Onyx (the dismissed NVP is not in
KEYS_TO_PRESERVE_DELEGATE_ACCESS) and re-runsopenAppfor the agent account (Delegate.ts:29-48,Delegate.ts:216-234). If the dismissal didn't persist server-side for the agent account under the delegate session, the NVP comes back empty and the guard re-shows the modal on every switch.The established pattern for one-time training UI is to not show it at all while acting as a copilot — the analogous product-training tooltips do exactly this in
ProductTrainingContext/index.tsx:192-197(if (isActingAsDelegate) return false;). The AI promo guard simply omits this check.Investigation details & evidence
AIFeaturesPromoGuard.ts:77-89.DismissProductTraining:Welcome/index.ts:191-207, triggered fromAIFeaturesPromoModal/index.tsx:69-73.selectors/Account.ts:4(isActingAsDelegateSelector); action helper equivalentisConnectedAsDelegateinDelegate.ts.Open backend question (logs would confirm): whether
DismissProductTrainingactually persists the dismissal for a delegate's own session vs. no-op'ing — but the frontend fix below resolves the reappearance regardless of the answer.What changes do you think we should make in order to solve the problem?
Add a copilot/delegate guard to the AI promo modal eligibility, mirroring
ProductTrainingContext:AIFeaturesPromoGuard.ts, subscribe toONYXKEYS.ACCOUNT(viaOnyx.connectWithoutView, as the guard already does for other keys) and read delegate state withisActingAsDelegateSelectorfromselectors/Account.ts.isEligibleToShowAIFeaturesPromoModal(lines 77-89), returnfalsewhen acting as a delegate — so the promo never shows while in copilot mode.This makes the AI promo consistent with existing training UI and stops the deploy-blocker reappearance independent of any backend NVP-persistence question.
What alternative solutions did you explore?
Fixing server-side NVP persistence so
DismissProductTrainingis stored for delegate sessions. This is a valid complementary fix but lives outside the App repo (Auth/Web-Expensify) and wouldn't address the more fundamental product question of whether a copilot should see another user's promo at all — so the frontend guard is the right deploy-blocker fix.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93973)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-39-15-178.mp4
Suppress AI promo modal while acting as a delegate
melvin-bot commentedon Jul 10, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
lanitochka17 commentedon Jul 10, 2026
Deploy Blocker #95856 was identified to be related to the PR #94012 that attempted to fix this issue.
melvin-bot commentedon Jul 10, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
[-]AI promo modal - Modal reappears everytime user switches to Agent as copilot.[/-][+][Due for payment 2026-07-21] AI promo modal - Modal reappears everytime user switches to Agent as copilot.[/+]melvin-bot commentedon Jul 14, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 14, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.33-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-07-21. 🎊
melvin-bot commentedon Jul 14, 2026
@mjasikowski The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]