Skip to content

[Due for payment 2026-07-21] AI promo modal - Modal reappears everytime user switches to Agent as copilot. #93973

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: 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.

  1. Open the staging.new.expensify.com website.
  2. Navigate to "Account"
  3. Click on copilot switcher on top of the page.
  4. Select an agent to switch account.
  5. Note that after accounts are switched, "AI promo" modal appears.
  6. Click on "Next" > "Next" > "Let´s go"
  7. Click on copilot switcher and return to original account.
  8. Click on switcher one more time and switch to the same agent´s account again.
  9. 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.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7184876_1781807069339.Modal_Agent.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7184876

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 18, 2026
  2. applause-bot commented on Jun 18, 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/3408d39eeb783ed984ef2c2d7ea0e83dfec68137c1e92945dafe8da56484981e

  3. melvin-bot commented on Jun 18, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 18, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 18, 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.
  6. MelvinBot commented on Jun 18, 2026

    @MelvinBot
    Contributor

    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_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.

    Investigation details & evidence

    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:

    1. 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.
    2. 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.

  7. IuliiaHerets commented on Jun 18, 2026

    @IuliiaHerets

    Chrome / v9.4.15-2
    no AI modal

    bandicam.2026-06-19.00-39-15-178.mp4
  8. melvin-bot commented on Jul 10, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    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.

  9. lanitochka17 commented on Jul 10, 2026

    @lanitochka17

    Deploy Blocker #95856 was identified to be related to the PR #94012 that attempted to fix this issue.

  10. melvin-bot commented on Jul 10, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    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.

  11. 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
  12. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    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. 🎊

  14. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    @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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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