refactor(lib): relocate the local-library subsystem utils/library -> lib/library

utils/library is the local-index query/browse/sync engine -- feature-free shared
infra consumed by the album, search, genre, artist and offline features. With
its last feature edges removed (queue resolver, shuffleArray, albumBrowseCatalogChunk,
genreBrowsePlayback all relocated earlier this branch), the whole directory is
pure infra and belongs under lib/.

Whole-directory move (58 files, 76 consumers rewritten) via resolver-based
rewrite: cross-cluster relatives absolutized to @/, intra-cluster siblings kept
relative. utils/library is gone; lib/library imports zero @/features. Three
stale doc comments in the album/search/artist barrels repointed.

tsc 0, lint 0, full suite 2353/2353, production build OK.
This commit is contained in:
Psychotoxical
2026-06-30 17:06:03 +02:00
parent e5705f853e
commit 2756cb7698
129 changed files with 139 additions and 139 deletions
@@ -9,17 +9,17 @@ import {
mergeLiveSearchResults,
runLocalLiveSearch,
runNetworkLiveSearch,
} from '@/utils/library/liveSearchLocal';
import { raceLiveSearch } from '@/utils/library/searchRace';
import { libraryIsReady } from '@/utils/library/libraryReady';
} from '@/lib/library/liveSearchLocal';
import { raceLiveSearch } from '@/lib/library/searchRace';
import { libraryIsReady } from '@/lib/library/libraryReady';
import {
emitLiveSearchDebug,
searchHitCounts,
searchResultSamples,
} from '@/utils/library/liveSearchDebug';
} from '@/lib/library/liveSearchDebug';
import {
logLibrarySearch,
} from '@/utils/library/libraryDevLog';
} from '@/lib/library/libraryDevLog';
import React, { useState, useEffect, useRef, useCallback } from 'react';
import { useNavigate, useLocation } from 'react-router-dom';
import { useNavigateToAlbum } from '@/features/album';
+1 -1
View File
@@ -3,7 +3,7 @@
* search/browse page (lazy via the deep path `pages/SearchBrowsePage`), live
* search scope UI/state, and the share-link search/queue-preview surfaces.
*
* The local-index query engine (`utils/library/*search*`), the shared Subsonic
* The local-index query engine (`lib/library/*search*`), the shared Subsonic
* search API, the cross-cutting `liveSearchScopeStore`, and the
* `advancedSearch*` session/scroll state live outside this feature
* (library-core / cross-cutting) — this feature consumes them.
@@ -42,19 +42,19 @@ import {
runNetworkAdvancedTextSearch,
runNetworkAdvancedYearAlbums,
tryRunLocalAdvancedSearch,
} from '@/utils/library/advancedSearchLocal';
import { isLosslessSuffix } from '@/utils/library/losslessFormats';
import { LOSSLESS_MODE_QUERY } from '@/utils/library/losslessMode';
import { OXIMEDIA_MOOD_SEARCH_ENABLED } from '@/utils/library/trackEnrichment';
import { raceSearchSources } from '@/utils/library/searchRace';
import { logLibrarySearch } from '@/utils/library/libraryDevLog';
} from '@/lib/library/advancedSearchLocal';
import { isLosslessSuffix } from '@/lib/library/losslessFormats';
import { LOSSLESS_MODE_QUERY } from '@/lib/library/losslessMode';
import { OXIMEDIA_MOOD_SEARCH_ENABLED } from '@/lib/library/trackEnrichment';
import { raceSearchSources } from '@/lib/library/searchRace';
import { logLibrarySearch } from '@/lib/library/libraryDevLog';
import {
browseRaceCountsFullSearch,
loadMoreLocalBrowseSongs,
raceBrowseWithLocalFallback,
runLocalBrowseFullSearch,
runNetworkBrowseFullSearch,
} from '@/utils/library/browseTextSearch';
} from '@/lib/library/browseTextSearch';
import { useLibraryIndexStore } from '@/store/libraryIndexStore';
import { MOOD_GROUP_IDS } from '@/config/moodGroups';
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';