-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: update amounts/percentages split logic to match OD #79273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8e695fe74
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Bug 1: Unable to edit the digits of a negative split. It becomes editable after removing the minus sign though. Screen.Recording.2026-01-10.at.12.55.47.PM.mov |
|
Posted on the issue about negative splits case - awaiting a decision. |
✅ Addressed. Screen.Recording.2026-01-10.at.15.00.39.mov |

Explanation of Change
In Classic, when a user splits an expense, we try to update the amounts for all splits to equal the amount of the original transaction automatically. We opted to go a simpler route with NewDot splits to start, avoiding any automatic updates, and punted adding this logic to a follow-up. This is that follow-up:
Problem: When users are editing the separate portions of a split they are typically trying to ensure all the portions add up to the original transaction amount.
Solution: Automatically change amounts and percentages when creating a split to add up to the original transaction amount to remove clicks/steps for the submitter. To do so, we'll implement our Classic logic:
Core logic:
Behavior for Adding Splits
Simple adding splits Example:
Further editing example:
Error handling:
Fixed Issues
$ #70799
PROPOSAL:
Tests
Test 1: Adding Splits Auto-Redistributes
Test 2: Edited Splits Stay Locked
Test 3: Editing Existing Saved Splits (All Locked)
Offline tests
Offline Test 1: Create Splits While Offline
Offline Test 2: Add Split While Offline
Offline Test 3: No Data Loss on Reconnect
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: HybridApp
android-hybrid.mp4
Android: mWeb Chrome
android-mweb.mp4
iOS: HybridApp
ios-hybrid.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov