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-05-29] [$250] Reimbursable Report Shows “Pay” in ND Home but Cannot Be Paid; Report Missing Payment State in Classic #86887
Version Number: 9.3.51-3 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@abbagail Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
From Account A, create a reimbursable expense/report in a personal workspace
Submit the report to User B
Log in as User B in New Expensify
On Home, click Pay shortcut
Observe the report shows Done status with a “Pay” button
Click Pay > Mark as Paid > Nothing happens
Open the report : Expense is not visible, No Pay option available
Switch to Classic Expensify
Check Home and report
Expected Result:
Report should:
Appear consistently as payable across platforms
Allow Mark as Paid action to complete successfully
Display expense details within the report
Actual Result:
ND Home shows Pay option, but action does nothing
Inside report:
Expense is not visible
No Pay option available
Classic:
Report does not appear as needing payment
No payment action available
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
The chatReport is fetched via useOnyx from moneyRequestReport?.chatReportID. When the user navigates to the expense report from the Home page "Pay" shortcut, the MoneyReportHeader gets chatReport via useOnyx(\${ONYXKEYS.COLLECTION.REPORT}${moneyRequestReport?.chatReportID}`)(line 225). If the chat report data hasn't been loaded into Onyx yet at the time of the Pay click,chatReportisnull` and the payment silently does nothing.
Root Cause 2: Expense not visible when opening the report
When the IOU report is not in Onyx, the component shows the AccessMoneyRequestReportPreviewPlaceHolder (eye-disabled icon) and sets carouselTransactions = [], hiding all expenses. The loading state (shouldShowLoading at line 110) depends on chat report metadata (chatReportMetadata.hasOnceLoadedReportActions), not IOU report metadata. Once chat actions are loaded, loading appears done even if the IOU report hasn't been fetched — creating a timing gap where the placeholder shows instead of the expense.
The Home page's isPrimaryPayAction() (in ReportPrimaryActionUtils.ts) does NOT check isSettled(), isAutoReimbursable(), or isPayAtEndExpenseReport(). However, the actual Pay button rendering uses canIOUBePaid() (in IOU/index.ts:9799) which DOES check all of these. This means a report can appear as payable on the Home page while the Pay button is hidden or non-functional when the user actually opens the report.
Additionally, for personal workspace reports (policy type personal), the report type is expense (not iou), triggering the stricter expense report path in canIOUBePaid that requires isReportFinished (approved/closed). The IOU fast-path at line 9851 that only checks isPayer && !iouSettled && reimbursableSpend > 0 is skipped.
What changes do you think we should make in order to solve the problem?
Fix the silent failure in payment callbacks — In PayPrimaryAction.tsx and PayActionButton.tsx, when chatReport is null, show a user-facing error or loading state instead of silently returning. This prevents the "nothing happens" experience.
Align pay eligibility checks — Reconcile isPrimaryPayAction() (used by Home page todos) with canIOUBePaid() (used by actual Pay button) so reports that appear as payable on the Home page are actually payable when opened. Specifically, isPrimaryPayAction should include the isSettled check that canIOUBePaid performs.
Fix the loading state timing for IOU report data — In MoneyRequestReportPreviewContent.tsx, the shouldShowLoading check should also account for whether the IOU report data has been loaded, not just the chat report metadata. This prevents showing the access placeholder prematurely.
What alternative solutions did you explore? (Optional)
Pre-fetching the chat report and IOU report data before navigation from the Home page "Pay" shortcut, ensuring all required Onyx data is available before the report view renders. This would address the timing issue but doesn't fix the underlying silent failure or eligibility divergence.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Reimbursable Report Shows “Pay” in ND Home but Cannot Be Paid; Report Missing Payment State in Classic[/-][+][$250] Reimbursable Report Shows “Pay” in ND Home but Cannot Be Paid; Report Missing Payment State in Classic[/+]on Apr 1, 2026
The Home page determines whether a report should show the “Pay” shortcut using isPrimaryPayAction(). However, the actual report view uses canIOUBePaid() to determine whether payment is allowed.
These two checks do not fully share the same validation rules. Because of this mismatch, a report may appear payable on the Home screen while the report itself does not allow the payment action.
This creates the situation where the Pay button is visible in ND Home but the payment action cannot execute when the report is opened.
What changes do you think we should make?
We should align the logic used by the Home page with the logic used by the report payment flow.
Specifically, isPrimaryPayAction() should reuse or delegate to canIOUBePaid() (or a shared helper) so both locations evaluate the same payment eligibility rules.
This ensures the Pay shortcut only appears when the report is truly payable, preventing the inconsistent UI state where the Home page shows Pay but the report itself cannot process the payment.
What alternative solutions did you explore?
Another option would be forcing the report data to refresh when navigating from the Home Pay shortcut. However, aligning the payment eligibility logic is the safer solution because it ensures both the Home screen and report view rely on the same validation rules.
Please re-state the problem that we are trying to solve in this issue.
A report is appearing in NewDot as payable from Home/Reports (with a Pay action), but payment does not complete and the same report appears as finished/non-payable in other places (including Classic). This creates a cross-surface state mismatch: users are prompted to pay a report that is already treated as done.
What is the root cause of that problem?
The pay eligibility logic is split across two paths that are not aligned.
The Home/To-do "Pay" entry is derived from isPrimaryPayAction(), which can mark a report as payable when it is finished and has reimbursable spend, but does not apply the same guards used by actual payment execution (for example settled/auto-reimbursable/pay-at-end constraints).
The real payment button/flow uses canIOUBePaid(), which has stricter checks (!isSettled, !isAutoReimbursable, !isPayAtEndExpenseReport, archive checks, etc.), so a report may be shown as "Pay" in Home but not actually eligible to be paid.
In the report UI flow, payment callbacks can return without user feedback when required report data is missing at click time (!chatReport early-return path / guarded pay branch), which makes the "nothing happens" symptom worse during timing gaps.
What changes do you think we should make in order to solve the problem?
Create a shared pay-eligibility helper used by both isPrimaryPayAction() and canIOUBePaid() (or have isPrimaryPayAction() delegate to the same core checks).
Ensure Home/To-do and Reports pay chips only appear when the report is truly payable by the same criteria used by payment execution (!isSettled, not auto-reimbursable, not pay-at-end, etc.).
In payment confirm handlers, replace silent return paths with explicit UX feedback (e.g., disabled state + "loading report/payment details" or a short error toast) when required report data is not ready.
Add regression tests that validate parity between listing eligibility and execution eligibility for finished/done expense reports across NewDot + Classic visibility expectations.
What alternative solutions did you explore? (Optional)
Only patching the MoneyReportHeader/preview no-op branch would improve feedback but would not fix the core mismatch where Home still advertises "Pay" for reports that fail execution rules.
Only hiding pay buttons in one surface (Home or report page) would reduce symptoms but keep logic drift; the sustainable fix is a single shared eligibility rule.
Please re-state the problem that we are trying to solve in this issue.
A reimbursable report submitted in a personal workspace appears in the Home "Pay" shortcut, but clicking "Pay > Mark as Paid" does nothing, the expense is not visible inside the report, and Classic shows no payment action either.
What is the root cause of that problem?
The root cause is a mismatch in MoneyReportHeader.tsx between the button-visibility logic and the button-action logic. At line 602, shouldShowPayButton is computed purely from canIOUBePaid:
When a user navigates from the Home Pay shortcut directly to the expense report (via EXPENSE_REPORT_RHP), the chat report may not yet be in Onyx (it is not pre-fetched by SearchMoneyRequestReportPage), so chatReport resolves to null. The Pay button renders because canIOUBePaid ignores chatReport for IOU paths, but clicking it silently returns at line 669.
What changes do you think we should make in order to solve the problem?
We should gate shouldShowPayButton on chatReport being available, so the button only renders when the payment can actually execute. In MoneyReportHeader.tsx:
// src/components/MoneyReportHeader.tsx line 602// Before:constshouldShowPayButton=isPaidAnimationRunning||canIOUBePaid||onlyShowPayElsewhere||reportHasOnlyNonReimbursableTransactions;// After:constshouldShowPayButton=isPaidAnimationRunning||((canIOUBePaid||onlyShowPayElsewhere||reportHasOnlyNonReimbursableTransactions)&&!isEmptyObject(chatReport));
This ensures the Pay button only appears when we have the data required to complete the payment. Once openReport completes and the chat report loads into Onyx, chatReport will become non-null and the button will appear. This eliminates the confusing "nothing happens" experience entirely, replacing it with the button appearing once the report data is ready.
[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.
N/A: This issue is an edge case that we missed handling initially. This PR fixes it to make the behavior consistent with the getReportPrimaryAction func utility for personal policy
[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: N/A
[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:
Precondition
User A has a personal workspace (non-paid group policy)
User B is available to receive the submitted report
Test
From Account A login Old Dot, create a reimbursable expense report in a personal workspace
Submit the report to User B
Log in as User B in New Expensify
Navigate to Spend > Reports
Verify: The submitted report should NOT show a "Pay" action/button
Contributor: @paulnjs paid $250 via Upwork
Contributor+: @suneox due $250 via NewDot
@paulnjs can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, and an Upwork job exists, please submit a proposal. https://www.upwork.com/jobs/~022060471989247557232
Activity
MelvinBot commentedon Apr 1, 2026
Proposal
What is the root cause of that problem?
This bug has two interrelated root causes that together produce all the reported symptoms:
Root Cause 1: Silent failure when clicking "Pay > Mark as Paid"
Both
PayPrimaryActionandPayActionButtonsilently return without any user feedback whenchatReportisnull/undefined:PayPrimaryAction.tsx:94:if (!type || !chatReport) { return; }PayActionButton.tsx:140:} else if (chatReport && iouReport) { /* payment happens */ }The
chatReportis fetched viauseOnyxfrommoneyRequestReport?.chatReportID. When the user navigates to the expense report from the Home page "Pay" shortcut, theMoneyReportHeadergetschatReportviauseOnyx(\${ONYXKEYS.COLLECTION.REPORT}${moneyRequestReport?.chatReportID}`)(line 225). If the chat report data hasn't been loaded into Onyx yet at the time of the Pay click,chatReportisnull` and the payment silently does nothing.Root Cause 2: Expense not visible when opening the report
In
MoneyRequestReportPreviewContent.tsx:116:When the IOU report is not in Onyx, the component shows the
AccessMoneyRequestReportPreviewPlaceHolder(eye-disabled icon) and setscarouselTransactions = [], hiding all expenses. The loading state (shouldShowLoadingat line 110) depends on chat report metadata (chatReportMetadata.hasOnceLoadedReportActions), not IOU report metadata. Once chat actions are loaded, loading appears done even if the IOU report hasn't been fetched — creating a timing gap where the placeholder shows instead of the expense.Contributing factor: Divergent pay eligibility logic
The Home page's
isPrimaryPayAction()(inReportPrimaryActionUtils.ts) does NOT checkisSettled(),isAutoReimbursable(), orisPayAtEndExpenseReport(). However, the actual Pay button rendering usescanIOUBePaid()(inIOU/index.ts:9799) which DOES check all of these. This means a report can appear as payable on the Home page while the Pay button is hidden or non-functional when the user actually opens the report.Additionally, for personal workspace reports (policy type
personal), the report type isexpense(notiou), triggering the stricter expense report path incanIOUBePaidthat requiresisReportFinished(approved/closed). The IOU fast-path at line 9851 that only checksisPayer && !iouSettled && reimbursableSpend > 0is skipped.What changes do you think we should make in order to solve the problem?
Fix the silent failure in payment callbacks — In
PayPrimaryAction.tsxandPayActionButton.tsx, whenchatReportis null, show a user-facing error or loading state instead of silently returning. This prevents the "nothing happens" experience.Align pay eligibility checks — Reconcile
isPrimaryPayAction()(used by Home page todos) withcanIOUBePaid()(used by actual Pay button) so reports that appear as payable on the Home page are actually payable when opened. Specifically,isPrimaryPayActionshould include theisSettledcheck thatcanIOUBePaidperforms.Fix the loading state timing for IOU report data — In
MoneyRequestReportPreviewContent.tsx, theshouldShowLoadingcheck should also account for whether the IOU report data has been loaded, not just the chat report metadata. This prevents showing the access placeholder prematurely.What alternative solutions did you explore? (Optional)
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.melvin-bot commentedon Apr 1, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (
External)[-]Reimbursable Report Shows “Pay” in ND Home but Cannot Be Paid; Report Missing Payment State in Classic[/-][+][$250] Reimbursable Report Shows “Pay” in ND Home but Cannot Be Paid; Report Missing Payment State in Classic[/+]melvin-bot commentedon Apr 1, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022039364291459387025
JasimMalook commentedon Apr 1, 2026
Proposal
What is the root cause of the problem?
The Home page determines whether a report should show the “Pay” shortcut using
isPrimaryPayAction(). However, the actual report view usescanIOUBePaid()to determine whether payment is allowed.These two checks do not fully share the same validation rules. Because of this mismatch, a report may appear payable on the Home screen while the report itself does not allow the payment action.
This creates the situation where the Pay button is visible in ND Home but the payment action cannot execute when the report is opened.
What changes do you think we should make?
We should align the logic used by the Home page with the logic used by the report payment flow.
Specifically,
isPrimaryPayAction()should reuse or delegate tocanIOUBePaid()(or a shared helper) so both locations evaluate the same payment eligibility rules.For example:
This ensures the Pay shortcut only appears when the report is truly payable, preventing the inconsistent UI state where the Home page shows Pay but the report itself cannot process the payment.
What alternative solutions did you explore?
Another option would be forcing the report data to refresh when navigating from the Home Pay shortcut. However, aligning the payment eligibility logic is the safer solution because it ensures both the Home screen and report view rely on the same validation rules.
Contributor details
Your Expensify account email: jasimmalook@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~014c25762fc2275193
melvin-bot commentedon Apr 1, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
KJ21-ENG commentedon Apr 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
A report is appearing in NewDot as payable from Home/Reports (with a Pay action), but payment does not complete and the same report appears as finished/non-payable in other places (including Classic). This creates a cross-surface state mismatch: users are prompted to pay a report that is already treated as done.
What is the root cause of that problem?
The pay eligibility logic is split across two paths that are not aligned.
The Home/To-do "Pay" entry is derived from
isPrimaryPayAction(), which can mark a report as payable when it is finished and has reimbursable spend, but does not apply the same guards used by actual payment execution (for example settled/auto-reimbursable/pay-at-end constraints).App/src/libs/ReportPrimaryActionUtils.ts
Lines 170 to 227 in 1d43910
App/src/libs/actions/OnyxDerived/configs/todos.ts
Lines 67 to 68 in 1d43910
The real payment button/flow uses
canIOUBePaid(), which has stricter checks (!isSettled,!isAutoReimbursable,!isPayAtEndExpenseReport, archive checks, etc.), so a report may be shown as "Pay" in Home but not actually eligible to be paid.App/src/libs/actions/IOU/index.ts
Lines 10466 to 10493 in 1d43910
In the report UI flow, payment callbacks can return without user feedback when required report data is missing at click time (
!chatReportearly-return path / guarded pay branch), which makes the "nothing happens" symptom worse during timing gaps.App/src/components/MoneyReportHeader.tsx
Lines 581 to 585 in 1d43910
App/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx
Lines 250 to 262 in 1d43910
What changes do you think we should make in order to solve the problem?
isPrimaryPayAction()andcanIOUBePaid()(or haveisPrimaryPayAction()delegate to the same core checks).!isSettled, not auto-reimbursable, not pay-at-end, etc.).What alternative solutions did you explore? (Optional)
trasnake87 commentedon Apr 1, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
A reimbursable report submitted in a personal workspace appears in the Home "Pay" shortcut, but clicking "Pay > Mark as Paid" does nothing, the expense is not visible inside the report, and Classic shows no payment action either.
What is the root cause of that problem?
The root cause is a mismatch in
MoneyReportHeader.tsxbetween the button-visibility logic and the button-action logic. At line 602,shouldShowPayButtonis computed purely fromcanIOUBePaid:https://github.com/Expensify/App/blob/main/src/components/MoneyReportHeader.tsx#L602
For IOU reports (personal workspace),
canIOUBePaidinsrc/libs/actions/IOU/index.tsreturnstrueat line 9851 without ever inspectingchatReport:https://github.com/Expensify/App/blob/main/src/libs/actions/IOU/index.ts#L9851
However, the
confirmPaymentcallback on the sameMoneyReportHeader(line 669) gates the entire payment onchatReportbeing truthy:https://github.com/Expensify/App/blob/main/src/components/MoneyReportHeader.tsx#L669
When a user navigates from the Home Pay shortcut directly to the expense report (via
EXPENSE_REPORT_RHP), the chat report may not yet be in Onyx (it is not pre-fetched bySearchMoneyRequestReportPage), sochatReportresolves tonull. The Pay button renders becausecanIOUBePaidignores chatReport for IOU paths, but clicking it silently returns at line 669.What changes do you think we should make in order to solve the problem?
We should gate
shouldShowPayButtononchatReportbeing available, so the button only renders when the payment can actually execute. InMoneyReportHeader.tsx:This ensures the Pay button only appears when we have the data required to complete the payment. Once
openReportcompletes and the chat report loads into Onyx,chatReportwill become non-null and the button will appear. This eliminates the confusing "nothing happens" experience entirely, replacing it with the button appearing once the report data is ready.trasnake87 commentedon Apr 1, 2026
Contributor details
Your Expensify account email: trasnake87@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~010f770315ab181656
62 remaining items
melvin-bot commentedon May 25, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)suneox commentedon May 27, 2026
BugZero 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.
N/A: This issue is an edge case that we missed handling initially. This PR fixes it to make the behavior consistent with the getReportPrimaryAction func utility for personal policy
[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: N/A
[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:
Precondition
Test
Verify: The submitted report should NOT show a "Pay" action/button
Zapier Logs
Run ID: 00040eee-cac3-a4be-7d0a-f5bc9cbf7bb4melvin-bot commentedon May 28, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon May 29, 2026
Payment Summary
Contributor: @paulnjs paid $250 via Upwork
Contributor+: @suneox due $250 via NewDot
@paulnjs can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, and an Upwork job exists, please submit a proposal.
https://www.upwork.com/jobs/~022060471989247557232
^ Test case created. Thx
paulnjs commentedon May 31, 2026
@mallenexpensify I accepted it. Thank you!
Okay, I will do this on the next assigned issue
mallenexpensify commentedon Jun 1, 2026
@paulnjs paid, summary updated above. Thx.
garrettmknight commentedon Jun 16, 2026
$250 approved for @suneox