contest: comments layout, stems threshold, submit pre-fill, mobile listings#14253
Open
dylanjeffers wants to merge 2 commits intomainfrom
Open
contest: comments layout, stems threshold, submit pre-fill, mobile listings#14253dylanjeffers wants to merge 2 commits intomainfrom
dylanjeffers wants to merge 2 commits intomainfrom
Conversation
Contest-related in-app notifications were silently dropped from the feed
in three layers (adapter -> useNotificationEntity -> per-renderer). The
deleted-track case alone makes a fan/artist remix contest row vanish:
useNotificationEntity returns null, every renderer early-returned null,
nothing reached the list. Same shape for comments on contest events,
which additionally couldn't resolve at all because the client Entity
enum had no Event member.
This commit lands the client side of the fix:
- common: add Entity.Event ('Event') and include it in the entityType
unions on Comment / CommentThread / CommentMention / CommentReaction.
- common/useNotificationEntity: when entityType === Entity.Event,
resolve the underlying track via useEvent -> useTrack (mirroring the
two-hop lookup we already do server-side in the pedalboard mappers).
- web: 9 contest renderers (FanRemix* x5, ArtistRemix* x3, RemixContest
Update) now degrade instead of returning null when entity/host can't
be resolved. Fan-side renderers fall back to a host UserNameLink (via
useUser on entityUserId) plus generic copy; artist-side renderers
drop the inline TrackLink and render generic copy. Click-to-navigate
is suppressed when there's no entity to link to.
SDK gap (separate fix needed upstream): the generated comment-notification
type enums in @audius/sdk only include Track/Playlist/Album. The
discovery-provider backend already emits 'Event' for contest comments,
and the adapter already passes it through via @ts-ignore, so this is
purely a typing gap, not a runtime one - but the SDK schema should be
regenerated to include 'Event' alongside the existing values.
Note: did not start the dev server to visually verify (per user pref,
preview servers run in the apps-3 worktree). Typecheck and lint pass
on every changed file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…pre-fill
UI feedback from Julian on the remix-contest surface, batched into one
PR. Each fix below is the minimum change to unblock the report.
WEB:
- Comments overflow kebab moved out of the header row and into the
action bar next to Reply, matching the track-page CommentBlock
layout. The header was wrapping when the user link + timestamp +
badge were wide. (ContestCommentsTile.tsx)
- Comment artist flair restyled to match the track-page CommentBadge
(IconStar + accent text via Flex), and the label changed from
"Artist" to "Host" — contest hosts aren't necessarily the comment-
thread artist, and "Host" reads correctly here.
(ContestCommentsTile.tsx)
- Stems & Downloads card now collapses by default when there are
more than 5 stems and stays expanded when there are fewer — long
lists were pushing the followers + comments tiles way down the
page. The user's explicit toggle (override) wins over the
heuristic, so clicking the caret never gets stomped.
(ContestStemsCard.tsx, applied to both web and native variants)
- Pick-winners "Remixes (N)" heading renamed to "Submissions (N)".
Added a dedicated `pickWinnersSubmissionsTitle` message rather
than reusing `submissionsTitle` (which is the longer "Remix
Contest Submissions" used on the regular remixes page).
(messages/remixes.ts, PickWinnersPage.tsx)
- Submit-to-contest entry points now pre-fill the upload form with
the source track's artwork (fetched as a File for the artwork
input) + genre + remix_of, matching the desktop track-page
RemixContestSection that already did this. Factored into a shared
`useEnterContest(trackId)` hook used by:
* Desktop contest page (was: navigate('/upload?remix_of=…')
— query string ignored by upload page)
* Mobile contest page (same bug)
* Mobile track-page contest details tab (had remix_of but no
artwork/genre)
MOBILE (native):
- Discovery contest carousel: when the CONTESTS flag is on the
section title is "Contests", but the data was still the curated
`featuredRemixContests` subset. Swap to `useAllRemixContests` so
the data matches the label (Julian: "the full list of contests
isn't showing on the mobile discovery page").
(FeaturedRemixContests.tsx)
- Profile Contests tab: bumped page size 50 → 100 so deep-list
hosts (ended contests, smaller accounts — @DimensionX report) are
reached by the auto-pagination effect that was already in place.
No backend change needed; the discovery endpoint doesn't support
host=… filtering, so client-side filter against the global list
remains the only option.
(ContestsTab.tsx)
OUT OF SCOPE (deliberately not touched):
- Native ContestScreen `handleEnterContest` is a stub
(`console.info('Enter contest — native upload flow not yet
wired')`). Wiring up the native upload from the dedicated contest
screen is a separate piece of work — UploadRemixFooter (track
screen) already has the artwork/genre pre-fill and serves as the
reference implementation.
VERIFICATION:
- `tsc --noEmit` clean across `packages/web` and `packages/mobile`
for every file in this PR. The remaining typecheck errors visible
in CI are pre-existing in unrelated files (jupiter/api,
proxy-memoize, type-fest exports, etc.) and unchanged by this PR.
- `eslint` clean on every changed file (mobile shows pre-existing
`react-native` import-resolution warnings that affect untouched
files too).
- Browser preview verification deferred to the apps-3 worktree per
the user's stored preference.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
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
UI feedback from Julian on the remix-contest surface, batched into one PR. Each fix is the minimum change to unblock the report — happy to split if you'd rather review per-issue.
Companion to PR #14251 (notification rendering); the two are independent and can land in either order.
Web
File: `pages/contest-page/components/ContestCommentsTile.tsx`
File: `pages/contest-page/components/ContestStemsCard.tsx` (web) + `mobile/src/screens/contest-screen/ContestStemsCard.tsx` (native)
Files: `common/src/messages/remixes.ts`, `pages/pick-winners-page/PickWinnersPage.tsx`
Files: new `pages/contest-page/hooks/useEnterContest.ts`; `pages/contest-page/components/{desktop,mobile}/ContestPage.tsx`; `pages/track-page/components/mobile/remix-contests/RemixContestDetailsTab.tsx`
Mobile (native)
File: `mobile/src/screens/explore-screen/components/FeaturedRemixContests.tsx`
File: `mobile/src/screens/profile-screen/ProfileTabs/ContestsTab.tsx`
Out of scope (deliberately not touched)
Test plan
🤖 Generated with Claude Code