fix: stop showing the canceled status on expense previews - #99097
fix: stop showing the canceled status on expense previews#99097Krishna2323 wants to merge 4 commits into
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. |
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
PROPOSAL:
Tests
Canceled must NOT show
1 expensewith theApprovedbadge — noCanceled •prefix.Canceled. Both surfaces match.Canceled MUST show (optimistically), at report level
Canceled • 1 expensenext to aDonebadge.Cancelednever appears on the expense preview's supporting line in any of these — only at report level.Regression checks
Date • Category, with no stray•when the category is missing.• Canceledon the expense itself (MoneyRequestView unchanged).PendingandPending matchstill appear where applicable.This expense was put on hold, not repeated on the supporting line. With an extra violation:Category missing • This expense was put on hold.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-08-20.23-59-10.mp4