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-06-12] Expense - User appears in participant list when expense amount is negative #90656
Version Number: 9.3.74-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:#87920 Email or phone of affected tester (no customers):sdsdjoijdoisnjodis@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Go to staging.new.expensify.com
Open FAB > Create expense > Manual.
Enter negative amount.
Click To field.
Enter email.
Select the user.
Click Create expense.
Expected Result:
In Step 5, when the amount is negative, user will not appear in participant list when searched with email.
Actual Result:
In Step 5, when the amount is negative, user appears in participant list when searched with email.
In Step 7, negative expense can be submitted and the created expense does not show negative amount.
User can also enter flipped amount when participant is a user when it should not be allowed.
👋 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:
Identify the pull request that introduced this issue and revert it.
PR #87920 introduced the new manual expense flow and is the direct cause of both symptoms — negative amounts being accepted for P2P expenses and the submitted expense not displaying the negative amount correctly. Reverting it removes the broken flow until a fix can be made.
Assigned: @ChavdaSachin (PR author), @ShridharGoel, @puneetlath (approving reviewers) Labels: DeployBlockerCash kept (Frontend bug — App PR is the cause). DeployBlocker is not present and not added.
The issue is staging-only ("Reproducible in production? N/A - new feature, doesn't exist in prod"), which matches the beta-gated newManualExpenseFlow feature introduced by this PR.
All three files changed in PR #87920 directly relate to the reported symptoms.
Root Cause
Bug 1 — Negative amount allows P2P participants to appear in search:
shouldEnableNegative() in src/libs/ReportUtils.ts returns true whenever iouType === CONST.IOU.TYPE.CREATE (isCreatingNewIOU = true). The new manual expense flow introduced by PR #87920 uses iouType === CREATE throughout the flow, including when the ParticipantPicker is opened. The ParticipantSearchResults component's includeP2P flag is not conditioned on the current transaction amount — it is only conditioned on action type, per diem, time request, and corporate card flags. As a result, when a negative amount is entered before opening the participant picker, P2P users are still shown in search results even though negative amounts are not valid for P2P expenses.
Bug 2 — Created expense does not show negative amount:
The AmountField in the new flow uses transaction?.isAmountSet to determine whether to show the real value vs. an empty field. The sign/flip logic for negative amounts introduced in the new AmountField section (using allowNegative from shouldEnableNegative) may not be correctly persisting the signed value to transaction.amount, causing the created expense to display an incorrect (non-negative) amount.
Both bugs are in App code introduced exclusively by PR #87920. No backend changes are involved.
The new manual expense flow (behind newManualExpenseFlow beta, introduced in #87920) completely bypasses the negative-amount participant filtering. In the old flow, entering a negative amount restricted participant selection to workspaces only. In the new flow, individual users are always shown regardless of the amount sign, and negative expenses can be submitted (though they display as positive due to Math.abs at render time).
Solution
There are two independent gaps that need fixing:
Gap 1 — ParticipantPicker has no isWorkspacesOnly prop. The new flow opens participants via ParticipantPicker, which never passes isWorkspacesOnly to MoneyRequestParticipantsSelector. When isWorkspacesOnly is falsy, individual users and contacts are always shown.
Gap 2 — IOURequestStepConfirmation never computes isWorkspacesOnly. The confirmation screen renders ParticipantPicker without any amount-based filtering. Even if ParticipantPicker accepted the prop, no caller passes it.
The fix:
Add an isWorkspacesOnly prop to ParticipantPicker and forward it to MoneyRequestParticipantsSelector.
In IOURequestStepConfirmation, compute isWorkspacesOnly from the current transaction draft amount (i.e., transaction?.amount <= 0) and pass it to ParticipantPicker.
The new flow renders IOURequestStepConfirmation directly from IOURequestStartPage.tsx:251, skipping IOURequestStepParticipants entirely.
IOURequestStepParticipants.getIsWorkspacesOnly has an early return of false when the new flow beta is enabled — so even if the old page were reached, it would skip the negative check.
ParticipantSearchResults correctly gates individual participants behind isWorkspacesOnly, but this prop is never set to true in the new flow.
Why the created expense doesn't show negative amount:
TransactionUtils.getAmount() applies Math.abs() by default for non-expense-report contexts. The negative value is stored correctly but stripped at display time. Additionally, useConfirmationValidation.ts:163 only checks iouAmount === 0 for P2P — it does not block negative amounts.
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.
Activity
melvin-bot commentedon May 14, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #87920
melvin-bot commentedon May 14, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 14, 2026
👋 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:
OSBotify commentedon May 14, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
Related Issues: None
Recommendation: REVERT
PR #87920 introduced the new manual expense flow and is the direct cause of both symptoms — negative amounts being accepted for P2P expenses and the submitted expense not displaying the negative amount correctly. Reverting it removes the broken flow until a fix can be made.
Assigned: @ChavdaSachin (PR author), @ShridharGoel, @puneetlath (approving reviewers)
Labels:
DeployBlockerCashkept (Frontend bug — App PR is the cause).DeployBlockeris not present and not added.Detailed Analysis
Evidence
StagingDeployCashchecklist (issue Deploy Checklist: New Expensify 2026-05-13 #90562), confirming it is part of the release currently on staging.newManualExpenseFlowfeature introduced by this PR.Onyx.merge('betas', ['newManualExpenseFlow'])to reproduce — this feature is entirely new in PR Feat: Manual expense flow UI refactor - r3 #87920.Verification
Affected files:
src/pages/iou/request/ParticipantSearchResults.tsx— modified in PR Feat: Manual expense flow UI refactor - r3 #87920 (confirmed viagh pr view 87920 --json files)src/components/MoneyRequestConfirmationList/sections/AmountField.tsx— modified in PR Feat: Manual expense flow UI refactor - r3 #87920src/pages/iou/request/step/IOURequestStepConfirmation.tsx— modified in PR Feat: Manual expense flow UI refactor - r3 #87920All three files changed in PR #87920 directly relate to the reported symptoms.
Root Cause
Bug 1 — Negative amount allows P2P participants to appear in search:
shouldEnableNegative()insrc/libs/ReportUtils.tsreturnstruewheneveriouType === CONST.IOU.TYPE.CREATE(isCreatingNewIOU = true). The new manual expense flow introduced by PR #87920 usesiouType === CREATEthroughout the flow, including when theParticipantPickeris opened. TheParticipantSearchResultscomponent'sincludeP2Pflag is not conditioned on the current transaction amount — it is only conditioned on action type, per diem, time request, and corporate card flags. As a result, when a negative amount is entered before opening the participant picker, P2P users are still shown in search results even though negative amounts are not valid for P2P expenses.Bug 2 — Created expense does not show negative amount:
The
AmountFieldin the new flow usestransaction?.isAmountSetto determine whether to show the real value vs. an empty field. The sign/flip logic for negative amounts introduced in the newAmountFieldsection (usingallowNegativefromshouldEnableNegative) may not be correctly persisting the signed value totransaction.amount, causing the created expense to display an incorrect (non-negative) amount.Both bugs are in App code introduced exclusively by PR #87920. No backend changes are involved.
MelvinBot commentedon May 14, 2026
Proposal
Problem
The new manual expense flow (behind
newManualExpenseFlowbeta, introduced in #87920) completely bypasses the negative-amount participant filtering. In the old flow, entering a negative amount restricted participant selection to workspaces only. In the new flow, individual users are always shown regardless of the amount sign, and negative expenses can be submitted (though they display as positive due toMath.absat render time).Solution
There are two independent gaps that need fixing:
Gap 1 —
ParticipantPickerhas noisWorkspacesOnlyprop. The new flow opens participants viaParticipantPicker, which never passesisWorkspacesOnlytoMoneyRequestParticipantsSelector. WhenisWorkspacesOnlyis falsy, individual users and contacts are always shown.Gap 2 —
IOURequestStepConfirmationnever computesisWorkspacesOnly. The confirmation screen rendersParticipantPickerwithout any amount-based filtering. Even ifParticipantPickeraccepted the prop, no caller passes it.The fix:
isWorkspacesOnlyprop toParticipantPickerand forward it toMoneyRequestParticipantsSelector.IOURequestStepConfirmation, computeisWorkspacesOnlyfrom the current transaction draft amount (i.e.,transaction?.amount <= 0) and pass it toParticipantPicker.This mirrors the logic already present in the old flow at
IOURequestStepParticipants.tsx:136:Investigation details
Root cause trace:
IOURequestStepConfirmationdirectly fromIOURequestStartPage.tsx:251, skippingIOURequestStepParticipantsentirely.IOURequestStepParticipants.getIsWorkspacesOnlyhas an early return offalsewhen the new flow beta is enabled — so even if the old page were reached, it would skip the negative check.ParticipantSearchResultscorrectly gates individual participants behindisWorkspacesOnly, but this prop is never set totruein the new flow.Why the created expense doesn't show negative amount:
TransactionUtils.getAmount()appliesMath.abs()by default for non-expense-report contexts. The negative value is stored correctly but stripped at display time. Additionally,useConfirmationValidation.ts:163only checksiouAmount === 0for P2P — it does not block negative amounts.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.ChavdaSachin commentedon May 14, 2026
NAB: only happens in the beta accounts
puneetlath commentedon May 14, 2026
Demoting.
25 remaining items
melvin-bot commentedon Jun 11, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 11, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
ChavdaSachin commentedon Jun 11, 2026
Not here, paid via project
mallenexpensify commentedon Jun 15, 2026
@dukenv0307 @ShridharGoel either of you due payment here? Thx
ShridharGoel commentedon Jun 15, 2026
Not me
dukenv0307 commentedon Jun 16, 2026
@mallenexpensify I'll be paid here
mallenexpensify commentedon Jun 16, 2026
Payment Summary
Contributor+: @dukenv0307 due $250 via NewDot
quinthar commentedon Jun 29, 2026
Approved $250 to @dukenv0307