Skip to content

[Due for payment 2026-08-27] Expense - "Tracked $XX" remains on chat after moving remaining split to workspace. #97424

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.46-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: #92055
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has Self DM.
Prerequisite 2: Account has at least one workspace.

  1. Open the staging.new.expensify.com website.
  2. Navigate to Self DM.
  3. Create a manual expense.
  4. Open the just created expense.
  5. Click on "More" > "Split" > Save splits.
  6. Right click and delete the split displayed at the bottom.
  7. Open remaining split.
  8. Click on report field > "Create Report"
  9. Return to Self DM.
  10. Note that "Tracked $XX" is displayed as a message in chat.
  11. Delete the message.
  12. Note that message remains but expense disappears from workspace chat.
  13. Delete the message again.
  14. Note that now, message disappears too.

Expected Result:

User should be able to move remaining split to workspace chat and no message should remain visible on Self DM.

Actual Result:

After deleting unreported split and moving remaining one to workspace, "Tracked $XX" appears as message in chat on Self DM. Deleting the message, makes the split disappears from workspace chat.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7221368_1785365238180.Self_Split_8.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7221368

Issue OwnerCurrent Issue Owner: @ZhenjaHorbach

Activity

  1. applause-bot commented on Jul 30, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/fe02344967061e2086a3396d8a0961b6ff705bc9ab9738a100f6856bd9af3d2f

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

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #92055

  4. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    @lakchote @dmkt9 you have been assigned to this deploy blocker because you reviewed the offending PR: #92055

  5. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    @ZhenjaHorbach you have been assigned to this deploy blocker because you authored the offending PR: #92055

  6. melvin-bot commented on Jul 30, 2026

    @melvin-bot

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

  7. github-actions commented on Jul 30, 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.
  8. MelvinBot commented on Jul 30, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #92055 - "Fix bugs for selfDM splits feature" by @ZhenjaHorbach (High confidence)
    Related Issues: This PR bundles fixes for #91874, #91876, #91879, #91907, #91913, #91917, #91918, #91920 (all part of the new self-DM splits feature)

    Recommendation: ROLL FORWARD (targeted fix)

    The self-DM splits feature is new (not in production), and PR #92055 bundles fixes for 8 linked issues across 25 files — a straight revert would reintroduce those bugs and is riskier than a scoped follow-up. The regression is contained to one code path (reverse-split-then-move) and is cleanly fixable.

    Assigned: @ZhenjaHorbach (PR author), @lakchote and @dmkt9 (approving reviewers) from the highest-confidence causing PR
    Labels: No change. DeployBlockerCash is kept (App PR caused it, App deploy is blocked). DeployBlocker was not present, so nothing to remove.

    📋 Detailed Analysis

    Evidence

    • PR Fix bugs for selfDM splits feature #92055 is titled "Fix bugs for selfDM splits feature", merged 2026-07-29T09:35:16Z, and is item The mobile app opens up with the keyboard showing #76 on the current StagingDeployCash checklist (Deploy Checklist: New Expensify 2026-07-29 #97375, Deploy Checklist: New Expensify 2026-07-29) — the exact 9.4.46 release the blocker is filed against.
    • Bug is staging-only / N/A in prod because self-DM splits is a brand-new feature that only exists behind this work.
    • The PR touches every subsystem the repro exercises: self-DM split creation/reverse (src/libs/actions/IOU/SplitTransactionUpdate.ts), split-child deletion (src/hooks/useDeleteTransactions.ts), and the tracked-expense report action rendering (src/pages/inbox/report/ReportActionItem.tsx, ChatActionableButtons.tsx).

    Verification

    • Bug symptom areas map directly to PR changes:
      • Leftover "Tracked $XX" message → the IOU report-action cleanup in SplitTransactionUpdate.ts.
      • Double-delete of the message → the moved-split-child deletion grouping in useDeleteTransactions.ts.
    • Confirmed the merged code is present at local HEAD ad07aea4514235edcacd5629583f7ab240bc53d6 (grep for iouActionsToCleanUp, isMovedExpenseSplitChild, and the reworked isReverseSplitOperation).

    Root Cause

    The repro is: create tracked expense in Self DM → split into 2 → delete one split → move the remaining split to a workspace via "Create Report".

    1. PR Fix bugs for selfDM splits feature #92055 loosened the reverse-split predicate. It now fires whenever one editable split remains, dropping the previous allChildTransactions.length === originalChildTransactions.length guard:
      SplitTransactionUpdate.ts#L290
      So "delete one split, then move the last one to a workspace" now takes the reverse-split path (revive original transaction, then move it), not the creation path.

    2. The stale-IOU-report-action cleanup — the code that marks the old "Tracked $XX" action DELETE and tears down its transaction thread — is gated on both !isReverseSplitOperation and isCreationOfSplits:
      SplitTransactionUpdate.ts#L1576-L1600
      Because the move is a reverse-split (and not a creation), this block is skipped entirely. The revived original transaction moves to the workspace, but a fresh "Tracked $XX" report action is left orphaned in the Self DM — exactly the "message remains on chat" symptom.

    3. The double-delete comes from the new moved-split-child branch in deletion:
      useDeleteTransactions.ts#L225-L235
      The orphaned Self DM action points to a transaction thread whose transaction now lives in the workspace. The first delete resolves the transaction (expense disappears from the workspace chat) but leaves the report action behind; a second delete is needed to remove the message itself — the report-action deletion and transaction-thread deletion are not applied atomically for this moved-child case.

    Suggested targeted fix

    • Extend the leftover-IOU-action cleanup so it also runs on a reverse-split that moves the surviving split to a different report (i.e. when isReverseSplitOperation is true and the split does not stay in the original Self DM), deleting the stale Self DM "Tracked $XX" action instead of leaving it orphaned — mirror the existing iouActionsToCleanUp block at SplitTransactionUpdate.ts#L1610 into that path.
    • Ensure the report-action DELETE and the transaction-thread teardown are pushed together for the moved-split-child case in useDeleteTransactions.ts so a single delete removes both the message and the expense.
  9. 5 remaining items

  10. 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.

  11. 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.

  12. changed the title [-]Expense - "Tracked $XX" remains on chat after moving remaining split to workspace.[/-] [+][Due for payment 2026-08-27] Expense - "Tracked $XX" remains on chat after moving remaining split to workspace.[/+] on Aug 20, 2026
  13. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    @ZhenjaHorbach / @dmkt9

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.56-3 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-27. 🎊

    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]

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