profile: use dedicated user-contests endpoint instead of client-side filter#14263
Closed
dylanjeffers wants to merge 2 commits intomainfrom
Closed
profile: use dedicated user-contests endpoint instead of client-side filter#14263dylanjeffers wants to merge 2 commits intomainfrom
dylanjeffers wants to merge 2 commits intomainfrom
Conversation
Match the union of filters (genre, mood, key, bpm, isPremium, hasDownloads, isVerified) on both web and mobile so the All tab isn't forced to clear filters when switching off a sub-category. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…filter
The profile "Contests" tab was paginating the global remix-contest list
and filtering each row by host userId, which forced multiple page fetches
and still missed artists whose hosted contests sat beyond the auto-paginate
safety cap.
Switches the desktop and mobile tabs to a new `useUserContests` hook
backed by `GET /v1/users/{id}/contests` (SDK: `users.getContestsByUser`),
which returns the artist's contests directly. Same render path as before
since the response shape mirrors `GET /v1/events/remix-contests`.
Also pulls in regenerated SDK types for the new endpoint and sweeps in
the new `feed` tag (Feed for-you) that was already in the swagger spec.
API repo: audius-protocol/api#790
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Contributor
Author
|
Duplicate of #14261 — closing in favor of that one |
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
useUserContestshook backed by the newGET /v1/users/{id}/contestsendpoint and points the desktop + mobile profile Contests tabs at itevents/remix-contestslist and filtered each row byevent.userId === profile.user_id, which silently truncated artists whose hosted contests sat beyond the auto-paginate capusers.getContestsByUser); also picks up thefeedtag that was already in the swagger but not yet in the generated clientThe new endpoint returns the same payload shape (
data+related.users/tracks/entry_counts) as the global one, so React Query priming logic is reused — only the call site changes.API change: audius-protocol/api#790 — must merge and deploy first.
Test plan
ContestCardentry-count badges populate without an extra request per card (related.entry_counts priming still works)🤖 Generated with Claude Code