Skip to content

[Due for payment 2026-05-12] Android - Spend - Number of expenses increases by 1 after deleting a split offline #89035

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: 9.3.63-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #87742
Email or phone of affected tester (no customers): sdsodijnosdjoij@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Samsung Galaxy S25 FE / Android 16
App Component: Search

Action Performed:

  1. Launch Expensify app.
  2. Go to workspace chat.
  3. Create an expense.
  4. Tap More > Split > Add split > Save.
  5. Go to Spend > Reports.
  6. Go offline.
  7. Open the report.
  8. Delete one of the splits.
  9. Return to Spend > Reports.

Expected Result:

Number of expenses will not increase by 1.

Actual Result:

Number of expenses increases by 1 after deleting a split offline.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7139701_1777339391511.Screen_Recording_20260428_092128_Expensify.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022050296209071195335
  • Upwork Job ID: 2050296209071195335
  • Last Price Increase: 2026-05-01

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Apr 28, 2026
  2. melvin-bot commented on Apr 28, 2026

    @melvin-bot

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

  3. melvin-bot commented on Apr 28, 2026

    @melvin-bot

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

  4. github-actions commented on Apr 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 Apr 28, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #87742 - "Update table and row styles for mobile search pages" by @Krishna2323 (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #87742 introduced the display of expense count on mobile narrow layout in the Reports view. The count formula item.transactionCount ?? item.transactions?.length ?? 0 produces an incorrect result in the offline split-deletion scenario, causing the count to increase by 1 instead of reflecting the actual expense count.

    Assigned: @Krishna2323 (PR author), @situchan @shawnborton @JS00001 @luacmartins (approving reviewers) from PR #87742
    Labels: DeployBlockerCash kept (App PR is the cause). DeployBlocker is present but the root cause is in the App repo — recommend removing DeployBlocker.

    Detailed Analysis

    Evidence

    • PR Update table and row styles for mobile search pages #87742 ("Update table and row styles for mobile search pages") was merged on 2026-04-27, within the current StagingDeployCash (version 9.3.64-0).
    • The bug is reproducible on staging only (not production), which aligns with this PR being staged but not yet deployed to production.
    • The melvin-bot automatically assigned this deploy blocker to the PR author, further confirming the link.
    • The bug is isolated to Android native narrow layout (mobile), which is exactly the target of this PR's changes.

    Verification

    Affected file: src/components/Search/SearchList/ListItem/ExpenseReportListItemRow.tsx

    This file is modified by PR #87742 (confirmed via gh pr view 87742 --json files). The critical change is in the narrow layout (!isLargeScreenWidth) branch, which previously rendered user info / action cells with NO expense count display. The PR introduced:

    const expenseCount = item.transactionCount ?? item.transactions?.length ?? 0;
    const expenseCountText = translate("iou.expenseCount", { count: expenseCount });

    Prior to this PR, no expense count was shown on mobile narrow layout in the Reports list.

    Root Cause

    When deleting a split transaction offline, the app performs an optimistic update. For a "reverse split" operation (reducing from 2 splits back to 1 expense), the Onyx update flow involves:

    • Marking split transactions for deletion (decrement)
    • Recreating the original single transaction (increment)

    The item.transactionCount field comes from the spread of reportItem in SearchUIUtils.ts (line 2696: ...reportItem). The transactionCount on the Onyx report object is not correctly accounting for the net effect of the offline split deletion in some cases, resulting in it being 1 higher than expected. Since the expense count was not visible on mobile before PR #87742, this was a latent data bug that only became visible once the PR started displaying the count. The fix could either correct the transactionCount optimistic update in the split deletion path or filter pending-delete transactions from the count calculation.

  6. 53 remaining items

  7. melvin-bot commented on May 5, 2026

    @melvin-bot

    @Krishna2323 / @situchan @mallenexpensify The PR fixing this issue has been merged! 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]

  8. changed the title [-][Due for payment 2026-05-12] [Due for payment 2026-05-11] [$250] [Due for payment 2026-05-07] Android - Spend - Number of expenses increases by 1 after deleting a split offline[/-] [+][Due for payment 2026-05-12] Android - Spend - Number of expenses increases by 1 after deleting a split offline[/+] on May 7, 2026
  9. melvin-bot commented on May 8, 2026

    @melvin-bot

    @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. melvin-bot commented on May 12, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2050296209071195335/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  11. mallenexpensify commented on May 14, 2026

    @mallenexpensify
    Contributor

    No payment here cuz it's a regression? cc @Krishna2323 @situchan .
    Please try to post deets on here so I don't have to fully review the issue and PR to see if anyone's due payment

  12. situchan commented on May 14, 2026

    @situchan
    Contributor

    The original issue itself is a regression. And payment will be handled in parent issue.

    But while fixing this, we found another bug happening in production (verified here).
    So I am only due payment for fixing this separate bug.
    PR: #89403 (worked with Melvin)

    @JS00001 can confirm

  13. mallenexpensify commented on May 14, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @situchan due $250 via NewDot

    Thx @situchan

  14. laurenreidexpensify commented on May 23, 2026

    @laurenreidexpensify
    Contributor

    $250 approved for @situchan

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething 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