mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
refactor(lib,playback): relocate albumDetailNavigation + mixRatingFilter decouple-knots
Two lower-layer→feature inversions removed: - Detail-route predicates (isAlbumDetailPath/isArtistDetailPath/isComposerDetailPath) were defined in features/album's browse store but are pure URL checks. Extracted to lib/navigation/detailRoutePaths; the browse store re-exports them so the @/features/album barrel surface is unchanged. This frees albumDetailNavigation of its only @/features import, so it moves utils/navigation → lib/navigation (drains utils/navigation). Also fixes the M5 isArtistDetailPath misplacement. - mixRatingFilter's sole feature dep is playback's userRatingOverrides and its only binding consumer is playback's buildInfiniteQueueCandidates, so it belongs in the playback feature: utils/mix → features/playback/utils (drains utils/mix). The earlier handoff note that lib/api/subsonicStarRating consumes it was stale — that is only a code comment, verified no runtime import. Pure moves; tests pass unmodified. The share cluster + switchActiveServer stay in utils/ — they are imported by the a11y-HELD PasteClipboardHandler, so relocating them would rewrite a do-not-touch file.
This commit is contained in:
@@ -13,7 +13,7 @@ import { NavLink, useNavigate } from 'react-router-dom';
|
||||
import { ChevronRight } from 'lucide-react';
|
||||
import { useHomeStore } from '@/features/home/store/homeStore';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { filterAlbumsByMixRatings, getMixMinRatingsConfigFromAuth } from '@/utils/mix/mixRatingFilter';
|
||||
import { filterAlbumsByMixRatings, getMixMinRatingsConfigFromAuth } from '@/features/playback/utils/mixRatingFilter';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { bumpPerfCounter } from '@/lib/perf/perfTelemetry';
|
||||
import { dedupeById } from '@/lib/util/dedupeById';
|
||||
|
||||
Reference in New Issue
Block a user