Fix/90661#91326
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
Note: for zero-amount track expense, the "Missing amount" error on the transaction preview is an existing bug and is irrelevant to any of the PRs related to the current project. |
|
@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] |
| const firstParticipant = participantsList.at(0); | ||
| if (isNewManualExpenseFlowEnabled && firstParticipant?.isSelfDM && selfDMReport?.reportID && iouType !== CONST.IOU.TYPE.SPLIT) { | ||
| for (const draftTransaction of transactions) { | ||
| const selfDMParticipants = getMoneyRequestParticipantsFromReport(selfDMReport, currentUserPersonalDetails.accountID).map((participant) => ({ |
There was a problem hiding this comment.
❌ PERF-13 (docs)
getMoneyRequestParticipantsFromReport(selfDMReport, currentUserPersonalDetails.accountID).map(...) is called inside the for (const draftTransaction of transactions) loop but does not depend on draftTransaction. The result is identical on every iteration, creating redundant O(n) computation.
Hoist the selfDMParticipants computation above the loop:
const selfDMParticipants = getMoneyRequestParticipantsFromReport(selfDMReport, currentUserPersonalDetails.accountID).map((participant) => ({
...participant,
iouType: CONST.IOU.TYPE.TRACK,
}));
for (const draftTransaction of transactions) {
setMoneyRequestParticipants(draftTransaction.transactionID, selfDMParticipants);
setTransactionReport(draftTransaction.transactionID, {reportID: CONST.REPORT.UNREPORTED_REPORT_ID}, true);
}Reviewed at: 7759af0 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7759af017f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| if (!isScanRequestUtil(transaction) && !isTimeRequest && !isDistanceRequest && !isPerDiemRequest && !isValidMoneyRequestAmount(iouAmount, iouType, true, isP2P, isSelfDM)) { | ||
| return {errorKey: 'common.error.invalidAmount'}; | ||
| } | ||
| if (isNewManualExpenseFlowEnabled && !transaction?.isAmountSet) { |
There was a problem hiding this comment.
Check amount-set state before invalid-amount validation
When NEW_MANUAL_EXPENSE_FLOW is enabled and the amount input is still untouched (transaction.isAmountSet is false), this new guard now returns common.error.invalidAmount for INVOICE, PAY, and SPLIT because iouAmount defaults to 0. That bypasses the intended required-field path immediately below and shows the wrong validation state for an empty field. This regression is introduced by broadening the invalid-amount check at this point in the flow; the isAmountSet check should run first (or be folded into this condition) so empty amounts still surface common.error.fieldRequired in manual-expense confirmation.
Useful? React with 👍 / 👎.
trjExpensify
left a comment
There was a problem hiding this comment.
bug fixes for push input editing 👍
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-05-22.at.5.45.18.PM.movScreen.Recording.2026-05-22.at.5.44.05.PM.mov |
Explanation of Change
Fixed Issues
$ #90661
#90681
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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-22.at.2.54.31.AM.mov