Problem
LHNEmptyState subscribed to the full report, policy, and personal details Onyx collections only to log counts while the empty inbox was visible. Those subscriptions re-fired as collections streamed in during cold start, causing unnecessary re-renders on the empty LHN path before the inbox was populated.
The useSidebarOrderedReports provider also ran a logging effect after every render that compared and serialized a large dependency object, adding work even when the ordered report list did not change in ways that matter for the LHN.
Solution
Removed the collection subscriptions from LHNEmptyState and moved the "all caught up" log into a renderless LHNCaughtUpLogger that runs once on mount. Removed the per-render provider logging effect and its dependency-diff helpers from useSidebarOrderedReports, and added a scoped SidebarOrderedReportsTransitionLogger on the inbox sidebar that logs only when ordered reports transition between empty and non-empty (or initialize empty). This is Plan A toward inbox performance: less wasted render work on the empty LHN path without changing populated-list behavior.
PR
#91066
Issue Owner
Current Issue Owner: @mallenexpensify
Problem
LHNEmptyStatesubscribed to the full report, policy, and personal details Onyx collections only to log counts while the empty inbox was visible. Those subscriptions re-fired as collections streamed in during cold start, causing unnecessary re-renders on the empty LHN path before the inbox was populated.The
useSidebarOrderedReportsprovider also ran a logging effect after every render that compared and serialized a large dependency object, adding work even when the ordered report list did not change in ways that matter for the LHN.Solution
Removed the collection subscriptions from
LHNEmptyStateand moved the "all caught up" log into a renderlessLHNCaughtUpLoggerthat runs once on mount. Removed the per-render provider logging effect and its dependency-diff helpers fromuseSidebarOrderedReports, and added a scopedSidebarOrderedReportsTransitionLoggeron the inbox sidebar that logs only when ordered reports transition between empty and non-empty (or initialize empty). This is Plan A toward inbox performance: less wasted render work on the empty LHN path without changing populated-list behavior.PR
#91066
Issue Owner
Current Issue Owner: @mallenexpensify