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-09-30] [Exploratory] Expensify card - Not here page opens when clicking the Daily option for Settlement frequency #98754
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
Go to OD and set Monthly for the Expensify cards Settlement frequency
In ND, go to Settings > Workspaces > [workspace] > Expensify Card > Settings.
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.
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
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?
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.
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: 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.
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]
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
[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:
Go to OD and set Monthly for the Expensify cards Settlement frequency
In ND, go to Settings > Workspaces > [workspace] > Expensify Card > Settings.
Click on the Settlement frequency row
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.
Activity
applause-bot commentedon Aug 17, 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/7c4374b28b2d39140480d280e3ef93424f470069b22ef27b6eee4e66d9417b5b
[-][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[/+]dylanexpensify commentedon Aug 17, 2026
@garrettmknight
MelvinBot commentedon Sep 5, 2026
Proposal
What is the root cause of that problem?
The Settlement frequency page blocks itself the moment you pick Daily.
WorkspaceSettlementFrequencyPage.tsx:43-45derives its own "you may not be here" guard from live Onyx state:and feeds it to
AccessOrNotFoundWrapperviashouldBeBlockedat:81.Selecting Daily calls
updateSettlementFrequency, whose optimistic update setsmonthlySettlementDate: null(Card.ts:667). The page re-renders while the user is still on it,selectedFrequencyflips toDAILY,isSettlementFrequencyBlockedflips totrue, andAccessOrNotFoundWrapper.tsx:230renders the Not Found page over the user's own successful action.This fires when
isMonthlySettlementAllowedisfalsewhilemonthlySettlementDateis set — exactly the reported precondition, because Monthly was set in OldDot, which bypasses the NewDot eligibility gate (Plaid + positive 90-day balance history, persettlementFrequencyInfo).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:
onSelectRowat:99never 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:updateSettlementFrequency, after calling the action,Navigation.goBack(ROUTES.WORKSPACE_EXPENSIFY_CARD_SETTINGS.getRoute(policyID))— matching the sibling travel settlement frequency page.useRefflag before dispatching the update and passshouldBeBlocked={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
useState(isSettlementFrequencyBlocked)) — rejected. On the first rendercardSettingsis often still loading, sosettingsisundefined,shouldShowMonthlyOptionisfalseandselectedFrequencyisDAILY, freezing the guard totrueand blocking the page for everyone.monthlySettlementDatehint text to the Settings row plus locale strings — see its file list. It touched neither the selector page nor the guard.isMonthlySettlementAllowedflip. No server round-trip is needed — the optimistic Onyx merge alone flipsselectedFrequency, so the Not Found page appears immediately, matching the video.getCardProgramKeyreturningundefined(flat, unnested card settings). That path hits theLog.alertearly return at:70-73, so nothing would happen at all — a different symptom than the one reported.isSettlementFrequencyBlockedexpression exists onWorkspaceCardSettingsPage.tsx:57, but there it only setsinteractiveon 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
melvin-bot commentedon Sep 5, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)melvin-bot commentedon Sep 5, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Sep 9, 2026
@situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
17 remaining items
melvin-bot commentedon Sep 23, 2026
@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]
[-][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[/+]melvin-bot commentedon Sep 28, 2026
@situchan Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Sep 29, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Sep 29, 2026
Payment Summary
Resolving PRs:
Stop the settlement frequency page blocking itself after saving Daily #101661
Reviewer: @situchan owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Oct 1, 2026
Payment Summary
Contributor+: @situchan due $250 via NewDot
@situchan plz complete the Contributor+ checklist and tag me in a post once you have. Thx
situchan commentedon Oct 2, 2026
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:
Do we agree 👍 or 👎
trjExpensify commentedon Nov 3, 2026
approved $250 for @situchan