Skip to content

[Due for payment 2026-09-30] [Exploratory] Expensify card - Not here page opens when clicking the Daily option for Settlement frequency #98754

Closed

Description

@applause-bot

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


Version Number: v9.4.54-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #98164
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: Mac 26.5.1 Safari/Chrome
App Component: Workspace Settings

Action Performed:

Precondition: Has a workspace that has the Expensify Card feature enabled and at least one card whose settlement frequency is Monthly

  1. Go to OD and set Monthly for the Expensify cards Settlement frequency
  2. In ND, go to Settings > Workspaces > [workspace] > Expensify Card > Settings.
  3. Click on the Settlement frequency row

Expected Result:

There are 2 options available on the Settlement frequency page. After selecting the Daily option, the user should be navigated back to the Setting page where the Daily option is displayed under the Settlement frequency row, and the Expensify card page remains in the background.

Actual Result:

Not here page opens when clicking the Daily option for Settlement frequency. After clicking the back button, user is redirected to the workspace overview page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7235270_1786926607033.Recording__2735.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7235270

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. applause-bot commented on Aug 17, 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/7c4374b28b2d39140480d280e3ef93424f470069b22ef27b6eee4e66d9417b5b

  2. changed the title [-][Exploratory] Expensify card -Not here page opens when clicking the Daily option for Settlement frequency[/-] [+][Exploratory] Expensify card - Not here page opens when clicking the Daily option for Settlement frequency[/+] on Aug 17, 2026
  3. dylanexpensify commented on Aug 17, 2026

    @dylanexpensify
    Contributor
  4. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 5, 2026
  5. MelvinBot commented on Sep 5, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The Settlement frequency page blocks itself the moment you pick Daily.

    WorkspaceSettlementFrequencyPage.tsx:43-45 derives its own "you may not be here" guard from live Onyx state:

    const shouldShowMonthlyOption = settings?.isMonthlySettlementAllowed ?? false;
    const selectedFrequency = settings?.monthlySettlementDate ? MONTHLY : DAILY;
    const isSettlementFrequencyBlocked = !shouldShowMonthlyOption && selectedFrequency === DAILY;

    and feeds it to AccessOrNotFoundWrapper via shouldBeBlocked at :81.

    Selecting Daily calls updateSettlementFrequency, whose optimistic update sets monthlySettlementDate: null (Card.ts:667). The page re-renders while the user is still on it, selectedFrequency flips to DAILY, isSettlementFrequencyBlocked flips to true, and AccessOrNotFoundWrapper.tsx:230 renders the Not Found page over the user's own successful action.

    This fires when isMonthlySettlementAllowed is false while monthlySettlementDate is set — exactly the reported precondition, because Monthly was set in OldDot, which bypasses the NewDot eligibility gate (Plaid + positive 90-day balance history, per settlementFrequencyInfo).

    The second symptom follows from the first: the Not Found fallback's back button goes to WORKSPACE_OVERVIEW (AccessOrNotFoundWrapper.tsx:151), which is why the user lands on the workspace overview page instead of the Expensify Card page.

    There is a second, independent bug: onSelectRow at :99 never navigates back. Even when the guard does not trip, the user is stranded on the selector — the expected result says they should return to Settings.

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

    In WorkspaceSettlementFrequencyPage.tsx:

    1. Go back after selecting. In updateSettlementFrequency, after calling the action, Navigation.goBack(ROUTES.WORKSPACE_EXPENSIFY_CARD_SETTINGS.getRoute(policyID)) — matching the sibling travel settlement frequency page.
    2. Stop the guard reacting to the user's own change. Set a useRef flag before dispatching the update and pass shouldBeBlocked={isSettlementFrequencyBlocked && !hasSelectedFrequency.current}. Without this, a re-render can beat the navigation pop and flash the Not Found page.

    The guard's intent — don't open a selector with nothing to choose — stays intact for entry into the page. It just must not be re-evaluated against state the user just mutated.

    Alternatives considered and evidence
    • Snapshot the blocked state on mount (useState(isSettlementFrequencyBlocked)) — rejected. On the first render cardSettings is often still loading, so settings is undefined, shouldShowMonthlyOption is false and selectedFrequency is DAILY, freezing the guard to true and blocking the page for everyone.
    • Ruled out: PR Surface Expensify Card monthly settlement date on card settings page #98164 (linked in the regression-testing field) is not the cause. It only added monthlySettlementDate hint text to the Settings row plus locale strings — see its file list. It touched neither the selector page nor the guard.
    • Ruled out: a backend/isMonthlySettlementAllowed flip. No server round-trip is needed — the optimistic Onyx merge alone flips selectedFrequency, so the Not Found page appears immediately, matching the video.
    • Ruled out: getCardProgramKey returning undefined (flat, unnested card settings). That path hits the Log.alert early return at :70-73, so nothing would happen at all — a different symptom than the one reported.
    • The same isSettlementFrequencyBlocked expression exists on WorkspaceCardSettingsPage.tsx:57, but there it only sets interactive on the row, so it degrades gracefully. Only the selector page escalates it to a full Not Found page.

    Not verified live: the repro needs a workspace with a configured Expensify Card program on Monthly settlement, which is not reachable from a test account, so this is a code-level analysis. The three reported symptoms — Not Found on selecting Daily, no return to Settings, and back landing on the workspace overview — are each explained by the code paths above.

    Related issues

    No duplicates found. #74834 ("layout closes unexpectedly after selecting or removing the option") is superficially similar but is an accessibility/layout issue, not this guard.


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


    view run · view recording

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

    @melvin-bot

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

  8. melvin-bot commented on Sep 5, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  9. melvin-bot commented on Sep 9, 2026

    @melvin-bot

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

  10. 17 remaining items

  11. melvin-bot commented on Sep 23, 2026

    @melvin-bot

    @situchan

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.91-3 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-09-30. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]

  12. changed the title [-][Exploratory] Expensify card - Not here page opens when clicking the Daily option for Settlement frequency[/-] [+][Due for payment 2026-09-30] [Exploratory] Expensify card - Not here page opens when clicking the Daily option for Settlement frequency[/+] on Sep 23, 2026
  13. melvin-bot commented on Sep 28, 2026

    @melvin-bot

    @situchan Eep! 4 days overdue now. Issues have feelings too...

  14. melvin-bot commented on Sep 29, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  15. melvin-bot commented on Sep 29, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    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. mallenexpensify commented on Oct 1, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @situchan due $250 via NewDot

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

  17. situchan commented on Oct 2, 2026

    @situchan
    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:
      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:

    Has a workspace that has the Expensify Card feature enabled and at least one card whose settlement frequency is Monthly

    Test:

    1. Go to OD and set Monthly for the Expensify cards Settlement frequency
    2. In ND, go to Settings > Workspaces > [workspace] > Expensify Card > Settings.
    3. Click on the Settlement frequency row
    4. After selecting the Daily option, the user should be navigated back to the Setting page where the Daily option is displayed under the Settlement frequency row, and the Expensify card page remains in the background.

    Do we agree 👍 or 👎

  18. trjExpensify commented on Nov 3, 2026

    @trjExpensify
    Contributor

    approved $250 for @situchan

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNot a priority

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions