Skip to content

[Due for payment 2026-11-18] [$175] Report - Arrow navigation is displayed with only one expense after two splits are deleted. #104307

Done

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.5.13-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
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/79083052/folder/57605193/41237115/1869288711
Email or phone of affected tester (no customers): ibellicotest+3215@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 a workspace.

  1. Open the staging.new.expensify.com website.
  2. Navigate to workspace chat.
  3. Create two manual expenses.
  4. Open report and navigate to the last created expense.
  5. Click on "More" > "Split" > "Save"
  6. Select both created splits and delete them.
  7. Note that after splits are deleted, arrow navigation can be visible on top of report showing "1 of 2"
  8. Click on an arrow.
  9. Note that you are navigated to "It´s not here" page.

Expected Result:

Arrow navigation shouldn´t be visible on report with only one expense available.

Actual Result:

Arrow navigation is displayed on report with only one expense after deleting two splits. Arrows navigate to "It´s not here" page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

To be added by Applause Leads

Bug7288692_1792203541009.Split_Arrow.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Chandana Kiran
Bug ID: 7288692

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    Daily
    Bug
    on Oct 18, 2026
  2. applause-bot commented on Oct 18, 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/5f8493c35e9ff3863aee5a9f3127c8471271bf144874b68c407bab4560d81bec

  3. MelvinBot commented on Oct 18, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    After you split an expense and delete both splits, the remaining expense still shows "1 of 2" arrows. The arrow opens a "Hmm... it's not here" page.

    I reproduced this on web:

    Remaining expense shows stale 1 of 2 counter

    What is the root cause of that problem?

    The arrow list still holds the original expense from before the split.

    1. When you open expense B, the app saves the report's expense IDs [A, B] as the list the arrows use.
    2. Splitting B doesn't remove B from Onyx. It moves B to the hidden split report -2 (SplitTransactionUpdate.ts:1706-1715).
    3. useCarouselTransactionIDs.ts:43 only drops expenses that are deleted or pending delete. B is neither, so it stays in the list.
    4. The splits were never in the list, so deleting them changes nothing. The list stays [A, B], which shows "1 of 2". The arrow then opens B on report -2. In my repro the arrow went to /e/-2, which doesn't exist.

    What changes do you think we should make in order to solve the problem?

    1. In useCarouselTransactionIDs, also filter out split originals. Use the existing helper isSplitContainerTransaction, which checks for reportID === SPLIT_REPORT_ID. The original should never be a navigation target, even while its splits still exist. Both MoneyReportHeader and MoneyRequestHeader use this hook, so both hide the arrows.
    2. Add a unit test. Seed [A, B], set B's reportID to -2, and check that the hook returns [A].

    What alternative solutions did you explore? (Optional)

    In the split flow, also remove the original's ID from the saved list using removeActiveTransactionIDsForReport. Remove moved expenses from their old report's prev/next carousel does the same thing for moved expenses. This works alongside the filter fix but doesn't replace it, because other flows could restore a stale list.

    Investigation details Arrow opens It's not here page

    Possibly related: Expense - Split can be opened after deleting offline and it opens not here page


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/104307) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run · view recording

  4. added
    External
    on Oct 18, 2026
  5. j3ffffff commented on Oct 18, 2026

    @j3ffffff
  6. melvin-bot commented on Oct 18, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @Krishna2323 (External)

  7. changed the title [-]Report - Arrow navigation is displayed with only one expense after two splits are deleted.[/-] [+][$175] Report - Arrow navigation is displayed with only one expense after two splits are deleted.[/+] on Oct 18, 2026
  8. melvin-bot commented on Oct 18, 2026

    @melvin-bot
  9. camesenin commented on Oct 18, 2026

    @camesenin
  10. melvin-bot commented on Oct 18, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  11. taieddie commented on Oct 18, 2026

    @taieddie

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Arrow navigation ("1 of 2") remains visible in a report header and navigates to an "It's not here" screen even when only one valid expense remains after deleting split expenses.

    What is the root cause of that problem?

    When an expense is split into child expenses, its original container transaction is moved to CONST.REPORT.SPLIT_REPORT_ID (-2) in src/libs/actions/IOU/SplitTransactionUpdate.ts (lines 1706-1715).

    In src/hooks/useCarouselTransactionIDs.ts (line 43), validTransactionIDsSelector only filters out expenses that are pending delete or deleted:
    return !isTransactionPendingDelete(transaction) && !isDeletedTransaction(transaction);
    Because the original container transaction is neither marked deleted nor pending delete, it remains in validTransactionIDs. The container transaction never leaves.

    When both created split expenses are deleted, only the single remaining non-split expense exists on the report. However, useCarouselTransactionIDs continues returning both the remaining expense and the container transaction (length of 2). Because of this, MoneyReportHeader.tsx (line 108) evaluates activeTransactionIDs.length > 1 as true, showing the "1 of 2" arrow navigation.

    Clicking the navigation arrow invokes navigateToSibling in MoneyRequestReportTransactionsNavigation.tsx. In canResolveSibling (lines 322-344) and resolveSiblingReportID (lines 258-312), the logic only guards against CONST.REPORT.UNREPORTED_REPORT_ID (0), not CONST.REPORT.SPLIT_REPORT_ID (-2). The app attempts to navigate to target report ID -2. Because report -2 does not exist, the user lands on the "It's not here" page.

    What changes do you think we should make in order to solve the problem?

    1. In src/hooks/useCarouselTransactionIDs.ts, update validTransactionIDsSelector to filter out split container transactions:
      return !isTransactionPendingDelete(transaction) && !isDeletedTransaction(transaction) && !isSplitContainerTransaction(transaction);
      Import isSplitContainerTransaction from @libs/TransactionUtils. This reactively drops the split container from the carousel as soon as reportID updates to -2.

    2. In src/components/MoneyRequestReportView/MoneyRequestReportTransactionsNavigation.tsx:

      • In canResolveSibling (line 327), add an early return of false if siblingTransaction?.reportID === CONST.REPORT.SPLIT_REPORT_ID. This check must sit right at the start of the function, before checking descriptors or siblingParentReportAction?.childReportID, ensuring a split container never resolves as an openable sibling.
      • In resolveSiblingReportID (line 265), add an early return of undefined if siblingTransaction?.reportID === CONST.REPORT.SPLIT_REPORT_ID.
    3. Add unit test coverage in tests/unit/hooks/useCarouselTransactionIDsTest.ts verifying that useCarouselTransactionIDs excludes transactions assigned to SPLIT_REPORT_ID. In tests/unit/components/MoneyRequestReportTransactionsNavigationTest.tsx, verify that canResolveSibling and resolveSiblingReportID reject siblings with reportID === SPLIT_REPORT_ID even when a descriptor or report action exists.

    What alternative solutions did you explore? (Optional)

    Earlier proposals by @MelvinBot and @camesenin only proposed adding !isSplitContainerTransaction(transaction) to useCarouselTransactionIDs.ts and placing a guard at the end of canResolveSibling.

    Their fatal flaw is that adding the check only at line 343 in canResolveSibling misses the earlier returns for descriptors and child report actions on lines 330-333. If an action or descriptor exists for the sibling, canResolveSibling returns true before line 343, keeping the arrow clickable. Placing the guard at the top of both canResolveSibling and resolveSiblingReportID guarantees that report -2 is rejected before any descriptor or action resolution runs.

    Contributor details
    Your Expensify account email: taieddie8@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~01e51b3f9ff738cf94

  12. melvin-bot commented on Oct 18, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  13. 55 remaining items

  14. expensify-chore-bot commented on Nov 17, 2026

    @expensify-chore-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  15. expensify-chore-bot commented on Nov 17, 2026

    @expensify-chore-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  16. mallenexpensify commented on Nov 19, 2026

    @mallenexpensify
    Contributor

    Claude posting on behalf of Matt:

    Waiting on C+ checklist from @Krishna2323.

    Job price: $175 (standard, no Help Wanted, assigned 2026-10-18). Krishna2323 (C+): 100% once the checklist is in, via NewDot.

    No deploy blockers or regressions on the issue or the PR.

    Evidence
    • Resolving PR 105671: by MelvinBot, merged 2026-11-09, production 2026-11-11, approved by Krishna2323, Beamanator and twisterdotcom.
    • Test videos: C+ 5/5.

    PAYPREP v1

  17. mallenexpensify commented on Nov 20, 2026

    @mallenexpensify
    Contributor

    @Krishna2323 plz complete the Contributor+ checklist and tag me in a post once you have. Thx

  18. Krishna2323 commented on Nov 23, 2026

    @Krishna2323
    Contributor

    Contributor+ Checklist:

    Regression Test Proposal

    Precondition:

    • Account has a workspace.

    Test:

    1. Go to the workspace chat and create two manual expenses.
    2. Open the report and open the last created expense.
    3. Click More > Split > Save.
    4. Select both split expenses and delete them.
    5. Verify the report with one expense left does not show the prev/next arrows or a "1 of 2" counter.

    Do we agree 👍 or 👎

  19. Krishna2323 commented on Nov 23, 2026

    @Krishna2323
    Contributor

    @mallenexpensify, checklist completed ^. There's no payment summary, so I reopened this one.

  20. mallenexpensify commented on Nov 24, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @Krishna2323 due $175 via NewDot

    Thx for reopening, I closed it by mistake.

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions