Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
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.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022120537864468643155
- Upwork Job ID: 2120537864468643155
- Last Price Increase: 2026-11-11
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.5 remaining items
ahmedGaber93 commentedon Nov 20, 2026
@MelvinBot I don't have access to this repository. I'm only asking for clarification on the expected changes to the backend response.
melvin-bot commentedon Nov 20, 2026
@ahmedGaber93 Use the Connect GitHub link in our earlier Slack DM. I will continue the original request once you are connected.
ahmedGaber93 commentedon Nov 20, 2026
@MelvinBot could you please send me new connect link on slack, I got this error
melvin-bot commentedon Nov 20, 2026
@ahmedGaber93 I sent you a Slack DM to connect GitHub. I will continue the original request once you are connected.
MelvinBot commentedon Nov 20, 2026
Please send
connect githubin our Slack DM to request a fresh link. I can’t generate or send a new connection link from this GitHub thread.view run
ahmedGaber93 commentedon Nov 20, 2026
@MelvinBot implement this
Please also share the required changes from the backend.
MelvinBot commentedon Nov 20, 2026
Implementation blocked by conflicting expected behavior. No code changes or PR were created.
The mismatch still exists: Amount’s indicator recognizes a single remaining split on an open report, but split initialization requires multiple children.
However, an existing regression test explicitly requires an open singleton retaining split metadata to start a new split, not reopen existing details. The proposed shared predicate would reverse that expectation.
Backend response clarification: No required backend change or new field has been established. For the proposed existing-details behavior, the client needs:
These are existing data expectations, not confirmed missing backend functionality. Actual server responses remain unverified.
Decision needed: Should every open singleton retaining split metadata reopen Edit splits, superseding that regression test? If both behaviors must remain, we need a reliable distinction between a retained split family and a dissolved one before implementing the predicate.
view run
ahmedGaber93 commentedon Nov 20, 2026
I think this looks coorect.
ahmedGaber93 commentedon Nov 20, 2026
The root cause apear in Retract step.
When the other half was removed (step 11), the first half couldn't turn back into a full-amount expense, because its report was already approved. It stayed one half of a split.
After Unapprove → Retract, the expense should come back as a normal expense, since it no longer has a sibling. Instead it comes back as a split. It keeps its split details (
originalTransactionIDandsource: split), so the Amount field still says "Split". But there's only one child left, so the split flow starts a new split instead of opening Edit splits.I think the fix should be in the backend
Screen.Recording.2026-11-20.at.5.01.28.AM.mov
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!