feat(web): "You might like" Home row (#790 web client slice)
test-web / test (push) Successful in 32s
test-web / test (push) Successful in 32s
The web UI rendered a fixed set of Home sections and had no code for the server's you_might_like_albums / you_might_like_artists (shipped in v2026.06.11), so the row was absent in the web client. Adds it, mirroring the Rediscover block, positioned directly under the system-playlists row. - types.ts HomePayload: two new slices (server always emits them; web ships in lockstep with the server). - +page.svelte: a "You might like" section (albums + artists scrollers) as the first section under the playlists row, with a "still learning your taste" empty state for the cold-start/gated case. Reuses existing AlbumCard / ArtistCard / HorizontalScrollRow. - home.test.ts / page.test.ts: mock payloads gain the two fields. Completes the You-might-like row across all three clients (server already emits it; Android in v2026.06.11; web here). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,9 @@ describe('home client', () => {
|
||||
rediscover_albums: [],
|
||||
rediscover_artists: [],
|
||||
most_played_tracks: [],
|
||||
last_played_artists: []
|
||||
last_played_artists: [],
|
||||
you_might_like_albums: [],
|
||||
you_might_like_artists: []
|
||||
};
|
||||
(api.get as ReturnType<typeof vi.fn>).mockResolvedValueOnce(fixture);
|
||||
const got = await listHome();
|
||||
|
||||
@@ -342,4 +342,6 @@ export type HomePayload = {
|
||||
rediscover_artists: ArtistRef[];
|
||||
most_played_tracks: TrackRef[];
|
||||
last_played_artists: ArtistRef[];
|
||||
you_might_like_albums: AlbumRef[];
|
||||
you_might_like_artists: ArtistRef[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user