Feed: three-tab UI (For You / Following / Uploads Only)#14237
Open
dylanjeffers wants to merge 3 commits intomainfrom
Open
Feed: three-tab UI (For You / Following / Uploads Only)#14237dylanjeffers wants to merge 3 commits intomainfrom
dylanjeffers wants to merge 3 commits intomainfrom
Conversation
Introduce a FeedTab enum (FOR_YOU/FOLLOWING/UPLOADS_ONLY) separate from the existing FeedFilter enum so the new tab UI can drive which lineup is rendered without coupling to the SDK filter parameter. The new feedTab Redux slot defaults to FOR_YOU and is persisted alongside feedFilter. useForYouFeed composes four candidate streams: - getUserRecommendedTracks (server-side personalization, 50%) - useFeed with FeedFilter.ORIGINAL (social-graph signal, 20%) - useTrending (week range, cultural-recency signal, 10%) - useTrendingUnderground (discovery, 10%) Slots are interleaved with a fixed 10-item pattern. Tracks the user has already favorited are filtered out so they're not recycled as "new" recommendations. Pagination advances every source whose hasNextPage is still true in parallel. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Render For You / Following / Uploads Only as the feed page's primary
selector on both desktop and mobile-web, driven by the new feedTab
Redux slot.
- For You renders the new useForYouFeed lineup
- Following renders useFeed with FeedFilter.ALL (uploads + reposts
of followed users — current behavior)
- Uploads Only renders useFeed with FeedFilter.ORIGINAL (no reposts)
The legacy "Reposts only" filter is retired from the UI; FeedFilter
itself stays for backwards-compat with persisted state and is still
the parameter the SDK feed call accepts under the hood. The unused
FeedFilters / FeedFilterDrawer / FeedFilterButton components are
removed. The FEED_CHANGE_VIEW analytics event is widened to accept
either FeedFilter or FeedTab as `view`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror the web feed page: render a horizontal pill row with For You / Following / Uploads Only above the lineup, dispatching setFeedTab on change. The legacy FeedFilter drawer + FeedFilterButton are removed, along with the 'FeedFilter' modal slot from the shared modals state since nothing opens it anymore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Open
10 tasks
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
Replaces the legacy "All Posts / Original Posts / Reposts" filter pills on the feed page with a three-tab UI:
useForYouFeedcomposeruseFeedFeedFilter.ALLuseFeedFeedFilter.ORIGINALImplemented on web (desktop + mobile-web) and React Native mobile. New
FeedTabenum andfeedTabRedux slot drive which lineup renders; the legacyFeedFilterenum stays for backwards-compat with persisted state and as the param the SDK feed call still accepts. Reposts-only is no longer a top-level option since it was niche and the social-graph view is already covered by Following.Status
useFeedfilter modes to the new tabs)For You — interim approach
Right now the "For You" feed is composed on the client by blending multiple existing SDK lineup hooks. Each 10-slot page has the following weights, interleaved with a fixed pattern:
getUserRecommendedTracksuseFeedwithFeedFilter.ORIGINALgetTrendingTracks(week)getUndergroundTrendingTracksDedupes by
track_id(Recommended wins ties) and filters out tracks the user has already favorited (viauseFavoritedTracks) so saved music isn't re-recommended.loadNextPageadvances every source whosehasNextPageis still true in parallel.Why client-side as interim
useForYouFeedexposes the same{ trackIds, isPending, hasNextPage, loadNextPage }interface asuseFeed. When the dedicated endpoint lands, the only change in the page components is which hook they call.Why this is an interim — known limitations
Follow-up — proper implementation
A dedicated discovery-provider endpoint (e.g.
GET /v1/users/<id>/feed/for-you) that does the candidate generation + ranking + diversity server-side, returning a single ranked list. The client hook becomes a thin pagination wrapper, identical in shape touseFeed, and this PR'suseForYouFeedis replaced with that thin wrapper. The candidate generation can start with the same four sources (recommended / following / trending / underground) and grow into a feature-store + scoring model over time.Test plan
🤖 Generated with Claude Code