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
[Awaiting Payment][$250] Expense - Flip option is shown in confirmation page in amount section. #75304
When the recipient is a user who hasn’t been chatted with before, the chat report for that user will be undefined, so isFirstTimeCreatingReport will be true:
What changes do you think we should make in order to solve the problem?
For isFirstTimeCreatingReport, we need to add a condition to check the recipients.
If the recipients include a user, then isFirstTimeCreatingReport should be false.
changed the title [-]Expense - Flip option is shown in confirmation page in amount section.[/-][+][$250] Expense - Flip option is shown in confirmation page in amount section.[/+]on Nov 17, 2025
Please re-state the problem that we are trying to solve in this issue.
The amount “Flip” control appears in confirmation's edit amount for 1:1 DMs, allowing negative expenses there.
What is the root cause of that problem?
The amount step always enables flipping whenever negatives are allowed and the flow is not a split, without excluding direct messages. There is no DM check guarding allowFlippingAmount, so the Flip button shows even in DM contexts.
What changes do you think we should make in order to solve the problem?
Add a DM guard before enabling Flip on the amount step so the control stays hidden in 1:1 chats, while still showing for self DMs (where negatives are allowed) and for workspace recipients/other allowed flows.
By refering the Expected result and video attached in the issue description, I didn't get what do we actually need in final result?
Do we need to remove the flip button on the manual amount section?
My proposal is ready but I need some clarification about the issue and final result.
Activity
melvin-bot commentedon Nov 17, 2025
Triggered auto assignment to @sakluger (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.dmkt9 commentedon Nov 17, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-11-18 15:02:53 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In step 6, flip option is shown in confirmation page in amount section.
What is the root cause of that problem?
Whether the "Flip" button is allowed to be displayed depends on the
allowNegativeflag:App/src/pages/iou/request/step/IOURequestStepAmount.tsx
Line 103 in ca4289f
When the recipient is a user who hasn’t been chatted with before, the chat
reportfor that user will beundefined, soisFirstTimeCreatingReportwill betrue:App/src/libs/ReportUtils.ts
Line 1916 in f34c0e3
As a result,
allowNegativewill be set totrue.What changes do you think we should make in order to solve the problem?
For
isFirstTimeCreatingReport, we need to add a condition to check the recipients.If the recipients include a user, then
isFirstTimeCreatingReportshould befalse.App/src/libs/ReportUtils.ts
Lines 1914 to 1916 in f34c0e3
App/src/pages/iou/request/step/IOURequestStepAmount.tsx
Line 102 in f34c0e3
What alternative solutions did you explore? (Optional)
N/A
[-]Expense - Flip option is shown in confirmation page in amount section.[/-][+][$250] Expense - Flip option is shown in confirmation page in amount section.[/+]melvin-bot commentedon Nov 17, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021990456907474787796
melvin-bot commentedon Nov 17, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (
External)ShridharGoel commentedon Nov 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The amount “Flip” control appears in confirmation's edit amount for 1:1 DMs, allowing negative expenses there.
What is the root cause of that problem?
The amount step always enables flipping whenever negatives are allowed and the flow is not a split, without excluding direct messages. There is no DM check guarding
allowFlippingAmount, so the Flip button shows even in DM contexts.App/src/pages/iou/request/step/IOURequestStepAmount.tsx
Lines 101 to 107 in 4c1d026
What changes do you think we should make in order to solve the problem?
Add a DM guard before enabling Flip on the amount step so the control stays hidden in 1:1 chats, while still showing for self DMs (where negatives are allowed) and for workspace recipients/other allowed flows.
Updated code:
Uzaifm127 commentedon Nov 17, 2025
By refering the Expected result and video attached in the issue description, I didn't get what do we actually need in final result?
Do we need to remove the flip button on the manual amount section?
My proposal is ready but I need some clarification about the issue and final result.
shubham1206agra commentedon Nov 18, 2025
27 remaining items
sakluger commentedon Dec 23, 2025
Payment Summary
Contributor: @dmkt9 due $250 via Upwork: Sent offer (https://www.upwork.com/nx/wm/offer/109904759)
Contributor+: @shubham1206agra due $250 via Newdot
sakluger commentedon Dec 23, 2025
@shubham1206agra do we need any new or updated regression tests for this one?
shubham1206agra commentedon Dec 23, 2025
Test -
dmkt9 commentedon Dec 23, 2025
@sakluger Thank you. Payment requested.
melvin-bot commentedon Dec 27, 2025
@sakluger Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jan 1, 2026
@sakluger Whoops! This issue is 2 days overdue. Let's get this updated quick!
sakluger commentedon Jan 5, 2026
Thanks @dmkt9, I completed the payment.
garrettmknight commentedon Apr 2, 2026
$250 approved for @shubham1206agra