mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
6cc227d761
* fix(artist-info): id-gate fetcher tuples, reuse ArtistCard on ArtistDetail The cache-mismatch bug PR #732 fixed in `NowPlayingInfo.tsx` had the same shape inside `ArtistCard` on the NowPlaying page: `useNowPlayingFetchers` returned `artistInfo` for the previously-current artist for one render after `artistId` changed, and `CachedImage` persisted that mismatched blob under the new `artistInfo:<new-id>:hero` key in IndexedDB — sticky "previous artist" image on every subsequent track. Apply the same `{ id, value }` tuple pattern from PR #732 inside the hooks themselves so every consumer is safe by construction: - `useNowPlayingFetchers`: gate `artistInfo`, `songMeta`, `albumData`, `discography` on id-match at the return. Late-arriving resolves for a stale id can no longer overwrite the displayed value. - `useArtistDetailData`: same for `info`. Required because the `ArtistDetail` bio card now uses `CachedImage` via the shared `ArtistCard` (previously raw `<img>`, no persistence hazard). Unify `ArtistDetail`'s inline "About the Artist" block onto the same shared `ArtistCard` so there is one source of truth for hero / bio / similar rendering. New optional props: `onNavigate?` (omitted on `/artist/:id` since the user is already there), `coverFallback` (coverArt fallback when artistInfo has no hero image), `hideArtistName` (avoid duplicating the hero name), `hideSimilar` (ArtistDetail has its own similar-artists section). Tests cover the gating contract for both hooks (incl. stale-resolve race) and the `ArtistCard` prop matrix. * fix(artist-image): square queue info hero, drop artist-avatar glow - Queue Info bar's artist hero was rendered in a 16:10 wrap with `object-fit: cover`, so portrait photos lost top/bottom equally while landscape ones lost the sides — perceived as cropped even on roughly square sources. Set the wrap to 1:1 so the crop is symmetric and matches the typical square framing of artist photography. - `ArtistDetail` extracted the cover's accent colour on every image load and rendered a 36px / 8px-spread `boxShadow` ring around the avatar. Drop the glow, the state, the one-shot reset effect, the prop-passing through `ArtistDetailHero`, and the now-orphaned `extractCoverColors` import on this page. `extractCoverColors` itself stays in place (still used by `useFsDynamicAccent`). * docs(changelog): artist-info image fix extension + UI tweaks (PR #739)