fix(track): render unavailable tracks as a 404 instead of a custom tombstone - #14572
Open
dylanjeffers wants to merge 1 commit into
Open
fix(track): render unavailable tracks as a 404 instead of a custom tombstone#14572dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
…mbstone #14570 gave tracks whose owner is no longer active - a self deactivation, or an account delisted by the trusted notifier - a bespoke "Track Unavailable" page. Per Ray's feedback on the original report, these should look like any other missing page instead. The API already returns 404 for these tracks specifically so they can't be told apart from one that never existed (api#1023). Making the web page a real 404 finishes that: the client reuses the existing `navigate(NOT_FOUND_PAGE)` path that a failed track fetch already takes, and SSR renders a not-found skeleton with 404 meta tags. The render-time guard stays, returning null rather than the tombstone. The redirect fires from an effect, which runs after the first paint, so without it the track's title and artwork would flash on screen before the redirect landed. Removes the now-unused UnavailableTrackPage, and moves its server twin to not-found-page/ServerNotFound with the 404 copy. Mobile (React Native) and the embed player keep their existing treatment: neither has a distinct 404 screen to route to, so their unavailable state already is the not-found equivalent. Co-Authored-By: Claude Opus 5 <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.
Follow-up to #14570, per Ray's feedback in the #eng thread on the original report:
#14570 gave tracks whose owner is no longer active — a self deactivation, or an account delisted by the trusted notifier — a bespoke "Track Unavailable" page. This makes them a plain 404 instead.
That's also the more consistent answer. AudiusProject/api#1023 deliberately returns 404 rather than 403 for these tracks so they can't be told apart from a track that never existed; the web page was the one surface still announcing that something specific used to be there.
Change
navigate(NOT_FOUND_PAGE)path that a failed track fetch already takes, rather than importing a page component.Not Found/404 - Page not found), stillnoIndex, still no embed player.UnavailableTrackPage; moves its server twin tonot-found-page/ServerNotFoundwith the 404 copy.The render-time guard stays but returns
nullinstead of the tombstone. The redirect fires from an effect, which runs after first paint — without the guard the track's title and artwork would flash on screen before the redirect landed. That was the one thing the oldreturn <UnavailableTrackPage />got for free.Scope
Mobile (React Native) and the embed player are unchanged. Neither has a distinct 404 screen to route to, so their unavailable state already is the not-found equivalent — pointing them at a "404" would just mean different copy for the same thing.
Verification
Against prod data via the SSR dev server, using
rehoxx/just-for-tonight-wmellark-hoonds(the track from the original report):og:title=Not Found • Audius,og:description=404 - Page not found,robots: noindex, notwitter:player, no signedcidstreamURL/404with the standard 404 page; track title never appears in the rendered bodytsc --noEmitandeslintboth clean.Note
The SSR hydration payload still carries the track's
titleandorig_filename, since it's the raw API response. Pre-existing and unchanged by this PR — flagging it as a separate thing worth deciding on.🤖 Generated with Claude Code