feat: M3 weighted shuffle v1 — real /api/radio with scoring #21

Merged
bvandeusen merged 262 commits from dev into main 2026-04-27 11:00:29 -04:00
2 changed files with 17 additions and 13 deletions
Showing only changes of commit 70ef15336e - Show all commits
@@ -58,7 +58,9 @@ import com.fabledsword.minstrel.models.SearchResponseRef
import com.fabledsword.minstrel.models.TrackRef
import com.fabledsword.minstrel.nav.AlbumDetail
import com.fabledsword.minstrel.nav.ArtistDetail
import com.fabledsword.minstrel.nav.Search as SearchRoute
import com.fabledsword.minstrel.shared.widgets.LoadingCentered
import com.fabledsword.minstrel.shared.widgets.MainAppBarActions
import com.fabledsword.minstrel.shared.widgets.TrackCoverThumb
import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsButton
import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsViewModel
@@ -105,6 +107,10 @@ fun SearchScreen(
Icon(Lucide.X, contentDescription = "Clear")
}
}
MainAppBarActions(
navController = navController,
currentRouteName = SearchRoute::class.qualifiedName,
)
},
)
},
@@ -56,24 +56,22 @@ fun StorageCard(viewModel: StorageViewModel = hiltViewModel()) {
color = MaterialTheme.colorScheme.onSurface,
)
UsageRow(usedBytes = state.usedBytes)
// Per-bucket caps + prefetch toggle + cache-liked toggle
// intentionally omitted in v1. The underlying systems
// (per-bucket SimpleCache eviction, MetadataPrefetcher,
// pin-on-like flow) don't exist on Android yet — surfacing
// controls that silently do nothing is worse than hiding
// them. Only the rolling cap is wired
// (PlayerFactory.kt:43-47 uses rollingCapBytes only); the
// Liked cap was a no-op. CacheSettings fields stay
// persisted so the controls return when the systems land.
CapDropdown(
label = "Liked cache limit",
value = state.settings.likedCapBytes,
onSet = viewModel::setLikedCapBytes,
)
CapDropdown(
label = "Recently-played cache limit",
label = "Cache limit",
value = state.settings.rollingCapBytes,
onSet = viewModel::setRollingCapBytes,
)
// Pre-fetch ahead + Cache-liked-tracks toggles intentionally
// omitted in v1. The underlying systems (MetadataPrefetcher,
// pin-on-like flow) don't exist on Android yet — surfacing
// controls that silently do nothing is worse than hiding
// them. The CacheSettings fields are still persisted so
// the toggles return when the systems land.
Text(
text = "Cache limits take effect on the next app launch.",
text = "Takes effect on the next app launch.",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)