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
[Due for payment 2025-09-02] [Due for payment 2025-08-26] [$250] Prevent redundant Sidebar sorting #67894
AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
When a report is opened via search, it triggers a navigation state change. This causes useCurrentReportID to update the currentReportID, which flows into useSidebarOrderedReports and leads to a recalculation of reportsToDisplayInLHN.
Problem:
When the sidebar recalculates due to navigation or data updates, even when the current report hasn't changed or the report data is the same, it causes redundant sortReportsToDisplayInLHN calls, which degrades performance in larger accounts.
Solution:
Implement a series of improvements to reduce unnecessary sortReportsToDisplayInLHN calls and improve performance:
Add change detection to updateCurrentReportID to exit early when the report ID hasn't changed.
Add useDeepCompareRef to avoid triggering re-sorting unless report data meaningfully changes.
Replace inefficient forEach loops with for...of in performance-sensitive iteration.
Break down complex update logic into smaller, purpose-specific functions for clarity and efficiency.
The above changes improve the performance of sortReportsToDisplayInLHN by 40–55%:
Before: 12–15 ms (small accounts), ~60 ms (large accounts), function appears 9–12 times in the trace
After: 6 ms (small accounts), 30–40 ms (large accounts), function appears 4–6 times in the trace
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.98-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh / @ikevin127@adelekennedy 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]
AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Aug 5, 2025
Triggered auto assignment to @JS00001 (
AutoAssignerNewDotQuality)melvin-bot commentedon Aug 5, 2025
Triggered auto assignment to @adelekennedy (
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.[-]Prevent redundant Sidebar sorting[/-][+][$250] Prevent redundant Sidebar sorting[/+]melvin-bot commentedon Aug 5, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021952688466440387545
melvin-bot commentedon Aug 5, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)27 remaining items
melvin-bot commentedon Aug 26, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.98-12 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 2025-09-02. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 26, 2025
@hoangzinh / @ikevin127 @adelekennedy 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]
ikevin127 commentedon Aug 26, 2025
Feel free to unassign me from this issue since @hoangzinh took over as C+ reviewer and only they will be getting payments.
melvin-bot commentedon Sep 2, 2025
Payment Summary
Upwork Job
BugZero Checklist (@adelekennedy)
adelekennedy commentedon Sep 2, 2025
Payment Summary (Improvement)
Contributor+: @hoangzinh owed $750 via NewDot
hoangzinh commentedon Sep 3, 2025
@adelekennedy it should be $750, according to the thread here
mallenexpensify commentedon Sep 15, 2025
@hoangzinh updated to $750 for ya.
Closing, reopen if test cases are needed.
hoangzinh commentedon Sep 16, 2025
Thanks @mallenexpensify. I requested ND
garrettmknight commentedon Sep 16, 2025
$750 approved for @hoangzinh