Repository navigation
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
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.
|
85d452f to
a1a30ed
Compare
…-to-open # Conflicts: # src/libs/TransactionUtils/index.ts
|
@ZhenjaHorbach 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. |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
| const ownerAction = ownSelfDMAction ?? item.reportAction; | ||
|
|
||
| // A legacy unreported expense can have no IOU action at all. With no action and no report, `from` holds only the card holder. | ||
| const isOwnExpense = ownerAction |
There was a problem hiding this comment.
Not a blocker, but one case is still not covered: a legacy unreported Expensify Card expense on the user's own card still won't open if that card was deactivated (for example, replaced after it was lost, or deactivated by an admin).
Why: with no IOU action, ownership depends on from, and from comes from the card list. A deactivated Expensify Card is removed from the holder's cardList and from the workspace card lists, and later API responses leave out deactivated virtual cards and older deactivated physical cards. So from is empty, isOwnExpense is false, and tapping the expense still does nothing. Delete is not affected, because Expensify Card expenses can't be deleted anyway. Closed company cards are not affected either, because unassigning a company card deletes its unreported expenses.
A frontend fallback that treats an unknown card as the user's own card isn't safe. The admin's workspace card list drops the deactivated card too, so a member's expense would then look like the admin's own.
Suggestion: add this case to https://github.com/Expensify/Expensify/issues/705811, so the backend fix covers it too, either by returning the owner's accountID on the Search transaction or by creating the missing IOU action. Either one would fix the admin case and this case together. It would also help to say in the comment above isOwnExpense that an unknown card fails closed.
There was a problem hiding this comment.
Suggestion: add this case to https://github.com/Expensify/Expensify/issues/705811, so the backend fix covers it too, either by returning the owner's accountID on the Search transaction or by creating the missing IOU action. Either one would fix the admin case and this case together. It would also help to say in the comment above isOwnExpense that an unknown card fails closed.
@mountiny @mollfpr Is it possible to return owner's accountID on the Search transaction?
There was a problem hiding this comment.
@mollfpr what do you think? the transaaction's owner is derived value that is not saved on the transactions table, but technically if it simlifies things a lot we could return that
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-11-20.at.14.45.20.movAndroid: mWeb ChromeScreen.Recording.2026-11-20.at.14.47.51.moviOS: HybridAppScreen.Recording.2026-11-20.at.14.45.20.moviOS: mWeb SafariScreen.Recording.2026-11-20.at.14.47.51.movMacOS: Chrome / SafariScreen.Recording.2026-11-20.at.14.41.49.movScreen.Recording.2026-11-20.at.14.42.18.mov |
|
Changes look good! |
garrettmknight
left a comment
There was a problem hiding this comment.
Looks good from a product perspective.
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 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.5.52-1 🚀
|
|
No help site update needed — this bug fix restores expected opening and deletion of legacy unreported expenses without adding a new workflow or making existing guidance incorrect. |
Explanation of Change
Some legacy unreported expenses have no IOU action. Search reads the expense owner from that action, so a missing action made tapping the expense in Spend -> Expenses do nothing, and hid the Delete option.
When an unreported expense has no IOU action, the owner is now decided from the transaction:
Opening such an expense creates its thread in the current user's self DM. The transaction is passed along, so the existing legacy fallback in
openReportbuilds the missing IOU action and asks the backend to create it.createTransactionThreadReporttakes a new optionalisOwnedByCurrentUserparam, since without an action it can't tell the expense is the user's.canDeleteMoneyRequestReportuses the same rule, so the Delete option shows for these expenses.Another member's card expense with no IOU action, which an admin can see on their card feed, isn't covered here. It will be handled after BE https://github.com/Expensify/Expensify/issues/705811 is fixed.
Fixed Issues
$ #106850
PROPOSAL: N/A
Tests
These steps need an account with a legacy unreported expense that has no IOU action, like the one in the issue. New expenses always get one.
Before (staging):
before.mp4
After (current branch):
after.mp4
Offline tests
Same as 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
MacOS: Chrome / Safari
after.mp4
web_not_legacy_expances.mp4