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 Owner
Current Issue Owner: @mallenexpensify
Problem
The Search page decides whether to show its loading skeleton from the shape of snapshot data (
data === undefined) and a storedsearch.isLoadingflag. Both can lie: a successful response that writes no snapshot data leavesdataundefined forever, and a reload or dropped response can strandisLoading, so the skeleton hangs indefinitely.Solution
Move Search loading gates onto the snapshot's explicit terminal lifecycle state (
loading | loaded | error). UpdateisSearchDataLoaded,useSearchLoadingState,useSearchPageSetup, and the narrow-layout loading bar to read fromstateinstead of stored flags. Stamphashon terminal writes so anti-stale matching works on dataless responses. AddisSearchPending()helper and unit tests for the read side.PR
#96388
Issue Owner
Current Issue Owner: @mallenexpensify