feat(web): surface "Start radio" in the track kebab menu
test-web / test (push) Failing after 31s

Radio was fully wired (playRadio → /api/radio + 80% auto-refresh) but its
only entry point was TrackRow's inline 📻 button, so it was unreachable from
the kebab — i.e. missing on the Most Played compact cards and the mini-player.
Add a "Start radio" item to TrackMenu, shown even under hideQueueActions since
reseeding a station from the current track is meaningful there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 21:40:16 -04:00
parent 066616e196
commit 773275e916
+15 -1
View File
@@ -3,6 +3,7 @@
MoreVertical, MoreVertical,
ListPlus, ListPlus,
Plus, Plus,
Radio,
Heart, Heart,
HeartOff, HeartOff,
ListMusic, ListMusic,
@@ -24,7 +25,7 @@
import { createLikedIdsQuery, likeEntity, unlikeEntity } from '$lib/api/likes'; import { createLikedIdsQuery, likeEntity, unlikeEntity } from '$lib/api/likes';
import { createMyQuarantineQuery, unflagTrack } from '$lib/api/quarantine'; import { createMyQuarantineQuery, unflagTrack } from '$lib/api/quarantine';
import { qk } from '$lib/api/queries'; import { qk } from '$lib/api/queries';
import { playNext, enqueueTrack } from '$lib/player/store.svelte'; import { playNext, enqueueTrack, playRadio } from '$lib/player/store.svelte';
import type { TrackRef } from '$lib/api/types'; import type { TrackRef } from '$lib/api/types';
let { let {
@@ -87,6 +88,11 @@
closeAll(); closeAll();
} }
function onStartRadio() {
playRadio(track.id);
closeAll();
}
async function onToggleLike() { async function onToggleLike() {
closeAll(); closeAll();
if (liked) { if (liked) {
@@ -168,6 +174,14 @@
<TrackMenuDivider /> <TrackMenuDivider />
{/if} {/if}
<!-- Start radio is always offered, even on the now-playing surfaces
(hideQueueActions) — reseeding the queue as a radio station from
the current track is meaningful where "play next" / "add to queue"
are not. Mirrors TrackRow's inline 📻 button via playRadio(). -->
<TrackMenuItem icon={Radio} label="Start radio" onclick={onStartRadio} />
<TrackMenuDivider />
<TrackMenuItem <TrackMenuItem
icon={liked ? HeartOff : Heart} icon={liked ? HeartOff : Heart}
label={liked ? 'Unlike' : 'Like'} label={liked ? 'Unlike' : 'Like'}