refactor(api): rename the Discover Weekly endpoint to Weekly Rotation - #1031
Merged
Conversation
GET /v1/users/{id}/discover-weekly becomes /v1/users/{id}/weekly-rotation,
along with the handler, params struct, tuning constants, cache key, cache
field, tests, and the swagger operation ("Get Weekly Rotation" -- the
operationId is what names the generated SDK method).
Safe to rename outright rather than alias: the feature has never been
visible to users, and the only caller is the Audius client, which is still
gated off. This must merge and roll out before the matching apps change,
since the client will start calling the new path.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dylanjeffers
added a commit
to AudiusProject/apps
that referenced
this pull request
Sep 1, 2026
…14582) Renames the whole feature — copy, code, route, analytics, SDK method, and feature flag key. Depends on AudiusProject/api#1031 (merged), which renames the endpoint to `/v1/users/{id}/weekly-rotation`. That needs to be rolled out before this merges, or the client calls a 404. ## Why rename everything and not just the copy Nothing here has ever reached a user. The Optimizely ruleset is 100% allocated to `off`, and the production web bundle doesn't contain the feature at all — the web deploy runs for it are still `waiting` on the Production environment approval. This is the cheapest this rename will ever be, so it covers components, filenames, hooks, query keys, analytics event names, artwork assets, and the web route (`/explore/discover-weekly` → `/explore/weekly-rotation`). ## SDK `sdk.users.getDiscoverWeekly` → `getWeeklyRotation`. Not a breaking change: the method was added on Aug 24, after 16.0.0 was published on Aug 3, so it has never existed in a released SDK. It was also missing a changeset, so this adds one. ## Feature flag The key becomes `weekly_rotation`. A new Optimizely flag needs to be created under that key; the old `discover_weekly` flag is now orphaned. Safe to merge first — `getFeatureEnabled` can't distinguish an unknown key from a `false` one, so both fall through to the code default (`false` in production). ## Verification - `tsc --noEmit` clean on `common`, `web`, `mobile`, and `sdk` - eslint clean; `responsiveCoverage.test.ts` passes Note for reviewers: `packages/common` typechecks against the built SDK `dist`, not source, so this needs `npm run build -w @audius/sdk` locally before `common` will typecheck. web and mobile resolve to source and won't show the problem. 🤖 Generated with [Claude Code](https://claude.com/claude-code) 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.
Renames the endpoint and everything around it, ahead of the matching client rename in
AudiusProject/audius-protocol.GET /v1/users/{id}/discover-weekly→GET /v1/users/{id}/weekly-rotation, along with the handler, params struct, tuning constants, cache key, cache field, tests, and the swagger operation (operationId: Get Weekly Rotation— that string is what names the generated SDK method).Why a hard rename rather than an alias
The feature has never been visible to a user: the Optimizely ruleset is 100% allocated to
off, and the code isn't even in the deployed web bundle yet. The only caller is the Audius client, which is being renamed in lockstep. Nothing external can be pointing at the old path.Ordering
This needs to be deployed before the apps change, or the client will call a path that 404s.
Verification
go build ./...clean,gofmtcleanTestV1UsersWeeklyRotation*tests pass🤖 Generated with Claude Code