Repository navigation
Kepp Mark as paid label and action in sync after selecting Pay with business account - #96525
Conversation
…ith business account Co-authored-by: Marco Chávez <marcochavezf@users.noreply.github.com>
|
The only failing check is Every real CI check is passing:
(The To get the PR green: open the checklist in the description and tick each |
|
No code fix is needed — all CI checks pass (tests, typecheck, builds, perf, ESLint, etc.). The only non-passing check was
This isn't something a code push can fix. It just needs the author to tick the checkboxes in the PR description (and fill in the Nothing to push here. |
|
Analyzed the checks — no code fix is needed. Every functional check is green (all 8 The only failing check is Action for you: Complete the PR Author Checklist (and fill in the |
Mark as paid label and action in sync after selecting Pay with business account
Mark as paid label and action in sync after selecting Pay with business accountMark as paid label and action in sync after selecting Pay with business account
|
@mkhutornyi 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
trjExpensify
left a comment
There was a problem hiding this comment.
- Create a workspace with USD currency (no business bank account connected).
- Create an expense in the workspace chat > Submit > Approve.
- On the report header, click the Mark as paid split-button dropdown arrow and choose Pay with business account.
- The Add Bank Account RHP opens — close it without completing setup.
- Click the main Mark as paid button directly (without opening the dropdown).
- Verify the expense is marked as paid (Pay Elsewhere) and the Add Bank Account page does not re-open.
- Verify that no errors appear in the JS console.
The tests don't sound right. If this is your first time paying, the button label should read "Pay" and clicking it on the USD currency workspace is intended to launch the Add Bank Account flow?
I think maybe this is intended for after you've "Marked as paid" once, such that it's stored as your lastPaymentMethod? Please make sure the tests are updated, and also test there's no regression with the first time payer case either. Thanks!
|
The only failing check is PR Reviewer Checklist / checklist — all other checks (tests, typecheck, ESLint, build, perf, etc.) are passing. This isn't a code failure. The check fails with:
It's a human-completed checklist that a reviewer must fill out by checking each box in the PR's reviewer checklist comment. There's nothing to fix in the code and nothing I can push to resolve it — the assigned reviewer just needs to complete the checklist and it will turn green. |
|
@MelvinBot update Tests Steps as per #96525 (review) |
|
Updated the Tests and QA steps. Key correction: the main button's label is driven by
The revised steps set up the two-expense scenario (pay one via Pay elsewhere first, so the label becomes "Mark as paid") and separately cover the first-time-payer case to confirm no regression. |
|
🚧 marcochavezf has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.4.46-0 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR against Expensify's help site files under Why: This is an internal correctness fix. It adds The fix makes the button behave the way users already expect. It:
The user-facing payment behavior (paying via a business bank account, "Pay elsewhere"/mark as paid) is already covered by existing help articles, and none of them describe the internal split-button behavior this PR corrects. So there is nothing to add or amend. If you feel a specific article should call out this behavior, let me know which one and I'll draft the update. @marcochavezf, since no help-site changes were required, there is no linked docs PR to review or mark |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.46-10 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
When a policy has no business bank account set up, choosing Pay with business account only opens the Add Bank Account flow for KYC (identity verification). It does not complete a payment. The
BUSINESS_BANK_ACCOUNTentry inuseSettlementButtonPaymentMethodswas missingshouldUpdateSelectedIndex: false, while theELSEWHEREentry already sets it. So selecting Pay with business account from the dropdown bumped the split button's selected index to that option, wiring the main button to re-trigger the Add Bank Account flow — even though the main button's label (driven bylastPaymentMethod, not the selected index) still read Mark as paid. The result was a label/action mismatch: the button said "Mark as paid" but pressing it re-opened the Add Bank Account flow.This PR adds
shouldUpdateSelectedIndex: falseto theBUSINESS_BANK_ACCOUNTpayment-method definition, matchingELSEWHERE, so selecting Pay with business account no longer changes the main button's default action.Fixed Issues
$ #90524
PROPOSAL: #90524 (comment)
Tests
Setup: A workspace with USD currency and no business bank account connected. Create two expenses in the workspace chat, then Submit and Approve both so each has its own payable report.
Main scenario — label/action mismatch (the bug this PR fixes):
Pay Elsewhereas your last payment method, so from now on the split button's main label defaults to Mark as paid.First-time payer regression check:
7. On a fresh workspace with USD currency and no business bank account (no prior payment made anywhere), open an approved report. Verify the main button reads Pay $X.XX.
8. Open the dropdown and choose Pay with business account. Verify it correctly launches the Add Bank Account (KYC) flow — this is the intended first-time behavior and is unchanged by this PR.
Offline tests
QA Steps
Same as test steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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-07-22.at.3.00.56.p.m.mov