Skip to content

[Due for payment 2026-03-02] [Due for payment 2026-02-27] [$250] Reports - Only the first of several expenses created in a row is highlighted in Reports #83004

Closed

Description

@vincdargento

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.23-2
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #82538
Email or phone of affected tester (no customers): fischer9966+021926+82538c@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: iPhone 16 Pro / 26.3
App Component: Money Requests

Action Performed:

  1. Login to Expensify App with new gmail account
  2. Create new workspace
  3. Navigate to "Reports" and select "Expenses" in filters
  4. Create a manual expense.
  5. Once expense preview is not highlighted anymore, open it.
  6. Close expense
  7. Verify that the expense is not highlighted again
  8. Create a second manual expense
  9. Verify that only the newly created expense is highlighted

Expected Result:

Only the newly created expense is highlighted

Actual Result:

Only the first of several expenses created in a row is highlighted. The second and subsequent expenses are not highlighted. If user leave Reports and return, everything is repeated - only the first expense will be highlighted.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.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/~022024605094576088690
  • Upwork Job ID: 2024605094576088690
  • Last Price Increase: 2026-02-19

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Feb 19, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 19, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. github-actions commented on Feb 19, 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. OSBotify commented on Feb 19, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #82538 - "fix: Expense created while on "Reports", gets highlighted again when opened." by @etCoderDysto (High confidence)
    Related Issues: #81474 (the issue PR #82538 was trying to fix)

    Recommendation: REVERT

    PR #82538 introduced a regression while attempting to fix the highlighting behavior. The PR should be reverted to restore proper highlighting for multiple consecutive expense creations.

    Labels: Keeping DeployBlockerCash (App deploy is blocked). This is a frontend bug requiring an App PR fix.

    Detailed Analysis

    Evidence

    Verification

    PR #82538 modified src/hooks/useSearchHighlightAndScroll.ts, which controls expense highlighting behavior in the Reports view. The diff shows that the PR moved requestAnimationFrame logic from one effect to another:

    Key changes:

    1. Lines 235-253: Effect that resets transactionIDsToHighlight - changed from using requestAnimationFrame + setTimeout to just setTimeout
    2. Lines 264-286: Effect that clears newSearchResultKeys - changed from just setTimeout to requestAnimationFrame + setTimeout

    Root Cause

    The PR swapped the timing logic between two effects. By adding requestAnimationFrame to the effect that clears newSearchResultKeys (lines 264-286), the clearing of the highlight state is now delayed by an additional animation frame.

    When multiple expenses are created in quick succession:

    1. First expense is created → newSearchResultKeys is set with the first expense ID
    2. Highlight appears for the first expense
    3. Second expense is created → The effect tries to set newSearchResultKeys with the second expense ID
    4. Problem: Because newSearchResultKeys is cleared with requestAnimationFrame + setTimeout (added in PR fix: Expense created while on "Reports", gets highlighted again when opened.  #82538), it takes longer to clear. This timing change causes the second setNewSearchResultKeys call to either be lost or batched incorrectly by React
    5. Result: Only the first expense stays highlighted

    The original issue (#81474) that PR #82538 was trying to fix was: "Expense created while on Reports, gets highlighted again when opened." PR #82538 attempted to fix this by ensuring the highlight delay starts after rendering completes. However, this introduced the current regression where subsequent expenses are not highlighted.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 19, 2026
  8. 16 remaining items

  9. removed
    DeployBlockerCashThis issue or pull request should block deployment
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 20, 2026
  10. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 20, 2026
  11. changed the title [-][$250] Reports - Only the first of several expenses created in a row is highlighted in Reports[/-] [+][Due for payment 2026-02-27] [$250] Reports - Only the first of several expenses created in a row is highlighted in Reports[/+] on Feb 20, 2026
  12. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Feb 20, 2026

    @melvin-bot

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

    For reference, here are some details about the assignees on this issue:

    • @situchan requires payment (Needs manual offer from BZ)
  14. melvin-bot commented on Feb 20, 2026

    @melvin-bot

    @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]

  15. changed the title [-][Due for payment 2026-02-27] [$250] Reports - Only the first of several expenses created in a row is highlighted in Reports[/-] [+][Due for payment 2026-03-02] [Due for payment 2026-02-27] [$250] Reports - Only the first of several expenses created in a row is highlighted in Reports[/+] on Feb 23, 2026
  16. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.24-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-03-02. 🎊

    For reference, here are some details about the assignees on this issue:

    • @situchan requires payment (Needs manual offer from BZ)
  17. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    @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]

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions