Repository navigation
fix(api): hide new notification types from clients that can't parse them - #1073
Merged
Merged
Conversation
The generated SDK throws on an unknown notification type, which fails the whole page. weekly_rotation_featured, weekly_artist_recap and trending_genre broke the notification list on every shipped web and mobile client. Return them only when the caller lists them in `types`. Co-Authored-By: Claude Opus 5.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.
Notifications stopped loading on web and mobile this afternoon.
The generated SDK's
NotificationFromJSONTypedthrows on any type it doesn't know, so the whole response is rejected. Today'sweekly_rotation_featured(#1069),weekly_artist_recap(#1070) andtrending_genre(#1071) aren't in the SDK on any shipped client (or on apps main), and clients don't passtypes, so any user with one of those rows got an empty list.These three types are now returned (and counted in
unread_count) only when the caller includes them intypes. Everything else is unchanged.The client still needs a follow-up: regenerate the SDK and request these types explicitly, and stop one unknown type from failing the whole page.
Test:
TestV1Notifications_OptInTypesHiddenUnlessRequested(fails without the fix).🤖 Generated with Claude Code