Skip to content

[Due for payment 2026-08-07] Expense – Extra expense displayed when deleting a split expense offline #91918

Closed

Description

@mitarachim

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.3.83-3
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-34310/folder/13176791/90921087/1444112006
Email or phone of affected tester (no customers): applausetester+abd2r2@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Web, Android, IOS
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com.
  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.

Expected Result:

Only the selected split expense should be deleted, and no extra expense should appear while offline.

Actual Result:

An extra expense is displayed after deleting one of the split expenses while offline.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7164595_1779910825197.2026-05-27_21-30-00.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @ZhenjaHorbach

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 28, 2026
  2. melvin-bot commented on May 28, 2026

    @melvin-bot

    Triggered auto assignment to @yuwenmemon (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on May 28, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on May 28, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. OSBotify commented on May 28, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #84382 - "Add splits for unreported expenses" by @ZhenjaHorbach (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR 84382 introduced a regression in offline split-expense deletion. The fix is contained within a single, identifiable line change in SplitTransactionUpdate.ts that directly maps to the reported symptom.

    Assigned: @ZhenjaHorbach (PR author), @dmkt9, @lakchote (approving reviewers) from highest-confidence causing PR only
    Labels: DeployBlockerCash kept (Frontend bug — App PR caused the issue). DeployBlocker not present, no change needed.

    Detailed Analysis

    Evidence

    • The issue is staging-only (not reproducible in production), which aligns with the staging deploy containing PR 84382.
    • The bug is triggered by: create a manual expense in a workspace chat, split it, go offline, then delete one of the split expenses — an extra expense appears.
    • PR 84382 ("Add splits for unreported expenses") was merged on 2026-05-27 and is included in the current staging deploy (v9.3.83-3 / 9.3.84-0).
    • PR 84382 directly modifies src/libs/actions/IOU/SplitTransactionUpdate.ts, src/libs/actions/IOU/SplitExpenseItems.ts, src/libs/actions/SplitExpenses.ts, and src/hooks/useDeleteTransactions.ts — all the core split-expense code paths.

    Verification

    The affected file is /home/runner/_work/App/App/src/libs/actions/IOU/SplitTransactionUpdate.ts.

    PR 84382 modifies this file and introduces the following change at line 1251:

    Before:

    const forceDeleteSplitTransactionID = isReverseSplitOperation
      ? splitExpenses.at(0)?.transactionID
      : undefined;

    After:

    const forceDeleteSplitTransactionID =
      isReverseSplitOperation && !isOffline
        ? splitExpenses.at(0)?.transactionID
        : undefined;
    • The PR modifies src/libs/actions/IOU/SplitTransactionUpdate.ts (confirmed via gh pr view 84382 --json files).
    • The change at line 1251 directly controls offline split-deletion behavior.
    • The pre-existing comment directly above this line reads: "resulting in 3 transactions (deleted, undeleted, and original) being shown at the same time when offline. Since original transaction will be reverted and both splits will eventually be deleted, we remove the undeleted split entirely instead of marking it for deletion."

    Root Cause

    The updateSplitTransactions function has a known edge case in offline reverse-split operations: when a split expense is deleted, an "undeleted" split and the original transaction can temporarily both be visible at once, producing an extra phantom expense. The pre-existing code handled this by using forceDeleteSplitTransactionID to immediately remove the undeleted split from Onyx (force-delete) even while offline.

    PR 84382 added the && !isOffline guard, disabling this force-delete when the device is offline. When isOffline is true, forceDeleteSplitTransactionID becomes undefined, so the undeleted split is no longer removed from Onyx. This means all three items — the deleted split, the undeleted split, and the original transaction — are visible simultaneously while offline, exactly matching the reported symptom of "an extra expense is displayed after deleting one of the split expenses while offline."

  6. 44 remaining items

  7. mitarachim commented on Jul 29, 2026

    @mitarachim
    Author

    Deploy Blocker #97403 was identified to be related to the PR #92055 that attempted to fix this issue.

  8. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  9. jponikarchuk commented on Jul 30, 2026

    @jponikarchuk

    Deploy Blocker #97424 was identified to be related to the PR #92055 that attempted to fix this issue.

  10. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  11. lakchote commented on Jul 30, 2026

    @lakchote
    Contributor
  12. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  13. mitarachim commented on Jul 30, 2026

    @mitarachim
    Author

    Deploy Blocker #97436 was identified to be related to the PR #92055 that attempted to fix this issue.

  14. changed the title [-]Expense – Extra expense displayed when deleting a split expense offline[/-] [+][Due for payment 2026-08-07] Expense – Extra expense displayed when deleting a split expense offline[/+] on Jul 31, 2026
  15. melvin-bot commented on Jul 31, 2026

    @melvin-bot

    @ZhenjaHorbach / @dmkt9

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.46-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-08-07. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  16. melvin-bot commented on Aug 19, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions