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
[$250] Distance - Error when deleting unedited split after editing the other split #83514
Version Number: 9.3.26-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82257 Email or phone of affected tester (no customers):sodijnoisdnjoinjsionjsio@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create a manual distance expense.
Open the expense.
Click More > Split > Save.
Open any split.
Click Distance.
Change the distance and save it.
Open the unedited split.
Click More > Delete > Delete.
Expected Result:
The unedited split can be deleted.
Actual Result:
The unedited split cannot be deleted.
Error shows up.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #82257 - "feat: handle the Distance and Rate fields for splits" by @ZhenjaHorbach (High confidence) Related Issues: Part of a larger feature to support distance fields in split expenses
Recommendation: REVERT
This PR introduced a new feature for handling distance and rate fields in split expenses, which appears to have broken the delete functionality for unedited splits. Given this is a new feature that doesn't exist in production (as noted in the issue: "N/A - new feature, doesn't exist in prod"), reverting is the safest approach to unblock the deploy while the author investigates the root cause.
Labels: Removed DeployBlocker (backend deploy is not blocked). Kept DeployBlockerCash (App deploy remains blocked until this is fixed or the causing PR is reverted).
📋 Detailed Analysis
Evidence
PR #82257 was merged on 2026-02-24 and is the only PR in the staging deploy that modified split expense handling for distance requests. The bug specifically involves:
Creating a manual distance expense
Splitting it
Editing the distance on one split
Attempting to delete the unedited split
This exact workflow was introduced by this PR, which added support for distance/rate fields on split expenses.
Verification
The PR modified the following key files related to split expense handling:
Added customUnit, waypoints, odometerStart, odometerEnd to split expense data structure
New function updateSplitExpenseDistanceFromAmount() to calculate distance from amount
Modified initSplitExpense() to calculate customUnit and merchant for distance splits
Added distance-specific fields to SplitTransactionParams
Root Cause
When a distance expense is split, PR #82257 now populates distance-specific fields (customUnit, waypoints, etc.) for each split. The workflow in the bug report:
Create splits: Both splits get customUnit with calculated quantity (distance) based on split amounts
Edit one split's distance: Updates that split's customUnit.quantity and merchant
Delete the unedited split: Fails with an error
The issue appears to be that when deleting the unedited split, the transaction data structure or validation logic encounters an issue with the customUnit / distance fields that were added by this PR. The delete logic in updateSplitTransactions() calls getDeleteTrackExpenseInformation() for splits being removed, but may not properly handle the new distance-specific fields, especially when one split has been edited and another has not.
Specifically, looking at lines 1363-1404 in Split.ts, the delete logic iterates through undeletedTransactions (splits being removed) and calls getDeleteTrackExpenseInformation(), but this logic may not account for the new customUnit structure that this PR added for distance transactions.
changed the title [-]Distance - Error when deleting unedited split after editing the other split[/-][+][$250] Distance - Error when deleting unedited split after editing the other split[/+]on Feb 26, 2026
Activity
melvin-bot commentedon Feb 26, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82257
melvin-bot commentedon Feb 26, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 26, 2026
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Feb 26, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Feb 26, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #82257 - "feat: handle the Distance and Rate fields for splits" by @ZhenjaHorbach (High confidence)
Related Issues: Part of a larger feature to support distance fields in split expenses
Recommendation: REVERT
This PR introduced a new feature for handling distance and rate fields in split expenses, which appears to have broken the delete functionality for unedited splits. Given this is a new feature that doesn't exist in production (as noted in the issue: "N/A - new feature, doesn't exist in prod"), reverting is the safest approach to unblock the deploy while the author investigates the root cause.
Labels: Removed
DeployBlocker(backend deploy is not blocked). KeptDeployBlockerCash(App deploy remains blocked until this is fixed or the causing PR is reverted).📋 Detailed Analysis
Evidence
PR #82257 was merged on 2026-02-24 and is the only PR in the staging deploy that modified split expense handling for distance requests. The bug specifically involves:
This exact workflow was introduced by this PR, which added support for distance/rate fields on split expenses.
Verification
The PR modified the following key files related to split expense handling:
src/libs/actions/IOU/Split.ts- Core split expense logic (326 additions, 37 deletions)src/libs/actions/IOU/index.ts- Money request handling (20 additions, 1 deletion)src/libs/TransactionUtils/index.ts- Transaction utilities (51 additions, 5 deletions)src/pages/iou/SplitExpensePage.tsx- Split expense UIKey changes include:
customUnit,waypoints,odometerStart,odometerEndto split expense data structureupdateSplitExpenseDistanceFromAmount()to calculate distance from amountinitSplitExpense()to calculatecustomUnitandmerchantfor distance splitsSplitTransactionParamsRoot Cause
When a distance expense is split, PR #82257 now populates distance-specific fields (
customUnit,waypoints, etc.) for each split. The workflow in the bug report:customUnitwith calculatedquantity(distance) based on split amountscustomUnit.quantityandmerchantThe issue appears to be that when deleting the unedited split, the transaction data structure or validation logic encounters an issue with the
customUnit/ distance fields that were added by this PR. The delete logic inupdateSplitTransactions()callsgetDeleteTrackExpenseInformation()for splits being removed, but may not properly handle the new distance-specific fields, especially when one split has been edited and another has not.Specifically, looking at lines 1363-1404 in
Split.ts, the delete logic iterates throughundeletedTransactions(splits being removed) and callsgetDeleteTrackExpenseInformation(), but this logic may not account for the newcustomUnitstructure that this PR added for distance transactions.4 remaining items
melvin-bot commentedon Feb 26, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)[-]Distance - Error when deleting unedited split after editing the other split[/-][+][$250] Distance - Error when deleting unedited split after editing the other split[/+]melvin-bot commentedon Feb 26, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022026837030460461987
hoangzinh commentedon Feb 26, 2026
cc @ZhenjaHorbach @suneox, are you available to take a look at this DB? #83514 (comment)
suneox commentedon Feb 26, 2026
I think this is a BE issue
83514.1.mp4
api/RevertSplitTransactionresponse{ "code": 666, "jsonCode": 666, "type": "Expensify\\Libs\\Error\\ExpError", "UUID": "CC8A6F15-8EBA-46CC-9F83-B42659C6D224", "message": "This transaction is not a split transaction", "title": "", "data": { .... ], "requestID": "9d3faa904b940f04-LAX" }lakchote commentedon Apr 14, 2026
Issue not repro anymore
Screen.Recording.2026-04-14.at.19.44.49.mov
Closing.