Skip to content

refactor(api): rename the Discover Weekly endpoint to Weekly Rotation - #1031

Merged
dylanjeffers merged 1 commit into
mainfrom
feat/weekly-rotation-rename
Sep 1, 2026
Merged

refactor(api): rename the Discover Weekly endpoint to Weekly Rotation#1031
dylanjeffers merged 1 commit into
mainfrom
feat/weekly-rotation-rename

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Renames the endpoint and everything around it, ahead of the matching client rename in AudiusProject/audius-protocol.

GET /v1/users/{id}/discover-weeklyGET /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, gofmt clean
  • All 6 TestV1UsersWeeklyRotation* tests pass

🤖 Generated with Claude Code

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
dylanjeffers merged commit 271656a into main Sep 1, 2026
2 checks passed
@dylanjeffers
dylanjeffers deleted the feat/weekly-rotation-rename branch September 1, 2026 18:46
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant