Skip to content

[Contests] Use per-user endpoint for profile tab + has-contest gate#14261

Merged
dylanjeffers merged 2 commits intomainfrom
claude/artist-contests-endpoint
May 7, 2026
Merged

[Contests] Use per-user endpoint for profile tab + has-contest gate#14261
dylanjeffers merged 2 commits intomainfrom
claude/artist-contests-endpoint

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

@dylanjeffers dylanjeffers commented May 7, 2026

Summary

  • The profile Contests tab and the useUserHasRemixContest gate both fetched the global remix-contests list and filtered client-side by host userId, paginating up to 5 pages of 50 to avoid false-empty rendering.
  • Switch both to the new GET /v1/users/{id}/contests endpoint via a new useUserRemixContests hook. The has-contest gate becomes a single pageSize=1 query, and the tab drops the per-row HostedContestCard filter and the auto-pagination effect.
  • SDK regen picked up users.getContestsByUser and GetContestsByUserStatusEnum.

Companion PR

Test plan

  • Visit a profile that hosts an active contest — Contests tab renders with the contest card.
  • Visit a profile that hosts only an ended contest — tab renders with the ended card.
  • Visit a profile that hosts no contests — empty state shows immediately (no spinner waiting on global pagination).
  • Confirm the tab strip itself only appears for hosts (useUserHasRemixContest gate).
  • DevTools: confirm the request is /v1/users/{id}/contests and not /v1/events/remix-contests.

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 7, 2026

⚠️ No Changeset found

Latest commit: 303697f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers changed the title [Contests] Use per-user endpoint for profile tab + has-contest check [Contests] Use per-user endpoint for profile tab + has-contest gate May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14261.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

dylanjeffers and others added 2 commits May 7, 2026 13:20
Main added syncCache (private), preloadSyncKeys, and preloadAccountSyncCache
to the LocalStorage class in #14259, which broke the web typecheck on the
PR merge ref. Add the public methods to the mock and cast the return so the
private member is satisfied.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dylanjeffers dylanjeffers force-pushed the claude/artist-contests-endpoint branch from cb3564f to 303697f Compare May 7, 2026 20:25
@pull-request-size pull-request-size Bot added size/S and removed size/L labels May 7, 2026
@dylanjeffers dylanjeffers merged commit 5c1f0a8 into main May 7, 2026
5 checks passed
@dylanjeffers dylanjeffers deleted the claude/artist-contests-endpoint branch May 7, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant