Skip to content

[Due for payment 2026-08-17] Expense - Splits are highlighted after splitting on Spend and opening report on Inbox #93967

Closed

Description

@applause-bot

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.4.15-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: #92506
Email or phone of affected tester (no customers): sjdoisnjdodsnjoi@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses.
  4. Go to Spend > Expenses.
  5. Select one of the expenses via checkbox.
  6. Click dropdown button > Split > Save.
  7. Go back to Inbox.
  8. Open the expense report.

Expected Result:

Splits should only be highlighted on where the expense was split, which is Spend > Expenses.

Actual Result:

Splits are highlighted after splitting on Spend and opening report on Inbox.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7184848_1781804629525.2.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7184848

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. applause-bot commented on Jun 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/d602575b2ad89357ff3c44d0e7ae892c1bd9773682525a7506b3c5d1fb924f25

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 18, 2026
  3. melvin-bot commented on Jun 18, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 18, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 18, 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.
  6. MelvinBot commented on Jun 18, 2026

    @MelvinBot
    Contributor

    Proposal

    Regression from #92506 (this issue's linked PR). The PR registered split transactions for highlighting before the navigation branch, so the registration also runs on the Spend/Search path — where the report is never opened, leaving the highlight flags stranded until the report is opened later from Inbox.

    What is the root cause of that problem?

    In updateSplitTransactionsFromSplitExpensesFlow, PR #92506 added a loop that calls addPendingNewTransactionIDs(targetReportID, …) for each new split. This loop runs before the navigation branch at SplitTransactionUpdate.ts:1911.

    addPendingNewTransactionIDs persists {pendingNewTransactionIDs: {[id]: true}} into the report's REPORT_METADATA (PendingNewTransactions.ts:18). These flags are only consumed — and only cleared — when the expense report's MoneyRequestReportActionsList mounts and useNewTransactions runs (MoneyRequestReportActionsList.tsx:126-129, useNewTransactions.ts:39-41).

    When the user splits from Spend > Expenses (isSearchPageTopmostFullScreenRoute), the flow navigates back via navigateBackToLastSuperWideRHPScreen and returns — the expense report is never opened. So the flags are written but never read/cleared. They sit in REPORT_METADATA until the user later opens that report from Inbox, at which point the list mounts and incorrectly highlights the (no longer new) split rows.

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

    Only register the pending-new transaction IDs on the path that actually opens the expense report. The Spend/Search-page early-return branch (and the !params.transactionReport?.parentReportID case that shares it) should not pollute the report's metadata.

    Practically: guard the registration loop with !isSearchPageTopmostFullScreenRoute && !!params.transactionReport?.parentReportID, or move the loop below the if (isSearchPageTopmostFullScreenRoute || !params.transactionReport?.parentReportID) { … return; } branch so it runs only for the dismissModalWithReport path. Splitting from within the report keeps working because that path mounts the report and clears the flags as designed.

    Why the Spend page still highlights correctly + verification notes
    • The issue's Expected Result confirms the Spend > Expenses highlight is the desired behavior and is unaffected — that page does not rely on REPORT_METADATA.pendingNewTransactionIDs (the only reader is MoneyRequestReportActionsList for the routed report). So scoping the registration away from the Search path does not remove any wanted highlight there.
    • Reproducible in staging: Yes / production: No, consistent with a regression from PR Fix: Highlight split expenses after splitting an existing expense #92506 which is in this deploy.
    • The clear path (useNewTransactions.ts) only fires after the list mounts with matching transactions, confirming nothing clears the flags while the user stays on the Search page.
    • Confidence: High — code-traced end to end; matches all reported symptoms and the staging-only reproduction.

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

  7. mountiny commented on Jun 18, 2026

    @mountiny
    Contributor

    cc @aswin-s

    This sounds minor but the authors should follow up

  8. 36 remaining items

  9. melvin-bot commented on Aug 14, 2026

    @melvin-bot

    @gijoe0295 Eep! 4 days overdue now. Issues have feelings too...

  10. changed the title [-]Expense - Splits are highlighted after splitting on Spend and opening report on Inbox[/-] [+][Due for payment 2026-08-17] Expense - Splits are highlighted after splitting on Spend and opening report on Inbox[/+] on Aug 17, 2026
  11. melvin-bot commented on Aug 17, 2026

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.

  12. mallenexpensify commented on Aug 18, 2026

    @mallenexpensify
    Contributor

    Is this due payment? If so, how much to whom? Looks like it's a regression.

  13. gijoe0295 commented on Aug 19, 2026

    @gijoe0295
    Contributor

    Yes regression from #91679. Please handle payment there and close this one

  14. gijoe0295 commented on Aug 19, 2026

    @gijoe0295
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: Fix: Splits incorrectly highlighted in Inbox after splitting from Spend page #94139 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: No

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    Test:

    1. Sign in and open the Reports (Spend) page from the left-hand nav.
    2. Open a workspace expense report that already contains at least two expenses, so the report is multi-transaction.
    3. From the Spend page, select an expense and split it into two.
    4. Verify you are returned to the Spend page and the two new split rows are briefly highlighted in yellow there.
    5. Navigate to Inbox and open the expense report that received the splits.
    6. Verify no rows in that report are highlighted in yellow.
    7. Now open the same expense report directly from the Inbox and split an expense from within the report.
    8. Verify the newly created split rows are highlighted in yellow in the report, and that pre-existing rows are not.
    9. Verify that no errors appear in the JS console.

    Do we agree 👍 or 👎

  15. gijoe0295 commented on Aug 19, 2026

    @gijoe0295
    Contributor

    @mallenexpensify
    This is a follow-up to #92506 and #94139. Those PRs guarded the addPendingNewTransactionIDs loop in SplitTransactionUpdate.ts, but #94670 (merged mid-review) moved rail population down into buildOnyxDataForMoneyRequest, so the guarded loop was no longer the write site and the bug remained.

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions