Repository navigation
Conversation
…abled The offline pre-flight guard only checked the Expensify Cards blocker, so a workspace blocked by Consolidated Travel Billing was optimistically deleted offline and later rejected with the Expensify Cards wording. Treat either blocker as a known rejection while offline and surface the matching error.
…offline-travel-billing-delete
The offline guard only needs the policy ID and the error key, so it now returns before the policy list is filtered. The delete flow also shares one blocked condition between the offline guard and the warning shown after an online rejection.
wildan-m
marked this pull request as ready for review
November 13, 2026 01:30
melvin-bot
Bot
requested review from
cretadn22
and removed request for
a team
November 13, 2026 01:30
|
@cretadn22 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] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
2 of 7 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Deleting a workspace offline when it has Consolidated Travel Billing enabled shows no warning. The workspace is removed optimistically and the delete is queued, so once the app is back online the backend rejects it and the workspace row shows the Expensify Cards message instead. The delete flow already blocks an offline delete up front when it knows locally that the workspace has active Expensify Cards, but it never checked the travel billing blocker, and the error it saved on the workspace was always the Expensify Cards one.
The offline check now covers both blockers, using the same condition that picks the warning after an online rejection, so the travel billing warning shows right away, nothing is queued, and the workspace row gets the matching message. Expensify Cards still take priority when both apply, as they do online. Travel billing funded by a domain lives on the domain's card program, which this check doesn't read, so those workspaces are still deleted offline as before.
Fixed Issues
$ #98262
PROPOSAL: #98262 (comment)
Tests
Precondition:
Offline tests
Steps 2-6 of Tests.
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
My test account has no verified bank account to turn on Consolidated Travel Billing, so in these runs the workspace's travel billing settings and travel card were set in Onyx locally.
Android: Native
98262-android-native.mp4
Android: mWeb Chrome
98262-android-mweb.mp4
iOS: Native
98262-ios-native.mp4
iOS: mWeb Safari
98262-ios-mweb.mp4
MacOS: Chrome / Safari
98262-macos-chrome.mp4