Repository navigation
fix: stop showing the canceled status on expense previews - #99097
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…ata assertion Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2375cfbc61
ℹ️ 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".
trjExpensify
left a comment
There was a problem hiding this comment.
I'm a bit confused by this. With approvals enabled, why wouldn't we show [Approved] Canceled * 1 expense like we do if approvals are disabled: [Done] Canceled * 1 expense`?
CC: @Expensify/design
That is indeed confusing and even with approvals disabled it disappears once API is successful, I'm just trying to match the prod behaviour in this PR. If we want to completely remove the "Canceled" text (for now), we can do that here and discuss the actual intended behaviour in a follow-up. |
|
Both blockers were demoted so no need to hurry up merging this PR. |
|
@Expensify/design, bump on this when you get a chance: #99097 (review) |
I'm not sure I'm totally following, and honestly didn't even know we displayed |
You got a screenshot of this Tom? |
|
@dubielzyk-expensify @trjExpensify I think this is what Tom is talking about? Please correct me if I'm wrong! CleanShot.2026-08-27.at.08.10.46.mp4 |
|
Okay cool, that seems good to me? So no need to show it in the expense preview, just show it at the top report title line. |
|
Seeing done and cancelled next to each other is soooo confusing 🙃 Why is it marked as done when it's not paid? Or even if it's technically done and doesn't need to be marked as paid, saying cancelled in the top seems odd to me. A cancelled payment seems more like a system message-only thing to me as it's just an action that was undone. 🤷♀️ |
Yah I feel the same. |
|
Yeah that is a good point, I could get down with that. Maybe let's see what @trjExpensify thinks when he is back from OOO? |
|
I'm down to remove it from the expense preview too, but @Krishna2323 do you have eyes on the history of when it was added in the first place so we can check the reasons why that was? (I too wasn't aware until this issue, or well, I have forgotten). |
|
@trjExpensify Yep, traced it. It came from #29344 (merged Dec 2023) for #29319, the P2P activation work. It was originally scoped to exactly one case, a wallet payment auto-cancelled because the recipient didn't enable their Expensify Wallet within 30 days, but } else if (props.iouReport.originalMessage.reason === CONST.IOU.CANCEL_REASON.PAYMENT_EXPIRED) {
message += ` • ${props.translate('iou.canceled')}`; |
|
Nice sleuth. Kill it. 🔪 |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…unt field Signed-off-by: krishna2323 <belivethatkg@gmail.com>
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.
|
|
The Monosnap.screencast.2026-09-03.10-11-34.mp4@situchan ready for your review |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
🤖 Reviewed Verified
Two notes
I could not verify any of this in a browser on this run, so the behavioral claims above come from reading the code and the optimistic-update paths, not from running the app. The test steps still need a human pass. |
How to cancel this? |
|
🤖 Web test steps verification results: ✅ pass No regressions found. A full submit → approve → pay → cancel-payment cycle plus a separate hold flow on dev NewDot web produced no |
|
🚧 JS00001 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/JS00001 in version: 9.4.73-0 🚀
|
|
🤖 Yes — help site changes are needed, and I opened a draft PR: #100487 Nothing on the help site became wrong because of this PR. No article ever claimed a I verified every label against the live UI before writing. What changed on the help site
The capitalization fix is separate from your change — it was already wrong. The UI uses sentence case, so Live UI verification and why I scoped it this wayI drove the flow on web: created a workspace expense, approved it, marked it as paid, then canceled the payment.
That matches the code: after this PR, One thing worth a look, unrelated to the docs: the cancellation system message has a spelling mismatch between its accessibility label and its visible text. The a11y tree reads "cancelled the payment" (double L) while the rendered pixels read "canceled the payment" (single L). Not caused by this PR — I did not touch the travel articles, @Krishna2323, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
@Krishna2323 @situchan Step 11 and 16 are card related steps and will be hard to validate |
|
@Krishna2323 @situchan Step 6 - there is no Cancel payment option after sending money. Selected option as Marked as paid. Is this expected? also steps 10 and 15 are contradict each other The Canceled is not shown in report page, it shows Approved instead (step 15) No.cancel.in.1.1.mp4No.Canceled.mp4 |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.73-3 🚀
Bundle Size Analysis (Sentry): |






Explanation of Change
#98758 moved
Canceledfrom the expense preview line up to the report level, but dropped the precedence it had before.On production,
Canceledwas the last branch in the if/else chain. Cancelling a payment in a workspace with approvals puts the report back inAPPROVED/APPROVED, so theApprovedbranch matched first andCanceledwas never shown for that flow. Moving it to the report level made it show for the first time, and only in the Inbox, which is the inconsistency QA reported.Fix: Keep the approved report-level placement, but don't show it when the badge is already
Approved.So:
[Approved] 1 expense[Done] Canceled • 1 expenseFixed Issues
$ #99091
$ #99093
PROPOSAL:
Tests
Canceled must NOT show anywhere on the expense preview
1 expensenext to theApprovedbadge — noCanceledanywhere, on the header line or the expense's supporting line.Canceled. Both surfaces match.1 expensenext to theDonebadge — noCanceled. This is the case that used to show it, both on production and earlier in this PR.Canceledon the preview.Regression checks
Date • Category, with no stray•when the category is missing.• Canceledon the expense itself —MoneyRequestViewis intentionally untouched by this PR.Pending(card transaction) andPending match(RTER) still appear on the supporting line where applicable.This expense was put on holdand the text is not repeated on the supporting line. With an extra violation:Category missing • This expense was put on hold.Draft/Outstanding/Approved/Done/Paidall render as before, with the correct expense count beside them.• Canceled. If the report is approved or paid, it now shows• Approved/• Paidthere instead.• Cancelednext to the amount, and thePurchase <amount>hint andPosted <date>are unaffected.Offline tests
QA Steps
Same as tests
Verify that no errors appear in the JS console
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Monosnap.screencast.2026-09-03.10-11-34.mp4