You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$175] Split - Expense is labelled Split but does not act as a split expense after unapproving & retracting #106633
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Version Number: v9.5.36-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://github.com/Expensify/Expensify/issues/613608 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team
Action Performed:
Go to staging.new.expensify.com
Create an expense in workspace chat.
Open the expense report.
Click More > Split > Save.
Open any split.
Click Report.
Click Create report.
On the current split, click Submit and Approve.
Open the split which is moved to a new report from Step 7.
Click Amount.
Click on the highlighted split > click Remove split > Save.
Open the approved report from Step 8.
Click More > Unapprove.
Click More > Retract
Click More.
Click Amount field.
Expected Result:
In Step 15, Edit split option should be shown because Amount field has "Split" label which means it is a split expense.
In Step 16, Amount field will open split details page.
Actual Result:
In Step 15, Split option is shown when Amount field has "Split" label. It opens split page which means the expense is not a split despite "Split" label on Amount field.
In Step 16, Amount field opens split initial page despite it is labelled a "Split".
Workaround:
N/A
Platforms:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
Screenshots/Videos
Bug7288763_1792213278958.Screen_Recording_2026-10-17_at_12.56.19.mp4Upwork Automation - Do Not Edit
changed the title [-]Split - Expense is labelled Split but does not act as a split expense after unapproving & retracting[/-][+][$175] Split - Expense is labelled Split but does not act as a split expense after unapproving & retracting[/+]on Nov 11, 2026
Verified on dev NewDot web. Created a workspace and opened its expense chat, but dialog hit-testing blocked expense setup; issue 106633 could not be assessed.
Step
Status
1. Open web sessionAuthenticated dev session accessible.
✅
2. Create workspace expenseLocation-access dialog blocked automation; no expense saved.
⚠️
3. Open expense reportBlocked: no expense created.
12. Open approved reportNo approved report exists.
⚠️
13. UnapproveRequires an approved report.
⚠️
14. RetractRequired report state unavailable.
⚠️
15. Inspect More menuNeither report-level nor transaction-level menu could be assessed.
⚠️
16. Inspect Amount label and destinationRequired surviving split unavailable.
⚠️
Proposal
What is the root cause of that problem?
Medium confidence: inconsistent definitions of an existing split. The code explains both reported symptoms, but runtime confirmation remains blocked.
Removing the editable split while its sibling is approved intentionally preserves the approved sibling as a single remaining split. After retracting its report:
Amount shows “Split” because the expense retains split metadata and its report is open.
Report-level More requires multiple remaining splits, so it shows “Split,” not “Edit splits.”
Split initialization also requires multiple splits, so clicking Amount starts fresh split creation instead of opening existing details.
Code evidence and hypothesis checks
SplitTransactionUpdate.ts:425–442: a single remaining split is reverted only when an editable split remains. The approved sibling fails that condition.
Alternative checked: this need not be stale rendering—the predicates disagree deterministically. However, the transaction-thread menu uses Amount’s broader condition, unlike the report-level menu. Reproduction must confirm which menu is involved and whether the server preserves the remaining split’s metadata.
What changes do you think we should make in order to solve the problem?
Use one shared definition of an existing split family across Amount, both More menus, and split initialization. A retained family containing one active split should open its existing details, rather than generate two new splits.
Preserve approved-expense protections; do not force reversal or simply clear split metadata.
Cover the exact reported sequence, both menus, unchanged Save, edited-singleton Save, and ordinary multi-split behavior. Preserve the approved-singleton non-reversion tests.
Before implementation, confirm the server retains the single-child family after removal and retract.
What alternative solutions did you explore? (Optional)
Removing the “Split” label would align with current navigation, but would not meet the issue’s expected existing-details behavior. Renaming the menu alone would leave navigation broken.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/106633) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
There is a logic mismatch across components and action files regarding how an existing split expense is detected when only one split child remains on an open report:
Because isReportOpen is true, shouldShowSplitIndicator evaluates to true. Thus, the Amount field renders the "Split" label and delegates its onPress to initSplitExpense.
hasSplitIndicator strictly checks hasMultipleSplits and omits || isOpenReport(moneyRequestReport). Because only 1 split remains in the family (getChildTransactions.length === 1), hasSplitIndicator evaluates to false. Therefore, in useExpenseActions.ts:360, the menu displays translate('iou.split') ("Split") instead of translate('iou.editSplits') ("Edit splits").
initSplitExpense also only checks hasMultipleSplits. Because hasMultipleSplits is false, it fails the check if (isExpenseSplit && shouldShowSplitIndicator) at line 103 and falls through to lines 153–185. It calculates new 50/50 split amounts (calculateAmount(1, transactionDetailsAmount, ...)) and navigates to the new split wizard instead of populating SPLIT_TRANSACTION_DRAFT with the existing split item and navigating to the existing split overview.
What changes do you think we should make in order to solve the problem?
Align SplitExpenses.ts (initSplitExpense):
In src/libs/actions/SplitExpenses.ts, compute isReportOpen and include it in shouldShowSplitIndicator:
When isExpenseSplit && shouldShowSplitIndicator is true, initSplitExpense populates SPLIT_TRANSACTION_DRAFT with the existing split child data and navigates to the split overview screen (DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE), displaying the existing split item and allowing the user to view, edit, or add more splits.
Align useExpenseActions.ts:
In src/hooks/useExpenseActions.ts, include isOpenReport(moneyRequestReport) in hasSplitIndicator:
This ensures the report-level More menu displays "Edit splits" (translate('iou.editSplits')) whenever the split indicator is active.
Unit Tests:
Add unit test coverage in tests/actions/IOUTest/SplitTest.ts to verify that when a single split item remains after unapproving/retracting an expense report:
initSplitExpense initializes the existing split draft instead of creating a fresh 50/50 split.
The action text displays "Edit splits" when the report is open.
What alternative solutions did you explore? (Optional)
Reverting the single split to an ordinary transaction upon retracting: Rejected because report retraction only transitions workflow status and should not destructively mutate transaction structures or lose originalTransactionID lineage.
Removing the "Split" label from the Amount field: Rejected because the transaction is an existing split child whose parent and siblings exist in backend history; treating it as an un-split transaction introduces state inconsistency.
Please re-state the problem that we are trying to solve in this issue.
When an expense is split into two parts across two reports, one report is submitted and approved, the second split is removed via Remove split > Save, and the first report is then unapproved and retracted back to an open (Draft) state:
On the expense's detail view (MoneyRequestView), the Amount row displays the • Split indicator, and the transaction thread's More menu (MoneyRequestHeaderSecondaryActions) shows Edit splits.
However, on the expense report view, selecting the expense and opening the More dropdown (useExpenseActions) shows Split instead of Edit splits.
Clicking Split in that report More dropdown (or tapping the Amount row on the expense detail view) calls initSplitExpense, which treats the remaining split child as an unsplit expense and splits it in half again (creating two new draft child splits with the child's transactionID as their originalTransactionID) instead of opening the existing split details editor (DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE).
What is the root cause of that problem?
When the second split on Report 2 is removed in Step 11 while Report 1 is still Approved, updateSplitTransactions (src/libs/actions/IOU/SplitTransactionUpdate.ts:441-442) checks:
Because the remaining split on Report 1 is on an approved report (statusNum >= SUBMITTED), hasEditableSplitExpensesLeft is false, so isReverseSplitOperation does not revert the split back to a regular transaction. The remaining expense on Report 1 keeps comment.source === CONST.IOU.TYPE.SPLIT and comment.originalTransactionID, and becomes the sole remaining child transaction (getChildTransactions(allTransactions, originalTransactionID).length === 1, so hasMultipleSplits === false).
When Report 1 is subsequently unapproved and retracted (Steps 13–14), isOpenReport(moneyRequestReport) becomes true.
In PR #91549 ("Show split label if there is at least one split in open report"), all four split-indicator call sites were updated to check isExpenseSplit && (hasMultipleSplits || isReportOpen). However, when PR #91995 (commit fdf45b46a1ed) later removed the temporary !isProduction guard from those files, || isReportOpen was preserved in MoneyRequestView.tsx and MoneyRequestHeaderSecondaryActions.tsx, but was accidentally dropped from src/hooks/useExpenseActions.ts and src/libs/actions/SplitExpenses.ts:
In src/components/ReportActionItem/MoneyRequestView.tsx:427-429 and src/components/MoneyRequestHeaderSecondaryActions.tsx:263-265:
Because isOpenReport(moneyRequestReport) is missing here, hasSplitIndicator evaluates to false, causing the report More menu (src/hooks/useExpenseActions.ts:227) to label the action translate('iou.split') ("Split") instead of translate('iou.editSplits') ("Edit splits").
In src/libs/actions/SplitExpenses.ts:85-88, 103 (initSplitExpense):
Even though transactionReport is already looked up on line 87, isOpenReport(transactionReport) is missing from shouldShowSplitIndicator on line 88. Consequently, if (isExpenseSplit && shouldShowSplitIndicator) at line 103 is skipped, and initSplitExpense falls through to the new-split branch (lines 153–246), splitting the already-split child transaction into two new half-amount draft splits instead of opening the existing split expense editor for originalTransactionID.
What changes do you think we should make in order to solve the problem?
Restore the isOpenReport check in src/hooks/useExpenseActions.ts and src/libs/actions/SplitExpenses.ts (and align src/hooks/useSelectedTransactionsActions.ts) so that all split-indicator and initSplitExpense checks use the exact same isExpenseSplit && (hasMultipleSplits || isReportOpen) condition as MoneyRequestView.tsx and MoneyRequestHeaderSecondaryActions.tsx:
src/hooks/useExpenseActions.ts (lines 210–213):
Include isOpenReport(moneyRequestReport) in hasSplitIndicator:
src/libs/actions/SplitExpenses.ts (lines 85–89):
Import isOpenReport from @libs/ReportUtils and include isOpenReport(transactionReport) in shouldShowSplitIndicator:
With shouldShowSplitIndicator evaluating to true, initSplitExpense enters if (isExpenseSplit && shouldShowSplitIndicator) (line 103), populates the draft split list from relatedTransactions against the original originalTransactionID, and navigates to DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE.getRoute(reportID, originalTransactionID, transaction.transactionID) instead of creating nested splits.
src/hooks/useSelectedTransactionsActions.ts (lines 496–502):
For consistency with useExpenseActions.ts, also include isOpenReport(moneyRequestReport) when checking whether a selected transaction already has a split indicator:
Unit Tests:
Add unit tests in tests/actions/IOU/SplitTest.ts and tests/unit/useExpenseActionsTest.ts verifying that when a single remaining split child is on an open report (stateNum: CONST.REPORT.STATE_NUM.OPEN, statusNum: CONST.REPORT.STATUS_NUM.OPEN), useExpenseActions returns the Edit splits (iou.editSplits) option and initSplitExpense opens the existing split editor for originalTransactionID rather than creating two new half-amount split children.
What alternative solutions did you explore? (Optional)
We also considered hiding the • Split indicator everywhere when relatedTransactions.length === 1 even on an open report (shouldShowSplitIndicator = isExpenseSplit && hasMultipleSplits). However, PR #91549 intentionally kept the • Split indicator and Edit splits behavior on open reports with a single split so users can still inspect the original split total and add/adjust splits while the report is open, and MoneyRequestView.tsx and MoneyRequestHeaderSecondaryActions.tsx already implement isExpenseSplit && (hasMultipleSplits || isReportOpen). Restoring || isReportOpen in useExpenseActions.ts and SplitExpenses.ts directly fixes the regression from PR #91995 and keeps all surfaces consistent.
The "is this an existing split" rule is written out separately in four places, and two of them disagree with the other two. MoneyRequestView.tsx:427-429 (the Amount label and its onPress) uses isExpenseSplit && (hasMultipleSplits || isReportOpen). useExpenseActions.ts:210-212 (the report More menu text) uses only isExpenseSplit && hasMultipleSplits. initSplitExpense in src/libs/actions/SplitExpenses.ts (~lines 85-88, used at the if (isExpenseSplit && shouldShowSplitIndicator) branch) does the same, and it already reads transactionReport one line above without using it. After step 11 only one split child is left, because the approved sibling blocks the reverse-split. After Retract the report is open, so Amount says "Split" and calls initSplitExpense. That call sees hasMultipleSplits === false, skips the existing-details branch and builds a fresh 50/50 split. The More menu shows "Split" for the same reason. I read all three files. I could not run the app.
What changes do you think we should make in order to solve the problem?
Fix it once instead of patching each copy. Add one helper, for example shouldShowSplitIndicator(isExpenseSplit, childCount, report) in src/libs/TransactionUtils, returning isExpenseSplit && (childCount > 1 || isOpenReport(report)). Call it from MoneyRequestView.tsx, useExpenseActions.ts (with moneyRequestReport), initSplitExpense (with transactionReport, which is already looked up) and useSelectedTransactionsActions.ts. The next surface cannot drift again, and a closed report with one split child still behaves as before.
Test in tests/actions/IOUTest/SplitTest.ts: one child with originalTransactionID on an open report. Assert that initSplitExpense sets SPLIT_TRANSACTION_DRAFT from the existing child and navigates to MONEY_REQUEST_SPLIT_EXPENSE. Then repeat with the report approved and assert it does not. Add one useExpenseActions test that the label is iou.editSplits.
What alternative solutions did you explore? (Optional)
kevinjosh10 and HindsightWise both add || isReportOpen inline in useExpenseActions.ts and SplitExpenses.ts. That is the same condition as mine, but it leaves four hand-copied conditions, which is how they diverged. MelvinBot's analysis finds the same mismatch but leaves the fix open, with a hedge about the server. A shared helper plus the two tests is the smaller long-term change. Removing the Amount "Split" label would contradict the open-report design and the issue's expected result.
Please re-state the problem that we are trying to solve in this issue.
When an expense is split across reports, and one of the split reports is subsequently unapproved and retracted, the retracted expense retains the "Split" label but fails to provide the "Edit split" option or behave as an editable split transaction.
What is the root cause of that problem?
In src/libs/ReportUtils.ts (isSplitBillAction), src/libs/SplitExpenseUtils.ts (isSplitExpenseFrozen), and src/libs/actions/IOU/ReportWorkflow.ts (retractReport / unapproveExpenseReport):
When a split expense report is retracted via retractReport, the report action state is updated with hasReportBeenRetracted: true, but the linked transaction's split state metadata (transaction.comment.splits or parent transaction reference) is partially detached or marked as frozen because isSplitExpenseFrozen checks isReportApproved({report}) || isSettled(report) || isClosedReport(report).
In ReportActionsUtils.ts and ReportUtils.ts, the action menu option evaluator checks whether the report or action allows split modifications. When unapproving and retracting, the report status reverts from APPROVED to OPEN/SUBMITTED, but the split bill controller continues to treat the split child as locked or non-split because the parent report action's childReportID association is not reconciled with the retracted report state.
What changes do you think we should make in order to solve the problem?
In src/libs/SplitExpenseUtils.ts (isSplitExpenseFrozen):
Ensure a report that has been unapproved or retracted (report.hasReportBeenRetracted or !isReportApproved({report}) && !isSettled(report)) is not treated as frozen, allowing the split amount and split participants to be edited.
In src/libs/actions/IOU/ReportWorkflow.ts (unapproveExpenseReport and retractReport):
When resetting the report state on unapprove and retract, ensure the optimistic updates preserve the transaction's split relationships (comment.splits and splitPayerAccountIDs) and update the parent report action's metadata so that isSplitBillReportAction and the "Edit split" menu action remain active.
In src/pages/iou/DynamicSplitExpensePage.tsx / SplitBillController.tsx:
Allow navigation to edit split details when the current report is in an unapproved or retracted state.
What alternative solutions did you explore? (Optional)
Completely recreating the split transaction upon retract, which would alter transaction history and timestamps unnecessarily.
The UI and the action use two different definitions of "is a split". MoneyRequestView and MoneyRequestHeaderSecondaryActions compute shouldShowSplitIndicator = isExpenseSplit && (hasMultipleSplits || isReportOpen). After step 11 only one child is left, and after Unapprove and Retract the report is open, so the label and edit-splits menu item show. On press they call initSplitExpense, which uses a stricter check, shouldShowSplitIndicator = isExpenseSplit && hasMultipleSplits. With one child left that is false, so it skips the edit branch and builds a fresh two-way split draft, which is the initial split page. The isReportOpen clause is in the UI check but not in the action.
What changes do you think we should make in order to solve the problem?
In initSplitExpense (src/libs/actions/SplitExpenses.ts), use the same condition as the UI: isExpenseSplit && (hasMultipleSplits || isOpenReport(transactionReport)). The report is already looked up there as transactionReport.
Better, add one shared helper, for example shouldShowSplitIndicator(isExpenseSplit, hasMultipleSplits, report), next to getOriginalTransactionWithSplitInfo. Use it in MoneyRequestView, MoneyRequestHeaderSecondaryActions and initSplitExpense so they can't drift apart again.
Check useExpenseActions (hasSplitIndicator) and useSelectedTransactionsActions. They also use hasMultipleSplits alone, so they should use the helper too.
Unit test in tests/actions (SplitExpenses): a single remaining split child in an open expense report. Assert that initSplitExpense with navigateToEditSplitExpense writes the draft from the existing child and navigates to the edit-splits route, not a new 2-way split.
What alternative solutions did you explore? (Optional)
Drop isReportOpen from the UI so a lone split child is no longer labelled "Split". This is worse: a user who left one split in an open report would lose the way to edit it, and that clause looks intentional.
Please re-state the problem that we are trying to solve in this issue.
When an expense is split across two reports, one split report is submitted and approved, the sibling split on the other report is removed via Remove split > Save, and the approved report is then Unapproved and Retracted back to the open (Draft) state:
Opening the report's More menu (Step 15) displays Split instead of Edit splits, even though the expense's Amount row displays the Split indicator.
Clicking Amount on the expense view (Step 16) or selecting Split from the report's More menu opens the initial 50/50 new-split flow (creating nested child splits from the remaining split child) instead of opening the existing split details page (DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE).
What is the root cause of that problem?
Why a single split child legitimately remains on the report:
When the sibling split is removed in Step 11 while the first split's report is Approved, updateSplitTransactions (src/libs/actions/IOU/SplitTransactionUpdate.ts:441-442) checks:
Because the surviving split is on an approved report (statusNum >= SUBMITTED), hasEditableSplitExpensesLeft is false, so isReverseSplitOperation intentionally preserves it as a split child (comment.source === CONST.IOU.TYPE.SPLIT and comment.originalTransactionID). At that point getChildTransactions(allTransactions, originalTransactionID) has length 1 (hasMultipleSplits === false).
Predicate divergence introduced by commit 5bfb8e2b40 (PR #84382):
PR #91549 (7a059f4f1f) intentionally kept a single surviving split child editable as an existing split whenever its expense report is open (hasMultipleSplits || isReportOpen). Later, commit 5bfb8e2b40 ("Fix bug with removed perDiem selfDM splits in offline mode" in PR #84382) removed isOpenReport(...) from src/hooks/useExpenseActions.ts and src/libs/actions/SplitExpenses.ts while leaving it in MoneyRequestView.tsx and MoneyRequestHeaderSecondaryActions.tsx:
UI label & thread menu (src/components/ReportActionItem/MoneyRequestView.tsx:429-431 and src/components/MoneyRequestHeaderSecondaryActions.tsx:269-271): check isExpenseSplit && (hasMultipleSplits || isReportOpen). Once the report is unapproved and retracted, isReportOpen is true, so Amount renders the Split indicator and delegates onPress to initSplitExpense.
Report-level More menu (src/hooks/useExpenseActions.ts:212-214, 366): checks only const hasSplitIndicator = isExpenseSplit && hasMultipleSplits;, so with 1 child left it renders translate('iou.split') ("Split") instead of translate('iou.editSplits') ("Edit splits"). In addition, hasSplitIndicator at line 212 inspects transaction (derived from iouTransactionID via reportActions), whereas actions[SPLIT].onSelected at line 375 passes currentTransaction (transactions.at(0) from reportTransactions), which can disagree before paginated reportActions finish loading (e.g. when opening from Search).
Split initializer (src/libs/actions/SplitExpenses.ts:85-88, 103): checks only const shouldShowSplitIndicator = isExpenseSplit && hasMultipleSplits;. With relatedTransactions.length === 1, it skips if (isExpenseSplit && shouldShowSplitIndicator) at line 103 and falls through to lines 153-246, splitting the surviving split child into two new 50/50 child drafts keyed by transaction.transactionID instead of populating SPLIT_TRANSACTION_DRAFT for originalTransactionID.
Table-view selection menu (src/hooks/useSelectedTransactionsActions.ts:582-586): similarly gates canSplitTransaction on !(isExpenseSplit && hasMultipleSplits), allowing a contradictory fresh Split bulk action when that single split child is selected on an open expense report.
isOpenReport(report) (src/libs/ReportUtils.ts:2111) only checks stateNum === OPEN && statusNum === OPEN without checking report.type. Both selfDM and transactionThreadReport are chat reports whose stateNum and statusNum are 0 (OPEN). Passing report (transactionThreadReport) or parentReport (selfDM) to isOpenReport in initSplitExpense evaluates to true even when the underlying expense report is Approved/Settled (breaking approved-singleton behavior) or when a self-DM Per Diem split was dissolved offline (relatedTransactions.length === 0 after pendingAction: DELETE, producing an empty splitExpenses: [] draft — the exact scenario commit 5bfb8e2b40 guarded against).
Conversely, checking only allReports['report_' + transaction.reportID] misses open expense reports opened from Search when the report record is passed in via props/snapshot before ONYXKEYS.COLLECTION.REPORT is hydrated (as documented in tests/actions/IOUTest/SplitTest.ts:4067-4101).
What changes do you think we should make in order to solve the problem?
Add a shared helper shouldTreatAsExistingSplitExpense in src/libs/TransactionUtils/index.ts:
Centralize the collection-backed check using isOpenExpenseReport (src/libs/ReportUtils.ts:1634, which verifies isExpenseReport(report) && stateNum === OPEN && statusNum === OPEN) and requiring at least one non-deleted split child (childCount > 0):
Use shouldTreatAsExistingSplitExpense in src/libs/actions/SplitExpenses.ts (initSplitExpense):
Resolve the expense report across Onyx and the passed report/parentReport (without matching chat / transactionThread / selfDM reports, since isOpenExpenseReport checks isExpenseReport):
When shouldShowSplitIndicator is true, initSplitExpense enters the existing-split branch at line 103, initializes SPLIT_TRANSACTION_DRAFT with the surviving split child under originalTransactionID (preserving the original split parent amount), and navigates to DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE.
Align src/hooks/useExpenseActions.ts and src/hooks/useSelectedTransactionsActions.ts:
In src/hooks/useExpenseActions.ts: resolve const splitTargetTransaction = transaction ?? singleTransaction; (looking up its originalTransaction) so hasSplitIndicator and actions[SPLIT].onSelected always evaluate the same transaction, and compute:
so the report More menu displays Edit splits (translate('iou.editSplits')).
In src/hooks/useSelectedTransactionsActions.ts: replace !(isExpenseSplit && hasMultipleSplits) in canSplitTransaction with !shouldTreatAsExistingSplitExpense(firstTransaction, originalTransaction, allTransactions, report).
Unit Tests:
In tests/actions/IOUTest/SplitTest.ts: verify that for a single remaining split child on an open expense report (after unapproving & retracting, including when the report is passed directly without ONYXKEYS.COLLECTION.REPORT), initSplitExpense populates SPLIT_TRANSACTION_DRAFT under originalTransactionID and navigates to MONEY_REQUEST_SPLIT_EXPENSE; verify that on an approved expense report (even when report is a chat transaction thread) or an offline-removed self-DM Per Diem split (childCount === 0), it does not.
In tests/unit/useExpenseActionsTest.ts and tests/unit/hooks/useSelectedTransactionsActions.test.ts: verify Edit splits is shown in the report More menu and fresh Split is suppressed in bulk selection for a single split child on an open expense report.
What alternative solutions did you explore? (Optional)
Hiding the Split label on MoneyRequestView when only one split child remains on an open report: Rejected because PR #91549 intentionally preserved the Split indicator on open expense reports so users can still inspect the original parent total and edit/re-add splits, and the expected result requires Edit splits and opening the split details page.
Reverting the surviving split child into a regular expense during retractReport: Rejected because retractReport only transitions workflow state and should not destructively rewrite split lineage (originalTransactionID) or alter parent transaction amounts.
Yes, it's the same area. #91104 made a split with one expense left act like a normal expense, but it got reverted in #91549 because of #91481.
Right now, initSplitExpense counts every split half, unreported ones included, and only opens Edit splits when more than one is left. MoneyRequestView and MoneyRequestHeaderSecondaryActions count only the halves on a report, and they also show "Split" whenever the report is open. That's why Amount says "Split" here but then starts a new split.
So I think we can fix this on the frontend by making those two use the same check as initSplitExpense, without a backend change. We'd need to keep #91481 in mind though, since that's what came up last time.
@ZhenjaHorbach#91995 dropped the open-report check from initSplitExpense and useExpenseActions, but MoneyRequestView and MoneyRequestHeaderSecondaryActions still have it. Since you built splits for unreported expenses in #84382, can you take this one?
@ahmedGaber93@ZhenjaHorbach this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Activity
melvin-bot commentedon Nov 11, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (
External)[-]Split - Expense is labelled Split but does not act as a split expense after unapproving & retracting[/-][+][$175] Split - Expense is labelled Split but does not act as a split expense after unapproving & retracting[/+]melvin-bot commentedon Nov 11, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022120537864468643155
MelvinBot commentedon Nov 11, 2026
🤖 Web test steps verification results:⚠️ partial
Verified on dev NewDot web. Created a workspace and opened its expense chat, but dialog hit-testing blocked expense setup; issue 106633 could not be assessed.
1. Open web session
Authenticated dev session accessible.2. Create workspace expense
Location-access dialog blocked automation; no expense saved.3. Open expense report
Blocked: no expense created.4. More → Split → Save
Blocked by expense setup.5. Open a split
No splits created.6. Click Report
Requires a split.7. Create report
Requires the preceding step.8. Submit and approve
Required report unavailable.9. Open moved split
No split moved.10. Click Amount
Required split unavailable.11. Remove highlighted split → Save
No split exists.12. Open approved report
No approved report exists.13. Unapprove
Requires an approved report.14. Retract
Required report state unavailable.15. Inspect More menu
Neither report-level nor transaction-level menu could be assessed.16. Inspect Amount label and destination
Required surviving split unavailable.Proposal
What is the root cause of that problem?
Medium confidence: inconsistent definitions of an existing split. The code explains both reported symptoms, but runtime confirmation remains blocked.
Removing the editable split while its sibling is approved intentionally preserves the approved sibling as a single remaining split. After retracting its report:
Code evidence and hypothesis checks
Alternative checked: this need not be stale rendering—the predicates disagree deterministically. However, the transaction-thread menu uses Amount’s broader condition, unlike the report-level menu. Reproduction must confirm which menu is involved and whether the server preserves the remaining split’s metadata.
What changes do you think we should make in order to solve the problem?
Use one shared definition of an existing split family across Amount, both More menus, and split initialization. A retained family containing one active split should open its existing details, rather than generate two new splits.
Preserve approved-expense protections; do not force reversal or simply clear split metadata.
Feasibility and regression coverage
The existing-details page already supports one remaining child, and unchanged Save exits without writing.
Cover the exact reported sequence, both menus, unchanged Save, edited-singleton Save, and ordinary multi-split behavior. Preserve the approved-singleton non-reversion tests.
Before implementation, confirm the server retains the single-child family after removal and retract.
What alternative solutions did you explore? (Optional)
Removing the “Split” label would align with current navigation, but would not meet the issue’s expected existing-details behavior. Renaming the menu alone would leave navigation broken.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/106633)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run · view recording
kevinjosh10 commentedon Nov 11, 2026
Proposal
What is the root cause of that problem?
There is a logic mismatch across components and action files regarding how an existing split expense is detected when only one split child remains on an open report:
Amount Field & Header Actions:
In
MoneyRequestView.tsx:427–429andMoneyRequestHeaderSecondaryActions.tsx:263–265:Because
isReportOpenistrue,shouldShowSplitIndicatorevaluates totrue. Thus, the Amount field renders the "Split" label and delegates itsonPresstoinitSplitExpense.Report More Menu:
In
src/hooks/useExpenseActions.ts:211–212:hasSplitIndicatorstrictly checkshasMultipleSplitsand omits|| isOpenReport(moneyRequestReport). Because only 1 split remains in the family (getChildTransactions.length === 1),hasSplitIndicatorevaluates tofalse. Therefore, inuseExpenseActions.ts:360, the menu displaystranslate('iou.split')("Split") instead oftranslate('iou.editSplits')("Edit splits").Split Initialization Action:
In
src/libs/actions/SplitExpenses.ts:86–88:initSplitExpensealso only checkshasMultipleSplits. BecausehasMultipleSplitsisfalse, it fails the checkif (isExpenseSplit && shouldShowSplitIndicator)at line 103 and falls through to lines 153–185. It calculates new 50/50 split amounts (calculateAmount(1, transactionDetailsAmount, ...)) and navigates to the new split wizard instead of populatingSPLIT_TRANSACTION_DRAFTwith the existing split item and navigating to the existing split overview.What changes do you think we should make in order to solve the problem?
Align
SplitExpenses.ts(initSplitExpense):In
src/libs/actions/SplitExpenses.ts, computeisReportOpenand include it inshouldShowSplitIndicator:When
isExpenseSplit && shouldShowSplitIndicatoristrue,initSplitExpensepopulatesSPLIT_TRANSACTION_DRAFTwith the existing split child data and navigates to the split overview screen (DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE), displaying the existing split item and allowing the user to view, edit, or add more splits.Align
useExpenseActions.ts:In
src/hooks/useExpenseActions.ts, includeisOpenReport(moneyRequestReport)inhasSplitIndicator:This ensures the report-level More menu displays "Edit splits" (
translate('iou.editSplits')) whenever the split indicator is active.Unit Tests:
Add unit test coverage in
tests/actions/IOUTest/SplitTest.tsto verify that when a single split item remains after unapproving/retracting an expense report:initSplitExpenseinitializes the existing split draft instead of creating a fresh 50/50 split.What alternative solutions did you explore? (Optional)
originalTransactionIDlineage.Contributor details
Your Expensify account email: lkevinjosh10@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0131dae36abcf59374
melvin-bot commentedon Nov 11, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
HindsightWise commentedon Nov 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an expense is split into two parts across two reports, one report is submitted and approved, the second split is removed via Remove split > Save, and the first report is then unapproved and retracted back to an open (
Draft) state:MoneyRequestView), the Amount row displays the• Splitindicator, and the transaction thread's More menu (MoneyRequestHeaderSecondaryActions) shows Edit splits.useExpenseActions) shows Split instead of Edit splits.initSplitExpense, which treats the remaining split child as an unsplit expense and splits it in half again (creating two new draft child splits with the child'stransactionIDas theiroriginalTransactionID) instead of opening the existing split details editor (DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE).What is the root cause of that problem?
updateSplitTransactions(src/libs/actions/IOU/SplitTransactionUpdate.ts:441-442) checks:statusNum >= SUBMITTED),hasEditableSplitExpensesLeftisfalse, soisReverseSplitOperationdoes not revert the split back to a regular transaction. The remaining expense on Report 1 keepscomment.source === CONST.IOU.TYPE.SPLITandcomment.originalTransactionID, and becomes the sole remaining child transaction (getChildTransactions(allTransactions, originalTransactionID).length === 1, sohasMultipleSplits === false).isOpenReport(moneyRequestReport)becomestrue.#91549("Show split label if there is at least one split in open report"), all four split-indicator call sites were updated to checkisExpenseSplit && (hasMultipleSplits || isReportOpen). However, when PR#91995(commitfdf45b46a1ed) later removed the temporary!isProductionguard from those files,|| isReportOpenwas preserved inMoneyRequestView.tsxandMoneyRequestHeaderSecondaryActions.tsx, but was accidentally dropped fromsrc/hooks/useExpenseActions.tsandsrc/libs/actions/SplitExpenses.ts:src/components/ReportActionItem/MoneyRequestView.tsx:427-429andsrc/components/MoneyRequestHeaderSecondaryActions.tsx:263-265:src/hooks/useExpenseActions.ts:210-212:isOpenReport(moneyRequestReport)is missing here,hasSplitIndicatorevaluates tofalse, causing the report More menu (src/hooks/useExpenseActions.ts:227) to label the actiontranslate('iou.split')("Split") instead oftranslate('iou.editSplits')("Edit splits").src/libs/actions/SplitExpenses.ts:85-88, 103(initSplitExpense):transactionReportis already looked up on line 87,isOpenReport(transactionReport)is missing fromshouldShowSplitIndicatoron line 88. Consequently,if (isExpenseSplit && shouldShowSplitIndicator)at line 103 is skipped, andinitSplitExpensefalls through to the new-split branch (lines 153–246), splitting the already-split child transaction into two new half-amount draft splits instead of opening the existing split expense editor fororiginalTransactionID.What changes do you think we should make in order to solve the problem?
Restore the
isOpenReportcheck insrc/hooks/useExpenseActions.tsandsrc/libs/actions/SplitExpenses.ts(and alignsrc/hooks/useSelectedTransactionsActions.ts) so that all split-indicator andinitSplitExpensechecks use the exact sameisExpenseSplit && (hasMultipleSplits || isReportOpen)condition asMoneyRequestView.tsxandMoneyRequestHeaderSecondaryActions.tsx:src/hooks/useExpenseActions.ts(lines 210–213):Include
isOpenReport(moneyRequestReport)inhasSplitIndicator:src/libs/actions/SplitExpenses.ts(lines 85–89):Import
isOpenReportfrom@libs/ReportUtilsand includeisOpenReport(transactionReport)inshouldShowSplitIndicator:With
shouldShowSplitIndicatorevaluating totrue,initSplitExpenseentersif (isExpenseSplit && shouldShowSplitIndicator)(line 103), populates the draft split list fromrelatedTransactionsagainst the originaloriginalTransactionID, and navigates toDYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE.getRoute(reportID, originalTransactionID, transaction.transactionID)instead of creating nested splits.src/hooks/useSelectedTransactionsActions.ts(lines 496–502):For consistency with
useExpenseActions.ts, also includeisOpenReport(moneyRequestReport)when checking whether a selected transaction already has a split indicator:Unit Tests:
Add unit tests in
tests/actions/IOU/SplitTest.tsandtests/unit/useExpenseActionsTest.tsverifying that when a single remaining split child is on an open report (stateNum: CONST.REPORT.STATE_NUM.OPEN, statusNum: CONST.REPORT.STATUS_NUM.OPEN),useExpenseActionsreturns theEdit splits(iou.editSplits) option andinitSplitExpenseopens the existing split editor fororiginalTransactionIDrather than creating two new half-amount split children.What alternative solutions did you explore? (Optional)
We also considered hiding the
• Splitindicator everywhere whenrelatedTransactions.length === 1even on an open report (shouldShowSplitIndicator = isExpenseSplit && hasMultipleSplits). However, PR#91549intentionally kept the• Splitindicator andEdit splitsbehavior on open reports with a single split so users can still inspect the original split total and add/adjust splits while the report is open, andMoneyRequestView.tsxandMoneyRequestHeaderSecondaryActions.tsxalready implementisExpenseSplit && (hasMultipleSplits || isReportOpen). Restoring|| isReportOpeninuseExpenseActions.tsandSplitExpenses.tsdirectly fixes the regression from PR#91995and keeps all surfaces consistent.Contributor details
— submitted with Antigravity on the contributor's behalf
Stephen3453 commentedon Nov 11, 2026
Proposal
What is the root cause of that problem?
The "is this an existing split" rule is written out separately in four places, and two of them disagree with the other two.
MoneyRequestView.tsx:427-429(the Amount label and itsonPress) usesisExpenseSplit && (hasMultipleSplits || isReportOpen).useExpenseActions.ts:210-212(the report More menu text) uses onlyisExpenseSplit && hasMultipleSplits.initSplitExpenseinsrc/libs/actions/SplitExpenses.ts(~lines 85-88, used at theif (isExpenseSplit && shouldShowSplitIndicator)branch) does the same, and it already readstransactionReportone line above without using it. After step 11 only one split child is left, because the approved sibling blocks the reverse-split. After Retract the report is open, so Amount says "Split" and callsinitSplitExpense. That call seeshasMultipleSplits === false, skips the existing-details branch and builds a fresh 50/50 split. The More menu shows "Split" for the same reason. I read all three files. I could not run the app.What changes do you think we should make in order to solve the problem?
Fix it once instead of patching each copy. Add one helper, for example
shouldShowSplitIndicator(isExpenseSplit, childCount, report)insrc/libs/TransactionUtils, returningisExpenseSplit && (childCount > 1 || isOpenReport(report)). Call it fromMoneyRequestView.tsx,useExpenseActions.ts(withmoneyRequestReport),initSplitExpense(withtransactionReport, which is already looked up) anduseSelectedTransactionsActions.ts. The next surface cannot drift again, and a closed report with one split child still behaves as before.Test in
tests/actions/IOUTest/SplitTest.ts: one child withoriginalTransactionIDon an open report. Assert thatinitSplitExpensesetsSPLIT_TRANSACTION_DRAFTfrom the existing child and navigates toMONEY_REQUEST_SPLIT_EXPENSE. Then repeat with the report approved and assert it does not. Add oneuseExpenseActionstest that the label isiou.editSplits.What alternative solutions did you explore? (Optional)
kevinjosh10 and HindsightWise both add
|| isReportOpeninline inuseExpenseActions.tsandSplitExpenses.ts. That is the same condition as mine, but it leaves four hand-copied conditions, which is how they diverged. MelvinBot's analysis finds the same mismatch but leaves the fix open, with a hedge about the server. A shared helper plus the two tests is the smaller long-term change. Removing the Amount "Split" label would contradict the open-report design and the issue's expected result.TassioSales commentedon Nov 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an expense is split across reports, and one of the split reports is subsequently unapproved and retracted, the retracted expense retains the "Split" label but fails to provide the "Edit split" option or behave as an editable split transaction.
What is the root cause of that problem?
In
src/libs/ReportUtils.ts(isSplitBillAction),src/libs/SplitExpenseUtils.ts(isSplitExpenseFrozen), andsrc/libs/actions/IOU/ReportWorkflow.ts(retractReport/unapproveExpenseReport):retractReport, the report action state is updated withhasReportBeenRetracted: true, but the linked transaction's split state metadata (transaction.comment.splitsor parent transaction reference) is partially detached or marked as frozen becauseisSplitExpenseFrozenchecksisReportApproved({report}) || isSettled(report) || isClosedReport(report).ReportActionsUtils.tsandReportUtils.ts, the action menu option evaluator checks whether the report or action allows split modifications. When unapproving and retracting, the report status reverts from APPROVED to OPEN/SUBMITTED, but the split bill controller continues to treat the split child as locked or non-split because the parent report action'schildReportIDassociation is not reconciled with the retracted report state.What changes do you think we should make in order to solve the problem?
src/libs/SplitExpenseUtils.ts(isSplitExpenseFrozen):report.hasReportBeenRetractedor!isReportApproved({report}) && !isSettled(report)) is not treated as frozen, allowing the split amount and split participants to be edited.src/libs/actions/IOU/ReportWorkflow.ts(unapproveExpenseReportandretractReport):comment.splitsandsplitPayerAccountIDs) and update the parent report action's metadata so thatisSplitBillReportActionand the "Edit split" menu action remain active.src/pages/iou/DynamicSplitExpensePage.tsx/SplitBillController.tsx:What alternative solutions did you explore? (Optional)
Completely recreating the split transaction upon retract, which would alter transaction history and timestamps unnecessarily.
haiquywork commentedon Nov 12, 2026
Proposal
What is the root cause of that problem?
The UI and the action use two different definitions of "is a split".
MoneyRequestViewandMoneyRequestHeaderSecondaryActionscomputeshouldShowSplitIndicator = isExpenseSplit && (hasMultipleSplits || isReportOpen). After step 11 only one child is left, and after Unapprove and Retract the report is open, so the label and edit-splits menu item show. On press they callinitSplitExpense, which uses a stricter check,shouldShowSplitIndicator = isExpenseSplit && hasMultipleSplits. With one child left that is false, so it skips the edit branch and builds a fresh two-way split draft, which is the initial split page. TheisReportOpenclause is in the UI check but not in the action.App/src/libs/actions/SplitExpenses.ts
Lines 84 to 103 in 4d13721
App/src/components/ReportActionItem/MoneyRequestView.tsx
Lines 425 to 429 in 4d13721
App/src/components/MoneyRequestHeaderSecondaryActions.tsx
Lines 262 to 265 in 4d13721
What changes do you think we should make in order to solve the problem?
initSplitExpense(src/libs/actions/SplitExpenses.ts), use the same condition as the UI:isExpenseSplit && (hasMultipleSplits || isOpenReport(transactionReport)). The report is already looked up there astransactionReport.shouldShowSplitIndicator(isExpenseSplit, hasMultipleSplits, report), next togetOriginalTransactionWithSplitInfo. Use it inMoneyRequestView,MoneyRequestHeaderSecondaryActionsandinitSplitExpenseso they can't drift apart again.useExpenseActions(hasSplitIndicator) anduseSelectedTransactionsActions. They also usehasMultipleSplitsalone, so they should use the helper too.initSplitExpensewithnavigateToEditSplitExpensewrites the draft from the existing child and navigates to the edit-splits route, not a new 2-way split.What alternative solutions did you explore? (Optional)
isReportOpenfrom the UI so a lone split child is no longer labelled "Split". This is worse: a user who left one split in an open report would lose the way to edit it, and that clause looks intentional.cocvn157 commentedon Nov 13, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an expense is split across two reports, one split report is submitted and approved, the sibling split on the other report is removed via Remove split > Save, and the approved report is then Unapproved and Retracted back to the open (
Draft) state:Splitindicator.DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE).What is the root cause of that problem?
Why a single split child legitimately remains on the report:
When the sibling split is removed in Step 11 while the first split's report is Approved,
updateSplitTransactions(src/libs/actions/IOU/SplitTransactionUpdate.ts:441-442) checks:Because the surviving split is on an approved report (
statusNum >= SUBMITTED),hasEditableSplitExpensesLeftisfalse, soisReverseSplitOperationintentionally preserves it as a split child (comment.source === CONST.IOU.TYPE.SPLITandcomment.originalTransactionID). At that pointgetChildTransactions(allTransactions, originalTransactionID)has length1(hasMultipleSplits === false).Predicate divergence introduced by commit
5bfb8e2b40(PR#84382):PR
#91549(7a059f4f1f) intentionally kept a single surviving split child editable as an existing split whenever its expense report is open (hasMultipleSplits || isReportOpen). Later, commit5bfb8e2b40("Fix bug with removed perDiem selfDM splits in offline mode" in PR#84382) removedisOpenReport(...)fromsrc/hooks/useExpenseActions.tsandsrc/libs/actions/SplitExpenses.tswhile leaving it inMoneyRequestView.tsxandMoneyRequestHeaderSecondaryActions.tsx:src/components/ReportActionItem/MoneyRequestView.tsx:429-431andsrc/components/MoneyRequestHeaderSecondaryActions.tsx:269-271): checkisExpenseSplit && (hasMultipleSplits || isReportOpen). Once the report is unapproved and retracted,isReportOpenistrue, so Amount renders theSplitindicator and delegatesonPresstoinitSplitExpense.src/hooks/useExpenseActions.ts:212-214, 366): checks onlyconst hasSplitIndicator = isExpenseSplit && hasMultipleSplits;, so with 1 child left it renderstranslate('iou.split')("Split") instead oftranslate('iou.editSplits')("Edit splits"). In addition,hasSplitIndicatorat line212inspectstransaction(derived fromiouTransactionIDviareportActions), whereasactions[SPLIT].onSelectedat line375passescurrentTransaction(transactions.at(0)fromreportTransactions), which can disagree before paginatedreportActionsfinish loading (e.g. when opening from Search).src/libs/actions/SplitExpenses.ts:85-88, 103): checks onlyconst shouldShowSplitIndicator = isExpenseSplit && hasMultipleSplits;. WithrelatedTransactions.length === 1, it skipsif (isExpenseSplit && shouldShowSplitIndicator)at line103and falls through to lines153-246, splitting the surviving split child into two new 50/50 child drafts keyed bytransaction.transactionIDinstead of populatingSPLIT_TRANSACTION_DRAFTfororiginalTransactionID.src/hooks/useSelectedTransactionsActions.ts:582-586): similarly gatescanSplitTransactionon!(isExpenseSplit && hasMultipleSplits), allowing a contradictory fresh Split bulk action when that single split child is selected on an open expense report.Why naive
isOpenReport(...)checks regress self-DM, Search snapshots, or approved reports:isOpenReport(report)(src/libs/ReportUtils.ts:2111) only checksstateNum === OPEN && statusNum === OPENwithout checkingreport.type. BothselfDMandtransactionThreadReportarechatreports whosestateNumandstatusNumare0(OPEN). Passingreport(transactionThreadReport) orparentReport(selfDM) toisOpenReportininitSplitExpenseevaluates totrueeven when the underlying expense report is Approved/Settled (breaking approved-singleton behavior) or when a self-DM Per Diem split was dissolved offline (relatedTransactions.length === 0afterpendingAction: DELETE, producing an emptysplitExpenses: []draft — the exact scenario commit5bfb8e2b40guarded against).allReports['report_' + transaction.reportID]misses open expense reports opened from Search when the report record is passed in via props/snapshot beforeONYXKEYS.COLLECTION.REPORTis hydrated (as documented intests/actions/IOUTest/SplitTest.ts:4067-4101).What changes do you think we should make in order to solve the problem?
Add a shared helper
shouldTreatAsExistingSplitExpenseinsrc/libs/TransactionUtils/index.ts:Centralize the collection-backed check using
isOpenExpenseReport(src/libs/ReportUtils.ts:1634, which verifiesisExpenseReport(report) && stateNum === OPEN && statusNum === OPEN) and requiring at least one non-deleted split child (childCount > 0):Use
shouldTreatAsExistingSplitExpenseinsrc/libs/actions/SplitExpenses.ts(initSplitExpense):Resolve the expense report across Onyx and the passed report/parentReport (without matching
chat/transactionThread/selfDMreports, sinceisOpenExpenseReportchecksisExpenseReport):When
shouldShowSplitIndicatoristrue,initSplitExpenseenters the existing-split branch at line103, initializesSPLIT_TRANSACTION_DRAFTwith the surviving split child underoriginalTransactionID(preserving the original split parent amount), and navigates toDYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE.Align
src/hooks/useExpenseActions.tsandsrc/hooks/useSelectedTransactionsActions.ts:src/hooks/useExpenseActions.ts: resolveconst splitTargetTransaction = transaction ?? singleTransaction;(looking up itsoriginalTransaction) sohasSplitIndicatorandactions[SPLIT].onSelectedalways evaluate the same transaction, and compute:translate('iou.editSplits')).src/hooks/useSelectedTransactionsActions.ts: replace!(isExpenseSplit && hasMultipleSplits)incanSplitTransactionwith!shouldTreatAsExistingSplitExpense(firstTransaction, originalTransaction, allTransactions, report).Unit Tests:
tests/actions/IOUTest/SplitTest.ts: verify that for a single remaining split child on an open expense report (after unapproving & retracting, including when the report is passed directly withoutONYXKEYS.COLLECTION.REPORT),initSplitExpensepopulatesSPLIT_TRANSACTION_DRAFTunderoriginalTransactionIDand navigates toMONEY_REQUEST_SPLIT_EXPENSE; verify that on an approved expense report (even whenreportis achattransaction thread) or an offline-removed self-DM Per Diem split (childCount === 0), it does not.tests/unit/useExpenseActionsTest.tsandtests/unit/hooks/useSelectedTransactionsActions.test.ts: verify Edit splits is shown in the report More menu and fresh Split is suppressed in bulk selection for a single split child on an open expense report.What alternative solutions did you explore? (Optional)
Splitlabel onMoneyRequestViewwhen only one split child remains on an open report: Rejected because PR#91549intentionally preserved theSplitindicator on open expense reports so users can still inspect the original parent total and edit/re-add splits, and the expected result requires Edit splits and opening the split details page.retractReport: Rejected becauseretractReportonly transitions workflow state and should not destructively rewrite split lineage (originalTransactionID) or alter parent transaction amounts.14 remaining items
ahmedGaber93 commentedon Nov 20, 2026
@lakchote Would you mind taking a look at this since It seems have the same context of #91104?
lakchote commentedon Nov 20, 2026
Yes, it's the same area. #91104 made a split with one expense left act like a normal expense, but it got reverted in #91549 because of #91481.
Right now,
initSplitExpensecounts every split half, unreported ones included, and only opens Edit splits when more than one is left.MoneyRequestViewandMoneyRequestHeaderSecondaryActionscount only the halves on a report, and they also show "Split" whenever the report is open. That's why Amount says "Split" here but then starts a new split.So I think we can fix this on the frontend by making those two use the same check as
initSplitExpense, without a backend change. We'd need to keep #91481 in mind though, since that's what came up last time.@ZhenjaHorbach #91995 dropped the open-report check from
initSplitExpenseanduseExpenseActions, butMoneyRequestViewandMoneyRequestHeaderSecondaryActionsstill have it. Since you built splits for unreported expenses in #84382, can you take this one?ZhenjaHorbach commentedon Nov 20, 2026
I will check!
expensify-chore-bot commentedon Nov 23, 2026
@ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
ZhenjaHorbach commentedon Nov 24, 2026
Not overdue
Try to focus today or tomorrow morning!
expensify-chore-bot commentedon Nov 25, 2026
@ahmedGaber93 @ZhenjaHorbach this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
expensify-chore-bot commentedon Nov 27, 2026
@ZhenjaHorbach Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!