Skip to content

[Due for payment 2026-06-02] [No QA] fix: stop empty LHN collection subs and scope provider logging #91272

Description

@mountiny

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 OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2Task

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions