[Payment due @dmkt9] Allow manual reimbursement workspaces to set and use a preferred payer#92787
[Payment due @dmkt9] Allow manual reimbursement workspaces to set and use a preferred payer#92787NikkiWines wants to merge 45 commits into
Conversation
|
@mjasikowski 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] |
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6bac69bd50
ℹ️ 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".
|
Let's have a C+ review this too, I'll ask in the room |
d71ac35 to
3768f72
Compare
|
@dmkt9 @mjasikowski this has been updated and is ready for a re-review please 🙇 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7066ee9fb4
ℹ️ 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".
|
Thanks for the review @dmkt9 🙇 updated! |
|
@codex review 🙇 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8e82af49b
ℹ️ 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".
| achAccount: policyOwner | ||
| ? { | ||
| reimburser: policyOwner, | ||
| bankAccountID: null, |
There was a problem hiding this comment.
Preserve the selected payer when resetting the bank account
When a workspace has a preferred payer different from the owner and its bank account is reset/disconnected, this optimistic update overwrites achAccount.reimburser with policyOwner instead of the current achAccount?.reimburser. That makes the manual-reimbursement payer revert to the owner (and routes payer-only badges/next steps to the wrong admin) until a later refresh/server update, even though removing the bank account should not discard the workspace’s selected payer.
Useful? React with 👍 / 👎.
|
I'm on it now |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81030ed181
ℹ️ 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".
| bankAccountID: null, | ||
| accountNumber: null, | ||
| addressName: null, | ||
| bankName: null, | ||
| state: null, |
There was a problem hiding this comment.
Clear all ACH fields when preserving the payer
Because this update is applied with Onyx.METHOD.MERGE, replacing achAccount: null with a partial object only clears the listed keys; existing fields omitted from the old ACH account, such as routingNumber and sharees, remain in Onyx after a USD bank-account reset. That leaves stale bank details/share access attached to the policy while the account is considered removed, so clear the whole achAccount first or include every nested ACH field as null when preserving only the reimburser.
Useful? React with 👍 / 👎.
|
Bug: Duplicate bank account disconnection confirmation modal appears. 2026-06-30.11-21-10.mp4 |
|
@dmkt9 thanks for the review:
I think that's out of scope of this PR if it's happening on prod, and I'm also unable to reproduce this locally
I'm unable to reproduce this locally, can you confirm this doesn't happen for you on Screen.Recording.2026-06-30.at.12.08.29.mov |
add tests
I just tested this on I also retested it on our PR, but I couldn't reproduce it there either. That's really strange. |
|
@codex review |

Explanation of Change
Updates the UI so that manual/indirect payment workspaces (
reimburseManual) can now use a preferred payer, the same way direct payment workspaces (reimburseYes) already could.Fixed Issues
$ Part 2 of 2 for https://github.com/Expensify/Expensify/issues/637864
PROPOSAL: N/A internal
Tests
Setup
Test 1: Payer picker in manual mode
Test 2: Only the designated payer sees Pay GBR
Paybutton next to the workspace chatPaybutton next to the workspace chat(Payer left, Non-Payer right)

Waiting for you to pay expenses.and the option to pay the reportWaiting for <Admin B> to pay expenses.and confirm they do see the option to pay the report(Payer left, Non-Payer right)

Test 3: Home Action Items
For younotifying you to pay the reportFor youto pay the report(Payer left, Non-Payer right)

Test 4: Spend Page Action Items
Ready to Paynotifying you to pay the reportReady to payto pay the report(Payer left, Non-Payer right)

Test 5: Switching payers with bank account requires sharing
Offline tests
Offline behaviors are unchanged from current behaviors
QA Steps
Same as test steps
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
MacOS: Chrome / Safari
Screen.Recording.2026-06-17.at.18.30.07.mov