fix(home): render all 13 configurator sections; own recent-albums history

Two Home bugs, one dropped port. #566: four configurator sections
(favoriteAlbums 'Library Albums', qobuzMixes, releaseWatch, topArtists)
were offered and persisted but had no HomeView render arm and no data
in load_home — enabling them produced an invisible row. All four were
genuine Tauri-Home features (DiscoveryView.svelte arms :632/:653/:660/
:666, loaded unconditionally), so this is the full port, not a trim:
own HomeState fields (separate lifecycle from ForYouState), shared
foryou fetch pipelines (favorite_album_cards / fetch_release_watch /
top_artist_cards extracted pub(crate), For You behavior untouched),
Home-scoped artwork targets, and HomeView arms mirroring ForYouView.
load_home joins the three fetches concurrently with the index — zero
added latency. A HOME_RENDERABLE guard next to descriptors_for is now
the single source of truth: an enabled id without a render arm can
never emit an invisible descriptor again.

#567: 'Recently Played Albums' starved because albums derived from the
24-track history (long albums collapse to ~4 distinct). recently.rs
now keeps a separate album history (dedupe by id at record time, own
24 cap) with additive migration from the legacy bare-array format;
tracks keep their cap; load()/load_albums() signatures unchanged.

Zero new msgids (all three titles reuse For You's). qbz-app tests
10/10; slintcheck green.

cc
This commit is contained in:
vicrodh committed 2026-07-08 11:46:57 -06:00
1 parent 99a2079df1
commit 338d20df9b
8 files changed
+384 -70

No files matched your search

@@ -169,7 +169,10 @@ pub struct DiscoverPrefs {
pub fn default_prefs() -> DiscoverPrefs {
use DiscoverySectionId::*;
DiscoverPrefs {
// home: first 7 ON, last 6 OFF.
// home: first 7 ON, last 6 OFF (1:1 with Tauri sectionPrefs.ts:63-77).
// All 13 ids render on Home since #566 completed the port: qobuzMixes
// / releaseWatch / topArtists / favoriteAlbums were genuine Tauri-Home
// sections whose Slint render arms + data pipelines were missing.
home: vec![
pref(NewReleases, true),
pref(PressAwards, true),
@@ -503,7 +506,7 @@ mod tests {
#[test]
fn defaults_match_spec_exactly() {
let d = default_prefs();
// home: 13 entries, first 7 ON.
// home: 13 entries, first 7 ON (1:1 Tauri sectionPrefs.ts).
assert_eq!(
ids(&d.home),
vec![