Fix/90650#91310
Conversation
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
trjExpensify
left a comment
There was a problem hiding this comment.
In-ine push input edit bug fix. 👍
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-05-22.at.5.05.37.PM.mov |
|
@ShridharGoel, I have just pushed the extensive automated tests. Please take a look at them once. |
|
Wait @ShridharGoel I am adding the soln for one more issue here |
|
@ShridharGoel, back to you |
|
@codex review |
Amount field validation — test matrixReference for amount-related behavior on the money request confirmation screen ( Test files
Participant types (first
P2P detection: Validation order (
|
| Scenario | Participant (1st on txn) | iouType |
iouAmount |
isAmountSet |
Result |
|---|---|---|---|---|---|
| Workspace, amount empty | Policy expense chat | submit, create, track, split, invoice | 0 | false | common.error.fieldRequired |
| Workspace PAY, amount empty | Policy expense chat | pay | 0 | false | common.error.fieldRequired |
| Workspace submit, user set $0 | Policy expense chat | submit | 0 | true | null |
| Workspace invoice, user set $0 | Policy expense chat | invoice | 0 | true | common.error.invalidAmount |
| P2P, amount empty | P2P | submit, create, pay, split | 0 | false | common.error.invalidAmount |
| P2P, user set positive | P2P | submit | 2500 | true | null |
| P2P, user set $0 | P2P | submit | 0 | true | common.error.invalidAmount |
| P2P invoice, user set $0 | P2P | invoice | 0 | true | common.error.invalidAmount |
| Self-DM, amount empty | Self-DM | submit | 0 | false | common.error.fieldRequired |
| Self-DM, user set $0 | Self-DM | submit | 0 | true | null |
| Beta off, P2P empty | P2P | submit | 0 | false | common.error.invalidAmount (no fieldRequired) |
P2P zero guard (legacy / non-manual bypass)
| Scenario | Participant | Request type | iouAmount |
isAmountSet |
Other | Result |
|---|---|---|---|---|---|---|
| P2P manual, beta off | P2P | manual | 0 | true | — | common.error.invalidAmount |
| Workspace manual $0 | Policy expense chat | manual | 0 | true | — | null |
| P2P scan | P2P | scan | 0 | — | receipt | null |
| P2P distance | P2P | distance | 0 | — | isDistanceRequest: true |
null |
| P2P time | P2P | time | 0 | — | isTimeRequest: true |
null |
Programmatic types (beta on; no isAmountSet requirement)
| Scenario | Participant | Request type | iouAmount |
Result |
|---|---|---|---|---|
| Scan | Policy expense chat | scan | 1000 | null |
| Distance | Policy expense chat | distance | 5000 | null |
| Time | P2P | time | 3600 | null |
| Per diem | Policy expense chat | per-diem | 5000 | null |
| Scan (standalone) | base (P2P in params) | scan | 1000 | null |
| Per diem (standalone) | base | per-diem | 5000 | null |
Distance / time / per diem limits
| Scenario | Request type | iouAmount |
Other | Result |
|---|---|---|---|---|
| Distance too long | distance | 123456789012345 | isDistanceRequest: true |
common.error.invalidAmount |
| Distance pending route | distance | MAX_SAFE_AMOUNT |
isDistanceRequestWithPendingRoute: true |
null |
| Distance too large (safe max) | distance | MAX_SAFE_AMOUNT + 1 |
— | iou.error.distanceAmountTooLarge |
| Time too large | time | MAX_SAFE_AMOUNT + 1 |
isTimeRequest: true |
iou.timeTracking.amountTooLargeError |
| Per diem invalid total | per-diem | 0 | huge subRates | iou.error.invalidQuantity |
| Per diem no sub-rates | per-diem | 100 | empty subRates |
iou.error.invalidSubrateLength |
Split bill
| Scenario | 1st participant | iouType |
iouAmount |
isAmountSet |
isEditingSplitBill |
txn.amount |
Result |
|---|---|---|---|---|---|---|---|
| Edit split, $0 total | P2P | submit | 0 | — | true | 100 | common.error.invalidAmount |
| New split, unset | P2P (multi) | split | 0 | false | false | 0 | common.error.invalidAmount |
| New split, unset | Policy expense chat | split | 0 | false | false | 0 | common.error.fieldRequired |
| New split, user set $0 | Policy expense chat (multi) | split | 0 | true | false | 0 | common.error.invalidAmount |
| Edit split, $0 total | Policy expense chat (multi) | submit | 0 | true | true | 100 | iou.error.invalidAmount |
Quick matrix — manual request, new manual flow (beta on)
| Participant | Unset amount (isAmountSet: false, iouAmount: 0) |
User set $0 (isAmountSet: true) |
|---|---|---|
| Policy expense chat + submit | fieldRequired |
Valid (null) |
| Policy expense chat + invoice | fieldRequired |
invalidAmount |
| Policy expense chat + split | fieldRequired |
invalidAmount |
| P2P + submit | invalidAmount |
invalidAmount |
| P2P + invoice | invalidAmount |
invalidAmount |
| Self-DM + submit | fieldRequired |
Valid (null) |
MoneyRequestTest — draft amount actions
| Action | Input | Expected draft |
|---|---|---|
setMoneyRequestAmount(txn, 1500, 'USD') |
User enters amount | amount: 1500, isAmountSet: true |
setMoneyRequestAmount(txn, 0, 'USD') |
User explicitly sets $0 | amount: 0, isAmountSet: true |
clearMoneyRequestAmount(txn) after set |
User clears field | amount: 0, isAmountSet: false |
IOURequestStepAmountTest — isParticipantP2P
| Participant | Result |
|---|---|
P2P (accountID, isPolicyExpenseChat: false) |
true |
undefined |
false |
No accountID |
false |
| Policy expense chat | false |
accountID: 0 |
false |
accountID only (no policy flag) |
true |
Self-DM (isSelfDM: true) |
false |
AmountField UI (not unit-tested here)
| Condition | Amount display |
|---|---|
Beta on, manual, !isAmountSet |
Empty field (not $0.00) |
Beta on, manual, isAmountSet |
Shows formatted amount |
| Inline error | Maps formError → fieldRequired / invalidAmount |
P2P inline $0 uses isParticipantP2P() (same rules as table above, including self-DM exclusion).
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@JS00001 for visibility |
Explanation of Change
Fixed Issues
$ #90650
#90661
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Precondition:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Enable Invoices in workspace settings.
User has sent an invoice to another user.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-05-21.at.9.12.54.PM.mov
Screen.Recording.2026-05-22.at.6.17.38.PM.mov