Skip to content

Fix bugs for selfDM splits feature#92055

Draft
ZhenjaHorbach wants to merge 4 commits into
Expensify:mainfrom
ZhenjaHorbach:fix-bugs-with-selfDM-splits
Draft

Fix bugs for selfDM splits feature#92055
ZhenjaHorbach wants to merge 4 commits into
Expensify:mainfrom
ZhenjaHorbach:fix-bugs-with-selfDM-splits

Conversation

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

@ZhenjaHorbach ZhenjaHorbach commented May 29, 2026

Explanation of Change

Fixed Issues

$ #91874
$ #91875 - in progress
$ #91876
$ #91879
$ #91907
$ #91913
$ #91917 - hold
$ #91918
$ #91920 - BE changes are required
PROPOSAL:

Tests

#91874

Precondition:

  • Create two workspaces.
  • Make personal policy as default policy on OD.

Test:

  1. Open App
  2. Go to self DM
  3. Create a distance expense
  4. Open the expense
  5. Click Rate field
  6. Verify that the workspace selector opens
  7. Close the RHP
  8. Click More > Split
  9. Click on any split
  10. Click Rate field
  11. Verify that rate field on split details page will open workspace selector

#91875

Test:

  1. Open App
  2. Go to self DM.
  3. Create a manual expense.
  4. Open the expense.
  5. Click More > Split > Save.
  6. Go to Spend > Expenses.
  7. Select both splits via checkbox.
  8. Click dropdown button > Delete > Delete.
  9. Enter status:deleted on search field and search.
  10. Select one of the deleted splits via checkbox.
  11. Click dropdown button > Undelete.
  12. Go to self DM.
  13. Open the undeleted split.
  14. Click Amount.
  15. Click Save.
  16. Verify that the original split will disappear after splitting undeleted split.

#91876

Precondition:

  • Account has no workspace.

Test:

  1. Open App
  2. Go to self DM.
  3. Create a distance expense.
  4. Open the expense.
  5. Click More > Split > Save.
  6. Open any split.
  7. Click Amount.
  8. Click on the split.
  9. Click Rate.
  10. Click Upgrade > Confirm > Got it, thanks.
  11. Enter rate and save it.
  12. Verify rate list will show workspace rates when the current distance expense uses personal rate.

#91879

Precondition:

  • Have a workspace.

Test:

  1. Open App
  2. Go to self DM.
  3. Create an expense.
  4. Open the expense.
  5. Click More > Split.
  6. Open any split.
  7. Click Category.
  8. Click Add category button.
  9. Click back button on not here page.
  10. Verify that add category button will open category creation page.

#91907

Test:

  1. Open App
  2. Go to self DM.
  3. Create a manual expense.
  4. Open the expense.
  5. Click More > Split > Save.
  6. Open any split.
  7. Click on the header.
  8. Click Submit it to someone.
  9. Verify that:
  • If you aren’t a member of a workspace, hide the ‘Submit to someone’ option on Split expenses
  • If you’re a member of a workspace, filter the ‘Submit to someone’ option to workspaces for split expenses

#91913

Precondition:

  • Account has a workspace.
  • Account has Self DM.

Test:

  1. Open App
  2. Navigate to Self DM.
  3. Create a manual expense.
  4. Open the just created expense.
  5. Click on "More" > "Split" > Save splits.
  6. Open one of the splits.
  7. Click on "More" > "Move to Report" > "Create Report"
  8. Return to Self DM.
  9. Right click and delete the remaining split.
  10. Verify that self DM should still be visible after deleting a split on LHN

#91918

Test:

  1. Open App
  2. Open a workspace chat and create a manual expense.
  3. Split the created expense.
  4. Go offline.
  5. Select one of the split expenses and delete it.
  6. Verify that only the selected split expense should be deleted, and no extra expense should appear while offline

#91920

Precondition:

  • Account has Self DM.

Test:

  1. Open App
  2. Navigate to Self DM.
  3. Create a manual expense.
  4. Navigate to "Spend" > "Expenses"
  5. Select the just created expense.
  6. Click on dropdown menu > "Split" > Save splits amount.
  7. Select one of the splits.
  8. Verify that after splitting an unreported expense and selecting a split on "Expenses" section, "Total Spend" should display the same amount as the selected split
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
91874.mov
91876.mov
91879.mov
91907.mov
91913.mov
91918.mov
91920.mov

@ZhenjaHorbach ZhenjaHorbach changed the title Fix bugs with self dm splits Fix bugs for self dm splits feature May 29, 2026
@ZhenjaHorbach ZhenjaHorbach changed the title Fix bugs for self dm splits feature Fix bugs for selfDM splits feature May 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

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.

Files with missing lines Coverage Δ
src/libs/PolicyUtils.ts 70.39% <ø> (ø)
src/libs/actions/IOU/SplitTransactionUpdate.ts 84.91% <100.00%> (+0.06%) ⬆️
...ox/report/actionContents/ChatActionableButtons.tsx 79.74% <100.00%> (+0.79%) ⬆️
...es/iou/request/step/IOURequestStepParticipants.tsx 0.00% <0.00%> (ø)
src/pages/DynamicReportDetailsPage.tsx 56.46% <62.50%> (+0.46%) ⬆️
...es/iou/request/step/IOURequestStepDistanceRate.tsx 0.00% <0.00%> (ø)
src/pages/iou/SplitExpenseEditPage.tsx 0.00% <0.00%> (ø)
.../iou/request/step/IOURequestStepCategoryCreate.tsx 0.00% <0.00%> (ø)
src/hooks/useDeleteTransactions.ts 18.70% <0.00%> (-0.85%) ⬇️
... and 13 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant