Skip to content

[Due for payment 2026-04-14] Extract LHNEmptyState from LHNOptionsList #87080

@JS00001

Description

@JS00001

LHNOptionsList previously owned the entire empty-inbox UI inline: three hooks (useTheme, useMemoizedLazyExpensifyIcons, useEmptyLHNIllustration), one useMemo for subtitle JSX construction, and a conditional BlockingView render. These ran on every mount of LHNOptionsList, including the 99%+ of renders where data.length > 0 and the empty state is never shown.

This PR:

  1. Extracts the empty state UI into a new LHNEmptyState component that only mounts when the inbox is actually empty
  2. Moves the conditional to SidebarLinks (parent level), so LHNOptionsList never mounts with empty data
  3. Removes dead code from LHNOptionsList: 3 hook calls, emptyLHNSubtitle useMemo (12 deps), conditional BlockingView render, and 7 unused imports. Kept the "Woohoo! All caught up" logging useEffect for observability.
  4. Removes a duplicate useOnyx(REPORT_ACTIONS) subscription from OptionRowLHNData (was identical to the existing reportActions prop)
  5. Removes redundant useConfirmReadyToOpenApp from SidebarLinks (parent BaseSidebarScreen already calls it)
  6. Replaces deprecated absoluteFillObject with absoluteFill

ManualNavigateToInboxTab span benchmark (10 runs each, iOS Simulator, same session):

Metric main branch
Avg 675ms 622ms
Min 615ms 558ms
Max 761ms 724ms

Delta: -53ms (-7.8%). Perf-neutral to marginally better.

Validated against Onyx rules, React Compiler rules, React Native best practices, and Expensify coding standards. UI is identical between main and branch (verified via accessibility tree diff and visual screenshot comparison).

PR: #86964

Issue OwnerCurrent Issue Owner: @BartekObudzinski

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionWeeklyKSv2

Type

No type
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