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
Split - Split amount field changes to NaN after clearing other split amount field #81241
Version Number: 9.3.11-23 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#79273 Email or phone of affected tester (no customers):sodjnsoidjsnosijoi@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense with negative amount.
Open the expense report.
Click More > Split.
Click any split amount field.
Clear the field but leave the negative sign.
Expected Result:
The other split amount field will update to the total amount.
👋 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: #79273 - "feat: update amounts/percentages split logic to match OD" by @ikevin127 (High confidence) Related Issues: None
Recommendation: REVERT
PR #79273 introduced auto-redistribution logic for split expenses that does not properly handle edge cases when the user input is invalid (e.g., just a negative sign "-").
The issue reports that when splitting a negative expense and clearing a split amount field while leaving just the negative sign "-", the other split amount field changes to NaN instead of updating to the total amount.
PR #79273 was specifically called out in the issue as being caught during regression testing. The PR introduced new auto-redistribution logic for split expenses that automatically updates unedited splits when one split is modified.
Verification
The bug occurs in the split expense flow, specifically when editing split amounts. PR #79273 modified:
src/libs/actions/IOU/index.ts - Added updateSplitExpenseAmountField with redistribution logic
When a user clears a split amount field and leaves only the negative sign "-", the input validation in MoneyRequestUtils.tsvalidateAmount() function allows "-" as a valid input (line 51):
However, when this "-" value is parsed as a number in SplitExpensePage.tsx line 246-254, it becomes NaN. The convertToBackendAmount(NaN) returns NaN, which is then passed to updateSplitExpenseAmountField().
The new redistribution logic in PR #79273 calculates the remaining amount and tries to redistribute it among unedited splits:
constremaining=total-editedSum;// If editedSum contains NaN, remaining becomes NaNconstnewAmount=calculateIOUAmount(lastUneditedIndex,remaining,currency,isLast,true);
When remaining is NaN, all redistributed amounts become NaN, causing the UI to display "NaN" in the other split amount fields.
This edge case was not handled in the PR, and the existing validation that allows "-" as an intermediate input state combined with the new auto-redistribution logic creates this bug.
Activity
melvin-bot commentedon Feb 3, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #79273
melvin-bot commentedon Feb 3, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 3, 2026
Triggered auto assignment to @joekaufmanexpensify (
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 3, 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 3, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #79273 - "feat: update amounts/percentages split logic to match OD" by @ikevin127 (High confidence)
Related Issues: None
Recommendation: REVERT
PR #79273 introduced auto-redistribution logic for split expenses that does not properly handle edge cases when the user input is invalid (e.g., just a negative sign "-").
Labels: Keeping
DeployBlockerCash(frontend bug blocks App deploy), removingDeployBlocker(not a backend issue)📋 Detailed Analysis
Evidence
The issue reports that when splitting a negative expense and clearing a split amount field while leaving just the negative sign "-", the other split amount field changes to NaN instead of updating to the total amount.
PR #79273 was specifically called out in the issue as being caught during regression testing. The PR introduced new auto-redistribution logic for split expenses that automatically updates unedited splits when one split is modified.
Verification
The bug occurs in the split expense flow, specifically when editing split amounts. PR #79273 modified:
src/libs/actions/IOU/index.ts- AddedupdateSplitExpenseAmountFieldwith redistribution logicsrc/components/MoneyRequestAmountInput.tsx- AddedallowNegativeInputpropsrc/components/NumberWithSymbolForm.tsx- Added logic to handle negative inputsrc/components/SelectionList/ListItem/SplitListItem/SplitAmountInput.tsx- EnabledallowNegativeInputRoot Cause
When a user clears a split amount field and leaves only the negative sign "-", the input validation in
MoneyRequestUtils.tsvalidateAmount()function allows "-" as a valid input (line 51):However, when this "-" value is parsed as a number in
SplitExpensePage.tsxline 246-254, it becomesNaN. TheconvertToBackendAmount(NaN)returnsNaN, which is then passed toupdateSplitExpenseAmountField().The new redistribution logic in PR #79273 calculates the remaining amount and tries to redistribute it among unedited splits:
When
remainingisNaN, all redistributed amounts becomeNaN, causing the UI to display "NaN" in the other split amount fields.This edge case was not handled in the PR, and the existing validation that allows "-" as an intermediate input state combined with the new auto-redistribution logic creates this bug.
ikevin127 commentedon Feb 3, 2026
🟢 Follow-up PR #81245 open for review! Hopefully we can avoid a revert 🤞
blimpich commentedon Feb 3, 2026
Reverted PR and am in the process of retesting. 3 deploy blockers present so went with revert instead of fix.
m-natarajan commentedon Feb 3, 2026
Unable to edit the split amount, Windows 10 / Chrome
v9.3.11-38
repro.-.issue.81241.-.can.t.edit.mp4
blimpich commentedon Feb 3, 2026
^ this is same behavior on prod, not a blocker