Repository navigation
Conversation
… statusNum to use actual statuses for splits
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d8a7c1e7e
ℹ️ 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".
| const itemTransaction = allTransactions?.[transactionKey] ?? searchResultsData?.[transactionKey]; | ||
| const reportKey = `${ONYXKEYS.COLLECTION.REPORT}${itemTransaction?.reportID}` as const; | ||
| const itemReport = allReports?.[reportKey] ?? searchResultsData?.[reportKey] ?? fallbackReport; | ||
| if (isSplitExpenseFrozen(itemReport)) { |
There was a problem hiding this comment.
Why don't we use a function like isSplitExpenseEditable in DynamicSplitExpensePage?
There was a problem hiding this comment.
I'm not sure about it
Since isSplitExpenseEditable is a broad permission gate for the whole flow
But we need a narrow rule: when the report is already approved/paid/closed and the amount is fixed
There was a problem hiding this comment.
Yeah, I'm not sure about it as well.
But if a split expense isn't editable while its amount can still change when I delete another split expense, that feels a bit odd.
@lakchote WDYT?
There was a problem hiding this comment.
But okay
I think we can use isSplitAction here
But I would prefer to leave isSplitExpenseFrozen guard here also, since isSplitAction short-circuits true for selfDM regardless of status, so it alone wouldn't catch a selfDM report that's somehow approved/settled/closed even if it's an edge case
There was a problem hiding this comment.
I agree with dmkt9 here. The rows on DynamicSplitExpensePage still get isEditable from isSplitExpenseEditable. That one only checks Onyx, falls back to the current report, and has no frozen check. So from Spend a frozen split can still show an editable amount input. Typing there or saving it is silently ignored by the new guards. Can we base the row's isEditable on frozenSplitTransactionIDs too, so the list and the actions agree? Then isSplitExpenseEditable can go.
There was a problem hiding this comment.
@ZhenjaHorbach the other 4 look good, thanks. This one's still open though. The rows on DynamicSplitExpensePage still get isEditable from isSplitExpenseEditable, which has no frozen check, so from Spend a frozen split still shows an editable amount. Can you also fill in Explanation of Change and the QA steps in the description?
There was a problem hiding this comment.
Oh
Right
Fixed!
|
I found a bug. I think this is a BE bug. The original transaction isn't available after "clear cache and restart" when the two split transactions are in separate reports. cc @lakchote 2026-09-08.09-31-06.mp4 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da7368376e
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfe1710673
ℹ️ 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".
|
@MelvinBot review, find any potential bugs |
|
🤖 Reviewed the diff. The core approach (derive frozen-ness live from each split's own report instead of a cached 1. The snapshot fallback can silently miss, re-opening the exact bug this PR fixes
Failure: the split's report is missing from the Onyx 2. Per diem gets the same dead-end that the card guard exists to prevent
Failure: per diem expense, splits A (Approved) and B (open). Remove is shown on B. Removing it leaves A frozen at its old amount, sum < total → "total amount less than original" on Save, and there's nothing left to edit to fix it. The user is stuck. 3. The frozen split is still tappable and editable when its report only exists in the search snapshot
So in the scenario your new test adds (Approved report present only in the snapshot), the Approved split still renders as editable: the user can open it and hit Remove, which drops it from the draft entirely. Redistribution is frozen but the row isn't. Worth routing both through the same resolver. 4.
|
We can still reproduce this bug from Spend: 2026-10-05.21-06-49.mp4 |
|
I just noticed a new bug on staging: 2026-10-05.20-49-48.mp4 |
There was a problem hiding this comment.
Thanks for this @ZhenjaHorbach. One real issue on the Spend route (the frozen split restore can flip the sign), plus a couple of smaller ones. Can you also fill in Explanation of Change and the QA steps in the description? They're still empty.
|
@dmkt9 thanks, this one's on the backend and not from this PR. When you open an expense report, OpenReport returns its expenses but not the original split transaction, so after a cache clear Edit splits has nothing to load and shows not found. Opening an existing expense thread does return the original, which is probably why it only shows up when the splits end up in separate reports. I'll fix it in Auth separately. |
|
@ZhenjaHorbach can you handle comments here and fix conflicts please? |
|
@lakchote |
|
Thanks! BE fix for the bug reported by @dmkt9 has been merged and should go out with the next deploy |
|
🚧 lakchote 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/lakchote in version: 9.5.7-0 🚀
|
|
No help site update needed. This PR is a bug fix that makes the app match what Split expenses already says: "Splits are locked if they're on a report that's approved, reimbursed, or closed." |
|
Deploy Blocker #103791 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.5.7-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #99190
PROPOSAL:
Tests
Precondition:
Admin creates a manual expense in the workspace chat and splits it into 2 expenses
One of the splits is moved to a new report and Approved (or Paid)
Steps:
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
2026-09-04.11.31.24.mov