Skip to content

[Due for payment 2026-08-05] feat: resolve Search loading gates from snapshot terminal state #96488

Description

@mountiny

Problem

The Search page decides whether to show its loading skeleton from the shape of snapshot data (data === undefined) and a stored search.isLoading flag. Both can lie: a successful response that writes no snapshot data leaves data undefined forever, and a reload or dropped response can strand isLoading, so the skeleton hangs indefinitely.

Solution

Move Search loading gates onto the snapshot's explicit terminal lifecycle state (loading | loaded | error). Update isSearchDataLoaded, useSearchLoadingState, useSearchPageSetup, and the narrow-layout loading bar to read from state instead of stored flags. Stamp hash on terminal writes so anti-stale matching works on dataless responses. Add isSearchPending() helper and unit tests for the read side.

PR

#96388

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2InternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions