Deprecate PayMoneyRequestOnSearch in favor of individual pay commands per report#92297
Deprecate PayMoneyRequestOnSearch in favor of individual pay commands per report#92297luacmartins wants to merge 15 commits into
Conversation
Instead of batching all selected reports into a single payMoneyRequestOnSearch call, send one call per report to match the pattern used by Delete, Hold, and Unhold bulk actions.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c200ef0957
ℹ️ 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".
|
This is not ready for review yet. |
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.
|
…dard pay commands Removes the orchestrator pattern. payFromSearch routes each report to PayMoneyRequest, PayMoneyRequestWithWallet, or PayInvoice directly using API.write, which allows Auth to handle Onyx updates via queued updates. Also updates PayActionCell to use the new function.
Replaces payMoneyRequestOnSearch with payFromSearch, passing chatReportID looked up from allReports and invoice params where applicable.
Removes SIDE_EFFECT_REQUEST_COMMANDS.PAY_MONEY_REQUEST_ON_SEARCH, its params type mapping, the params file, and updates PayActionCell to use payFromSearch.
|
Please let me know if the PR is ready for review 🙏 |
|
@daledah not yet |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3dfb02605
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 507575f680
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75d8603227
ℹ️ 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".
|
@daledah this is ready for review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75d8603227
ℹ️ 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".
JmillsExpensify
left a comment
There was a problem hiding this comment.
My review isn't necessary here.
|
@daledah ready for another round |
| const {login: currentUserLogin, accountID: currentUserAccountID} = useCurrentUserPersonalDetails(); | ||
| const {login: currentUserLogin, accountID: currentUserAccountID, email, localCurrencyCode} = useCurrentUserPersonalDetails(); | ||
| const lastWorkspaceNumber = useLastWorkspaceNumber(); | ||
| const [nextStep] = useOnyx(`${ONYXKEYS.COLLECTION.NEXT_STEP}${reportID}`); |
There was a problem hiding this comment.
This component fetches a large set of Onyx data purely to pass it into payInvoice / payMoneyRequest. None of these values are used for the component's own rendering, similarly to other components.
So i think we can a shared usePaymentContext hook they consume internally and use it in the components to avoid code duplication and reduce the number of renders.
Explanation of Change
Removes
PayMoneyRequestOnSearchin favor of looping over the requests and firing individualPayMoneyRequestcommandsFixed Issues
$ https://github.com/Expensify/Expensify/issues/643487
Tests
Pre-condition: account with several reports ready for payment
SpendOffline tests
N/A
QA Steps
Same as tests
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
Screen.Recording.2026-06-02.at.2.30.19.PM.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari