Skip to content

[Due for payment 2026-10-16] 2FA - Trial payment reminder blocks Enable on the required setup screen #102576

Closed

Description

@luacmartins

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: Not specified in the follow-up report.
Reproducible in staging?: Needs confirmation.
Reproducible in production?: Reported as affecting customers; not independently reproduced for this issue.
If this was caught during regression testing, add the test name, ID and link from BrowserStack: Not provided.
Email or phone of affected tester (no customers): Not provided.
Logs: No logs attached for this case.
Expensify/Expensify Issue URL: Not provided for this case.
Issue reported by: @neerajbachani and team.
Slack conversation (hyperlinked to channel name): Not provided for this case.

Action Performed:

Preconditions: The user owns a workspace on a free trial, has no payment card, and belongs to a domain that requires 2FA. The trial payment reminder is eligible to appear.

  1. Log in with that user before completing 2FA setup.
  2. Wait for the required 2FA screen to appear.
  3. Attempt to click Enable two-factor authentication while the Stay ahead of the deadline trial reminder appears.

Expected Result:

The trial payment reminder is deferred while the required 2FA screen is open. Clicking Enable opens 2FA setup.

Actual Result:

The reminder opens over the required 2FA screen and intercepts the click. Enable appears unresponsive, blocking setup and access to the account.

Workaround:

No workaround confirmed for this specific case in the source report.

Additional Context:

Split from problem 1 in the follow-up report on #91985. The original onboarding fix was handled in #94486; this follow-up concerns the trial reminder.

The report identifies the modal visibility check in TrialPaymentReminderModalManager.tsx: it checks for another modal, but the required 2FA screen is a full-screen view. Suggested fix: suppress the reminder while required 2FA is active.

Regression coverage should confirm that Enable remains usable for an eligible trial owner and that the reminder can still appear after required 2FA is completed.

Platforms:

The follow-up report does not specify the exact reproduced platforms.

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

Screenshots/Videos

None attached to this case in the source report.

View all open jobs on GitHub

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 29, 2026
  2. self-assigned this
    on Sep 29, 2026
  3. neerajbachani commented on Sep 29, 2026

    @neerajbachani
    Contributor

    Hello!!

  4. MelvinBot commented on Sep 29, 2026

    @MelvinBot
    Contributor

    Proposal

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

    The trial payment reminder opens on top of the required 2FA screen and blocks the Enable button.

    What is the root cause of that problem?

    The reminder only waits for other modals, and the required 2FA screen doesn't count as one.

    The reminder therefore opens as a BaseModal above the overlay and takes the click meant for Enable.

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

    In TrialPaymentReminderModalManager, defer the reminder while required 2FA is active. Use the same gate as ProductMarketingWindowManager.tsx:87-106:

    1. Read useShouldShowRequire2FAPage(), plus isIn2FASetupFlow from useRootNavigationState with isTwoFactorSetupScreen.
    2. Add both values to isOtherModalActive so the reminder never opens while they are true.
    3. If the reminder is already open when required 2FA becomes active, close it without calling dismiss(). This way the reminder can show again after setup.

    Add a unit test with these cases:

    • The reminder stays closed while needsTwoFactorAuthSetup is true.
    • The reminder opens once required 2FA is complete.

    What alternative solutions did you explore? (Optional)

    Add the 2FA check to isEligibleToShow in useTrialPaymentReminder. I don't recommend this. Eligibility is about trial and billing state, and the manager already owns the "wait for something else on screen" logic.

    Confidence and related issues

    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/102576) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 29, 2026
  6. melvin-bot commented on Sep 29, 2026

    @melvin-bot

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

  7. changed the title [-]2FA - Trial payment reminder blocks Enable on the required setup screen[/-] [+][$175] 2FA - Trial payment reminder blocks Enable on the required setup screen[/+] on Sep 29, 2026
  8. melvin-bot commented on Sep 29, 2026

    @melvin-bot
  9. bonnhatnguyen commented on Sep 29, 2026

    @bonnhatnguyen

    Proposal

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

    When a user on a free trial with no payment card belongs to a domain requiring 2FA, the "Stay ahead of the deadline" trial payment reminder modal displays directly on top of the full-screen required 2FA overlay, intercepting clicks and preventing the user from clicking "Enable two-factor authentication".

    What is the root cause of that problem?

    1. RequireTwoFactorAuthenticationOverlay.tsx is rendered outside the RootStack navigator as a full-screen view directly inside AuthScreens.tsx:403. It does not set ONYXKEYS.MODAL, nor is it a modal navigator route.
    2. In TrialPaymentReminderModalManager.tsx:21-25:
      const isModalNavigatorActive = useRootNavigationState((state) => isModalNavigatorName(state?.routes?.at(-1)?.name));
      const isOtherModalActive = !!modal?.isVisible || !!modal?.willAlertModalBecomeVisible || isModalNavigatorActive;
      
      if (isEligibleToShow && !isOtherModalActive && !isModalOpen) {
          setIsModalOpen(true);
      }
      isOtherModalActive only checks for active modal navigators or modal.isVisible. Because the required 2FA overlay is a full-screen component rather than a modal navigator route, isOtherModalActive evaluates to false.
    3. Consequently, TrialPaymentReminderModal opens on top of the 2FA required overlay, stealing focus and blocking user interaction with the "Enable" button.

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

    In src/components/TrialPaymentReminderModalManager.tsx:
    Follow the established pattern already implemented in ProductMarketingWindowManager.tsx:87-106:

    1. Check if the required 2FA page or setup flow is active:
      const shouldShowRequire2FAPage = useShouldShowRequire2FAPage();
      const isIn2FASetupFlow = useRootNavigationState((state) => {
          const focusedScreen = getDeepestFocusedScreen(state);
          return isTwoFactorSetupScreen(focusedScreen?.name);
      });
    2. Include both shouldShowRequire2FAPage and isIn2FASetupFlow in the condition:
      const isOtherModalActive =
          !!modal?.isVisible ||
          !!modal?.willAlertModalBecomeVisible ||
          isModalNavigatorActive ||
          shouldShowRequire2FAPage ||
          isIn2FASetupFlow;
    3. If shouldShowRequire2FAPage || isIn2FASetupFlow becomes active while the trial reminder is open, close the modal without calling dismiss(), allowing the reminder to appear normally once the user completes the mandatory 2FA setup.

    What alternative solutions did you explore? (Optional)

    Adding 2FA checks directly into useTrialPaymentReminder. However, useTrialPaymentReminder manages billing eligibility and countdown timers, whereas TrialPaymentReminderModalManager is specifically responsible for view presentation coordination and avoiding modal collisions.

  10. franklincg commented on Sep 29, 2026

    @franklincg

    Proposal

    Root cause

    The trial payment reminder only defers when another modal or navigation modal is active. The required 2FA screen is a full-screen overlay rendered outside the navigator, so it does not trip that check. The reminder can therefore mount above the 2FA overlay and intercept the click on Enable two-factor authentication.

    Fix

    In TrialPaymentReminderModalManager, include the required-2FA state in the same blocking decision used for other active surfaces, and also suppress the reminder while the current route is part of the 2FA setup flow.

    If the reminder is already open when required 2FA becomes active, hide it without permanently dismissing it so it can appear again after setup complete

  11. melvin-bot commented on Sep 29, 2026

    @melvin-bot

    📣 @neerajbachani You have been assigned to this job!
    Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
    Keep in mind: Code of Conduct | Contributing 📖

  12. 16 remaining items

  13. melvin-bot commented on Oct 12, 2026

    @melvin-bot

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

  14. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  15. melvin-bot commented on Oct 15, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  16. melvin-bot commented on Oct 16, 2026

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. mallenexpensify commented on Oct 18, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @neerajbachani paid $250 via Upwork
    Contributor+: @thelullabyy due $250 via NewDot

    @neerajbachani can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022104998079870830599

    @thelullabyy plz complete the Contributor+ checklist and tag me in a post once you have. Thx

  18. neerajbachani commented on Oct 18, 2026

    @neerajbachani
    Contributor

    @mallenexpensify I've accepted the job offer, thanks!

  19. thelullabyy commented on Oct 18, 2026

    @thelullabyy
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: NA
      Link to the comment on the Issue:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    • NA

    Test:

    1. Sign in as a workspace owner on a free trial, with no payment card, on a domain that requires 2FA, before 2FA setup is complete.
    2. Wait for the required 2FA screen.
    3. Verify the "Stay ahead of the deadline" trial reminder does not open over that screen.
    4. Click Enable and verify the click reaches 2FA setup
    5. Complete required 2FA and return to Home.
    6. Verify the trial reminder can appear after 2FA is complete.
    7. Close the reminder and verify it does not immediately reopen.

    Do we agree 👍 or 👎

  20. thelullabyy commented on Oct 18, 2026

    @thelullabyy
    Contributor

    Checklist posted. Thanks @mallenexpensify

  21. mallenexpensify commented on Oct 18, 2026

    @mallenexpensify
    Contributor

    @neerajbachani paid, summary updated above. Thx.

    ^ Test case created. Thx

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions