feat(contest): add permalink field to Event model for event_routes support#14469
Merged
Conversation
…pport Add permalink?: string to the SDK-generated Event type and common Event model so contest pages can use title-based slugs from event_routes once the API starts returning them. - SDK Event: add permalink field + EventFromJSONTyped/EventToJSON wiring - common Event model: add permalink?: string (forward-compatible optional) - contestPage() helper: pass through permalinks that already contain a contest segment (event-routes slugs) unchanged; keep the existing track-permalink injection for backward compat - Desktop + mobile ContestPage: prefer contest.permalink over track.permalink when setting canonicalUrl (falls back gracefully when absent) - Share flow: thread eventPermalink through ShareModalRequest, ShareContestContent, shareContest action, watchShareContest saga, useShareContent hook, and mobile ShareDrawer utils so sharing a contest uses the event-routes slug when available - mobile getContestRoute: accept optional contestPermalink, use it directly when present - route.test.ts: add passthrough tests for the new contestPage behavior Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14469.audius.workers.dev Unique preview for this PR (deployed from this branch). |
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.
This PR adds frontend support for the contest permalink feature. The backend ETL (go-openaudio PR #354) already stores title-based slugs in event_routes. This PR wires up the frontend to use them once the API begins returning them, while maintaining full backward compatibility.
Summary
All existing behavior is unchanged when event.permalink is absent. No breaking changes.
Test plan
Co-Authored-By: Claude Sonnet 4.6 (1M context) [email protected]