Skip to content

Add host remix contest page#14151

Merged
dylanjeffers merged 4 commits into
mainfrom
jaime/host-remix-contest-page
Apr 21, 2026
Merged

Add host remix contest page#14151
dylanjeffers merged 4 commits into
mainfrom
jaime/host-remix-contest-page

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

No description provided.

dylanjeffers and others added 3 commits April 21, 2026 13:09
Scaffolds a full-page replacement for HostRemixContestModal at
/:handle/:slug/host-contest. First pass matches the Figma layout with
every form section in place; a few integrations are stubbed for a
follow-up pass (called out inline in the code).

What's wired:
- New route HOST_REMIX_CONTEST_PAGE + web helper hostRemixContestPage.
  Registered once in WebPlayer (same Route group as CONTEST_PAGE).
- HostRemixContestPage migrates the modal's Description / Prizes /
  Deadline (Date + Time + AM/PM) state + validation + submit, plus
  the delete ("Turn off contest") action when no submissions exist.
- New form sections per the Figma: Title, Video Link, Cover Photo,
  Source Tracks list. Title / Video URL / Cover Photo URL persist as
  extra keys on the existing eventData JSON blob — no backend schema
  change. sourceTrackIds stored in eventData as well; entity_id still
  points at the primary track.
- Cover Photo preview falls back to the primary track's artwork when
  no per-contest cover is set.
- Source Tracks list renders each row with artwork + title + display
  name + kebab menu. Remove works; Visit/Edit/Manage Stems are the
  two Chunk-2 integrations.
- TrackMenu "Host / Edit Remix Contest" and ContestPage's Edit
  Contest button both navigate to the new page; they fall back to
  the legacy modal if no permalink is available.

What's stubbed (Chunk 2):
- Real Cover Photo upload (mediorum). Today the page exposes a URL
  text field as a stop-gap.
- Add Source Track search modal — "+ Add Track" button is a no-op.
- Manage Stems modal opened from the source-track kebab.
- Save Draft — disabled until a draft backend exists.

HostRemixContestModal is intentionally left in place as a fallback
and for the mobile overflow-menu drawer which hasn't migrated yet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fills in the integrations that Chunk 1 stubbed. The page now shipped:

- useUploadContestCover: uploads a cover-photo File via
  sdk.services.storage with the img_backdrop template (same pattern
  as useUpdateFanClub / useLaunchCoin's banner upload), resolves
  the CID against the current content-node endpoint, and returns a
  URL the form persists in eventData.coverPhotoUrl. Drag-and-drop
  + click-to-browse are wired; the placeholder URL text field is
  gone. While uploading the drop-zone shows a spinner and the
  cursor flips to wait.
- AddSourceTrackModal: multi-select picker hitting
  useUserTracksByHandle for the signed-in user's catalog
  (filterTracks='all', limit=200). Client-side search over the
  fetched list. "View Selection" toggles a selected-only filter.
  Done passes the merged ID set back to the page. Cancel / X
  close without committing.
- ManageStemsModal: opened from the source-track kebab. Toggles
  is_downloadable, surfaces the Public / Followers / Premium
  availability segmented control, and saves directly against the
  track via useUpdateTrack — no per-contest override. Additional
  stem-file upload is called out as coming from the track edit
  page (separate flow). Seeds state from the track on open so the
  modal reflects whatever the current is_downloadable /
  download_conditions are.
- SourceTrackRow: kebab items Visit Track and Edit Track navigate
  to `permalink` and `permalink/edit` respectively. Manage Stems
  opens the modal for that row's trackId. Remove is unchanged.

Chunk 1's "+ Add Track" is now live, the kebab items are all
hooked up, and the cover-photo field uploads to the CDN. Save
Draft is still disabled (no draft model).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SourceTrackRow was showing "No Stems" / "0 Stems" based purely on the
track's is_downloadable flag. Swap to useStems(sourceTrackId) so the
badge reflects the actual number of stem tracks:
- "5 Stems" when there are stems
- "No Stems" when the fetch resolves with an empty list
- (blank) while the query is still pending — avoids a flash of "No
  Stems" on tracks that turn out to have several.

useStems is TanQuery-backed so repeated rows reuse the warm slot; the
cache also primes individual stem tracks via primeTrackData, which
helps downstream screens (e.g. stems detail modals) render without
refetching.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

⚠️ No Changeset found

Latest commit: d865098

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 Jaime/host remix contest page Add host remix contest page Apr 21, 2026
@dylanjeffers dylanjeffers merged commit 8c17bb1 into main Apr 21, 2026
5 checks passed
@dylanjeffers dylanjeffers deleted the jaime/host-remix-contest-page branch April 21, 2026 22:24
@github-actions
Copy link
Copy Markdown
Contributor

🌐 Web preview ready

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

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

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