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,
ListPlus,
Plus,
Radio,
Heart,
HeartOff,
ListMusic,
@@ -24,7 +25,7 @@
import { createLikedIdsQuery, likeEntity, unlikeEntity } from '$lib/api/likes';
import { createMyQuarantineQuery, unflagTrack } from '$lib/api/quarantine';
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';
let {
@@ -87,6 +88,11 @@
closeAll();
}
function onStartRadio() {
playRadio(track.id);
closeAll();
}
async function onToggleLike() {
closeAll();
if (liked) {
@@ -168,6 +174,14 @@
<TrackMenuDivider />
{/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
icon={liked ? HeartOff : Heart}
label={liked ? 'Unlike' : 'Like'}