feat(radio): wire radio + similarity into the queue (A11/B6, §6.5)

"Start radio" in the track menu seeds the queue from a track; RadioController
(headless, in AppShell) tops it up via /radio/next as it drains. QueuePanel's
radio scaffolding is now live: the exploration slider drives familiar<->new and
each entry shows its reason ("why this is playing"). Adds the radio endpoints
(start/next/similar), radio context + actions on the queue slice, and the pick->
entry mapper. Degrades to metadata picks while ML is offline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Цвылев Александр Вадимович
2026-07-28 22:15:47 +03:00
parent e45ef785cf
commit ac6b76bf98
12 changed files with 254 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { RadioPick } from '../api/types';
import type { QueueEntry } from '../store/slices/queue';
/** A radio/similar pick → a play-queue entry (carrying its reason code). */
export function pickToEntry(pick: RadioPick): QueueEntry {
return {
trackId: pick.track.id,
title: pick.track.title,
artistName: pick.track.artistName,
albumTitle: pick.track.albumTitle,
durationMs: pick.track.durationMs,
albumArtUrl: pick.track.albumArtUrl,
reason: pick.reason,
};
}