Clarify Approval Options When Held Expenses Exist And Fix Regressions#83667
Clarify Approval Options When Held Expenses Exist And Fix Regressions#83667mkzie2 wants to merge 24 commits intoExpensify:mainfrom
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce4af78465
ℹ️ 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".
| return ( | ||
| <Button | ||
| success | ||
| onPress={() => onApprove(true)} |
There was a problem hiding this comment.
Block restricted delegates before invoking approve action
When isDelegateAccessRestricted is true, this component renders the fallback Button and calls onApprove(true) directly, but the new onApprove handlers in MoneyReportHeader / MoneyRequestReportPreviewContent no longer perform the delegate-access guard before approveMoneyRequest. That regresses the previous behavior (showing the no-access modal) and lets restricted delegates trigger approval attempts instead of being stopped.
Useful? React with 👍 / 👎.
| } else if (isAnyTransactionOnHold) { | ||
| setIsHoldMenuVisible(true); | ||
| } else { | ||
| } else if (!isAnyTransactionOnHold) { |
There was a problem hiding this comment.
Handle held-expense path in confirmApproval callback
The callback now performs approval only in the !isAnyTransactionOnHold branch, so held-expense reports fall through with no action. This callback is still used by payment/selection-mode approve paths (via confirmApproval passed into payment selection), and canApproveIOU() does not exclude held reports, so choosing approve from those menus becomes a silent no-op when any expense is on hold.
Useful? React with 👍 / 👎.
|
@mkzie2 This PR to fix regressions, should we have the original C+ review it? |
|
@truph01 Yeah this PR should be reviewed by @parasharrajat |
|
Looks like a flaky test |
|
@parasharrajat Friendly bump for review |
|
Will be checking in the morning. |
|
@parasharrajat Friendly bump. |
Screenshots🔲 iOS / native🔲 iOS / Safari🔲 MacOS / Chrome🔲 Android / Chrome🔲 Android / native |
|
Thanks for the Updates. I will catching up on this soon. |
Explanation of Change
Fixed Issues
$ #70383
$ #83259
$ #83261
$ #83264
PROPOSAL: #70383 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov