Skip to content

Spend tab: re-fire search on focus after cache clear (PR #88994) #89095

Closed

Description

@luacmartins

Summary

Implementation for Spend tab infinite loading after Clear cache and restart when returning to the Spend tab quickly.

Pull request

Related

Problem (from PR)

After PR #85234 introduced a bottom TabNavigator with freezeOnBlur: true, the Search/Spend screen stays mounted across tab switches. When the user runs Clear cache and restart, Onyx.clear() wipes snapshot data, but the useEffect in useSearchPageSetup that calls search() does not re-run because its dependencies are unchanged. The skeleton loading state can persist until search() runs again.

Approach (from PR)

Extract the search-firing logic into a useCallback and add useFocusEffect so that when the Spend tab regains focus after a cache clear, search() is re-fired if snapshot data is missing.

QA

Same as PR Tests / QA Steps: Spend > All expenses → Troubleshoot > Clear cache and restart → quickly return to Spend tab; expenses should load instead of staying on skeleton indefinitely.

Activity

  1. self-assigned this
    on Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions