[Payment due @DylanDylann] Exclude all-pending card reports from the Submit to-do#95204
Conversation
|
@DylanDylann 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 470f99d5f2
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-07-03.at.16.33.45.movAndroid: mWeb Chromestuck on mocking Onyx on mWebiOS: HybridAppScreen.Recording.2026-07-03.at.16.21.28.moviOS: mWeb Safaristuck on mocking Onyx on mWeb MacOS: Chrome / SafariScreen.Recording.2026-07-03.at.16.11.41.mov |
|
🎯 @DylanDylann, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
I think this will need to be internalQA as Applause cannot create pending ecard transactions |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de71797e13
ℹ️ 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".
mountiny
left a comment
There was a problem hiding this comment.
Looks solid, thank you!
…ort changes A pending card expense going to posted only queued the expense report for recompute, leaving the parent chat's requiresAttention stale so the report could miss the Inbox to-do/GBR once it became submittable.
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
|
🚧 mountiny 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/mountiny in version: 9.4.32-0 🚀
|
Help site review — changes required ✅This PR changes user-facing behavior that is documented on the help site, so a docs update is needed. What changed: All-pending Expensify Card reports are now excluded from the Submit to-do and no longer show a Submit button until a transaction posts. Doc that was outdated: Create and Submit Reports — the section "Why can't I submit a report with pending Expensify Card transactions?" still said the Submit button appears and errors with Unable to submit report on click. After this PR, the button no longer appears and the report isn't counted in the Submit to-do. Draft help site PR: #95687 — updates that section to reflect the new behavior ( Content changeBefore:
After:
@ishpaul777, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
I will QA this tomorrow when I make some ecard transaction |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #95815 |
Explanation of Change
Workspace expense reports whose only expense is a pending (unposted) Expensify Card transaction were being counted in the "Submit" to-do and shown a
Submitbutton, even though such a report can't be submitted until the transaction posts (its own next-steps text already says so).The client has several independent predicates that decide whether a report is submittable, and each needed the same pending-card guard:
isSubmitAction(src/libs/ReportPrimaryActionUtils.ts) - Home/For You tile, Spend count, and the report header primary button.canSubmit(src/libs/ReportPreviewActionUtils.ts) - the Submit button on the report preview card in chat.isSubmitAction(src/libs/ReportSecondaryActionUtils.ts) - the Submit option in the report More menu.canSubmitReport(src/libs/actions/IOU/ReportWorkflow.ts) - the green Submit badge/pill shown in the LHN.getReasonAndReportActionThatRequiresAttention(src/libs/ReportUtils.ts) - the Inbox "To-dos" tab membership, its count, and the green dot (GBR).All of them now gate pending on card transactions specifically (
isExpensifyCardTransaction(transaction) && isPending(transaction), reusing the sharedhasOnlyPendingCardTransactionshelper where it fits), so pending cash/manual expenses stay submittable and the behavior matches the other Submit entry points.This is the same family of bug as #637331 (all-held reports), but for pending card transactions. The server-side parallel is handled in a companion Auth PR so the prefetched Search snapshot agrees with the client.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/653982
PROPOSAL:
Tests
Submitbutton is offered and next-steps says the transaction is still pending.Offline tests
Same as Tests. The to-do counts are derived locally from Onyx data (
ONYXKEYS.DERIVED.TODOS), so the pending report should be excluded from the Submit to-do while offline as well.QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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
Screen.Recording.2026-07-03.at.1.05.33.AM.mov