feat(feed): consume mixed for-you feed (tracks + collections)#14413
Merged
Conversation
The /v1/users/{id}/feed/for-you endpoint now returns a heterogenous
feed (tracks + playlists/albums) with the same envelope as the
chronological feed: `{type, timestamp, item}` items. SDK regen flips
getUserForYouFeed's return type from Tracks to UserFeedResponse.
useForYouFeed is rewritten on the useFeed pattern:
- Primes both track and collection tan-query caches
- Returns mixed `data: LineupData[]` and a derived `trackIds: ID[]`
- Existing call sites (FeedPageContent, FeedScreen, ForYouTracks,
RecommendedTracksSection) only consume `trackIds` and keep working
unchanged. TrackLineup still renders tracks only — same known
limitation that already applies to the chronological feed.
Companion to api#860.
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14413.audius.workers.dev Unique preview for this PR (deployed from this branch). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/v1/users/{id}/feed/for-youresponse shape (UserFeedResponseinstead ofTracks).useForYouFeedon theuseFeedpattern: primes both track and collection tan-query caches, returns mixeddata: LineupData[]plus a derivedtrackIds: ID[].FeedPageContentweb + mobile,FeedScreen,ForYouTracks,RecommendedTracksSection) consumetrackIdsand keep working with no changes.TrackLineupstill renders tracks only — same known limitation that already applies to the chronological feed.Companion to api#860.
Test plan
npx tsc --noEmitclean inpackages/common,packages/web,packages/mobileTrackLineup(or build aMixedLineup) to render playlist tiles inline so the collections actually appear in the For You feed UI🤖 Generated with Claude Code