From 70ef15336ea81f0ad21281e25ad9f36af80ef242 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 27 May 2026 20:58:54 -0400 Subject: [PATCH] =?UTF-8?q?fix(android):=20Search=20kebab=20+=20hide=20dea?= =?UTF-8?q?d=20Liked-cap=20selector=20(audit=20v3=20=C2=A74.8=20+=20Bug-3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ยง4.8: SearchScreen's TopAppBar had no MainAppBarActions kebab โ€” users in Search couldn't reach Settings / Discover / Requests / Admin / Sign-out without first hitting Back. Added the standard kebab next to the existing clear-search button. Bug-3: Storage card's "Liked cache limit" dropdown persisted a value that was never enforced (PlayerFactory.kt:43-47 only consumes rollingCapBytes). Per the established pattern for the prefetch + cache-liked toggles (hidden in 4d7a4312 for the same reason), hide the Liked cap dropdown until per-bucket eviction lands. Renamed the remaining one to just "Cache limit" so it reads honestly. The CacheSettings field stays persisted so the control returns once per-bucket SimpleCache eviction is wired. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../minstrel/search/ui/SearchScreen.kt | 6 +++++ .../minstrel/settings/ui/StorageCard.kt | 24 +++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/search/ui/SearchScreen.kt b/android/app/src/main/java/com/fabledsword/minstrel/search/ui/SearchScreen.kt index dac52da2..ece6b84b 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/search/ui/SearchScreen.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/search/ui/SearchScreen.kt @@ -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, + ) }, ) }, diff --git a/android/app/src/main/java/com/fabledsword/minstrel/settings/ui/StorageCard.kt b/android/app/src/main/java/com/fabledsword/minstrel/settings/ui/StorageCard.kt index f70c9e96..351eb31b 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/settings/ui/StorageCard.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/settings/ui/StorageCard.kt @@ -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, )