fix(mobile): route all contest notifications to Contest screen#14384
Merged
Conversation
|
The FanRemixContestStarted notification was mapped to the shared entityHandler, which routes Track-entity notifications to the Track screen. The intended destination is the contest page for that track, so the deep-link from the push notification (and the in-app inbox tap) was landing on the wrong screen. Add a dedicated handler that navigates to the Contest screen using the notification's entityId as the trackId, and update the in-app notification row to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Most remix-contest notification types were still mapped to the generic entityHandler, which routes Track-entity notifications to the Track screen. Only the "started" notification was previously fixed. Map every fan- and artist-facing contest notification through a shared contestHandler that navigates to the Contest screen with the host track id from entityId. Also add the two missing handlers (ArtistRemixContestEndingSoon, ArtistRemixContestSubmissions) that weren't in the map at all — tapping those pushes was a no-op before. The FanRemixContestSubmission handler keeps navigating to the submission track since the recipient wants to play the new remix; that matches the web destination. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ba6c4c5 to
ef24753
Compare
3 tasks
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
Most remix-contest notifications still mapped to the generic
entityHandlerinuseNotificationNavigation.ts. That handler routesEntity.Tracknotifications to the Track screen, but every contest notification is meant to land on the contest page for the host track.Two of them weren't mapped at all (
ArtistRemixContestEndingSoon,ArtistRemixContestSubmissions) — tapping those pushes was a silent no-op.This PR introduces a shared
contestHandlerand routes every contest notification through it:The Contest screen accepts
{ trackId }and resolves the event, comments, and tabs internally.entityIdon every contest notification is the host track id, which is exactly what the screen wants.Test plan
For each notification type, send yourself a push and tap from the lock screen / notification center:
FanRemixContestStarted→ opens Contest page for the host trackFanRemixContestEndingSoon→ opens Contest pageFanRemixContestEnded→ opens Contest page (was a no-op before)FanRemixContestWinnersSelected→ opens Contest pageRemixContestUpdate→ opens Contest pageFanRemixContestSubmission→ opens the submission's Track page (unchanged)ArtistRemixContestEnded→ opens Contest pageArtistRemixContestEndingSoon→ opens Contest page (was a no-op before)ArtistRemixContestSubmissions→ opens Contest page (was a no-op before)🤖 Generated with Claude Code