Open
Conversation
- replace AsyncStorage persister with sync MMKV persister for instant cache restoration - add refetchOnMount: false to recents queries to use cached data on startup
- delay StorageProvider queries until 2s after initial render - defer player queue restoration with InteractionManager - add enabled option to download query hooks
- create HomeSectionSkeleton component with animated shimmer - show skeletons while home data is loading
- add @tanstack/query-sync-storage-persister - update bundler to 4.0.5
Keep the query client persister using AsyncStorage to maintain the existing memory optimization. The sync storage change can be evaluated separately.
* add letter filter parameters to API fetch functions Add NameStartsWithOrGreater and NameLessThan parameters to: - fetchArtists - fetchAlbums - fetchTracks These parameters enable direct letter-based filtering without fetching all preceding items. * add flattenWithLetterHeaders utility function Export helper function for merging bidirectional query data with letter section headers. * add letter-anchored hooks for bidirectional navigation Implement useLetterAnchoredArtists, useLetterAnchoredAlbums, and useLetterAnchoredTracks hooks that use dual infinite queries: - Forward query with NameStartsWithOrGreater for items from anchor - Backward query with NameLessThan for items before anchor This enables instant letter jumping without paginating through all preceding items. * add library cache validation hook Implement useLibraryCacheValidation hook that validates cached data on app focus using lightweight Limit=0 count requests. Invalidates relevant queries when library counts change. * add letter-anchored list components Create LetterAnchoredArtists, LetterAnchoredAlbums, and LetterAnchoredTracks components that use the new bidirectional hooks and support instant A-Z navigation with smooth scrolling in both directions. * update library tabs to use letter-anchored components Switch ArtistsTab, AlbumsTab, and TracksTab to use the new letter-anchored components for instant A-Z navigation. * remove unnecessary memoization React Compiler handles memoization automatically, so useMemo and useCallback are not needed in the letter-anchored hooks. * improve AZ scroller letter distribution across screen sizes * consolidate LetterFilter type, remove unused import, fix cache validation sharing - Move duplicated LetterFilter interface to shared src/api/types/letter-filter.ts - Remove unused flattenWithLetterHeaders import from artist/index.ts - Use module-level state in useLibraryCacheValidation so multiple component instances share the same throttle/mutex
- Replace duplicated year-range building logic in shuffle.ts with the existing buildYearsParam utility - Remove stable function import (triggerHaptic) from useCallback dependency arrays in GenreSelection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the change
What does this address
Cold start times on servers with large or slow libraries. Cached data now loads synchronously, non-critical queries are deferred, and users see loading skeletons instead of blank screens.
Issue number / link
N/A
Tag reviewers
@anultravioletaurora