You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250 Reports - New expense is not briefly highlighted in the list after expense is submitted #59449
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2Not a priorityReviewingHas a PR in review
Version Number: 9.1.21-3 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/5857413 Email or phone of affected tester (no customers):sdjmsjoisdjods@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to Reports
Open FAB > Create expense > Manual
Enter amount > Next
Select a user and submit the expense to them
Expected Result:
The new expense will be briefly highlighted in Expenses list after the expense is submitted
Actual Result:
The new expense is not briefly highlighted in Expenses list after the expense is submitted
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6788950_1743518559747.20250401_224005.mp4
Ignore the linked E/E GH above ^ that was on accident 😂
But this appears to be working as expected, if i'm missing something @lanitochka17 please reopen and provide context.
**Please note i'm OoO until next Tuesday so if it requires immediate attention, please re-apply the bug label (and re-assign me so I can take back over on Tuesday 😃 )
Please re-state the problem that we are trying to solve in this issue.
Reports - New expense is not briefly highlighted in the list after expense is submitted
What is the root cause of that problem?
There are two problems
The highlighting not working
We use hasNewItemsRef to identify a new item is added but it is being set to false here when the effect runs for reportAction list change.
When it is called for transactionsIDs change because isChat is false the hasNewItemsRef will be set to true but unfortunately the effect is called again for change of report action list change but we compare transactionID list which doesnt change so it will be reset to false.
The scrolling not working
we are calling handleSelectionListScroll onLayout but it is never called as the layout doesn't change on addition of an item
changed the title [-][$250] Reports - New expense is not briefly highlighted in the list after expense is submitted[/-][+][$125] Reports - New expense is not briefly highlighted in the list after expense is submitted[/+]on Dec 22, 2025
changed the title [-][$125] Reports - New expense is not briefly highlighted in the list after expense is submitted[/-][+][$250 Reports - New expense is not briefly highlighted in the list after expense is submitted[/+]on Dec 22, 2025
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2Not a priorityReviewingHas a PR in review
Activity
melvin-bot commentedon Apr 1, 2025
Triggered auto assignment to @OfstadC (
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.OfstadC commentedon Apr 1, 2025
@lanitochka17 I'm not sure I understand what you mean by "briefly highlighted" - from the video everything looks as it should - I believe
OfstadC commentedon Apr 2, 2025
Ignore the linked E/E GH above ^ that was on accident 😂
But this appears to be working as expected, if i'm missing something @lanitochka17 please reopen and provide context.
**Please note i'm OoO until next Tuesday so if it requires immediate attention, please re-apply the bug label (and re-assign me so I can take back over on Tuesday 😃 )
hoangzinh commentedon Apr 2, 2025
I guess what @lanitochka17 means is briefly highlighted like we invite members to a workspace
Screen.Recording.2025-04-02.at.21.39.28.mov
But let @lanitochka17 confirm
lanitochka17 commentedon Apr 2, 2025
@hoangzinh briefly highlighted as indicated in the test case steps
hoangzinh commentedon Apr 2, 2025
Then I think my recording above demonstrates correct behavior. Do you agree @lanitochka17?
lanitochka17 commentedon Apr 3, 2025
@hoangzinh yes,
lanitochka17 commentedon Apr 3, 2025
@hoangzinh The announced PR #58495 says that it is necessary to highlight recently added expenses. Please review the Pr
hoangzinh commentedon Apr 3, 2025
Interesting. Thank you @lanitochka17
FitseTLT commentedon Apr 4, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports - New expense is not briefly highlighted in the list after expense is submitted
What is the root cause of that problem?
There are two problems
We use
hasNewItemsRefto identify a new item is added but it is being set to false here when the effect runs for reportAction list change.App/src/hooks/useSearchHighlightAndScroll.ts
Line 85 in 9045827
App/src/hooks/useSearchHighlightAndScroll.ts
Line 109 in 9045827
When it is called for transactionsIDs change because
isChatis false the hasNewItemsRef will be set to true but unfortunately the effect is called again for change of report action list change but we compare transactionID list which doesnt change so it will be reset to false.we are calling
handleSelectionListScrollonLayout but it is never called as the layout doesn't change on addition of an itemApp/src/components/Search/index.tsx
Line 758 in 9045827
What changes do you think we should make in order to solve the problem?
hasNewItemsRefonly if hasTransactionsIDsChange like:App/src/hooks/useSearchHighlightAndScroll.ts
Lines 109 to 111 in b16dd53
newSearchResultKeychange via an effectApp/src/components/Search/index.tsx
Lines 739 to 745 in b16dd53
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N / A
What alternative solutions did you explore? (Optional)
81 remaining items
QichenZhu commentedon Dec 12, 2025
@OfstadC are we eligible to be paid since @FitseTLT created the PR and I reviewed it? cc @JS00001
JS00001 commentedon Dec 15, 2025
Yes, I agree, they should be paid for their work
OfstadC commentedon Dec 22, 2025
👀
OfstadC commentedon Dec 22, 2025
It does appear this is eligible for payment so working on this now
[-][$250] Reports - New expense is not briefly highlighted in the list after expense is submitted[/-][+][$125] Reports - New expense is not briefly highlighted in the list after expense is submitted[/+]melvin-bot commentedon Dec 22, 2025
Upwork job price has been updated to $125
OfstadC commentedon Dec 22, 2025
Payment Summary
Contributor: @FitseTLT
offer sent herepaid $250 via UpworkContributor+: @QichenZhu due $250 via manual NewDot request
FitseTLT commentedon Dec 22, 2025
@OfstadC This issue had a PR raised and fully reviewed here. I think it is eligible for full payment. cc @JS00001
OfstadC commentedon Dec 22, 2025
I re-reviewed the SO and it does seem full payment is applicable. Redoing the offer now
[-][$125] Reports - New expense is not briefly highlighted in the list after expense is submitted[/-][+][$250 Reports - New expense is not briefly highlighted in the list after expense is submitted[/+]FitseTLT commentedon Dec 22, 2025
@OfstadC Accepted
OfstadC commentedon Dec 22, 2025
Payment Summary Updated
twisterdotcom commentedon Dec 22, 2025
@QichenZhu has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-d7ea-ac21-f23c-64c2faa35ba4