Skip to content

refactor(weekly-rotation): rename Discover Weekly to Weekly Rotation - #14582

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

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

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

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.getDiscoverWeeklygetWeeklyRotation. 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

Nothing here has ever reached a user -- the Optimizely ruleset is 100% `off`
and the feature is not even in the deployed web bundle -- so this renames the
whole surface rather than only the copy: components, files, hooks, query keys,
analytics event names, the SDK method, the feature flag key, and the web route
(/explore/discover-weekly -> /explore/weekly-rotation).

- `sdk.users.getDiscoverWeekly` -> `getWeeklyRotation`, calling the renamed
  `/v1/users/{id}/weekly-rotation` endpoint. Not a breaking change: the method
  was added after 16.0.0 was published, so it has never shipped under the old
  name. Adds the changeset it was missing.
- The feature flag key becomes `weekly_rotation`. A flag key Optimizely does
  not know falls through to the code default (false in production), so this is
  safe to merge before the new flag exists.

Requires the matching api change (weekly-rotation endpoint) to be deployed
first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: de6bfc3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@audius/sdk Minor
@audius/sdk-legacy Patch
@audius/protocol-dashboard Patch
@audius/sp-actions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dylanjeffers
dylanjeffers merged commit 02ee302 into main Sep 1, 2026
6 checks passed
@dylanjeffers
dylanjeffers deleted the feat/weekly-rotation-rename branch September 1, 2026 18:47
dylanjeffers added a commit that referenced this pull request Sep 1, 2026
## Problem

`Web Lint & Stylelint` fails on main at 02ee302, which takes the whole
pipeline down with it — Web Build, Web Deploy, all three Desktop builds
and the **Production Release Gate** every one skipped. Nothing from that
run can ship.

```
18:1  error  `components/weekly-rotation` import should occur after import of `components/page/Page`   import/order
27:1  error  `components/weekly-rotation` import should occur after import of `components/tabs`        import/order
25:1  error  `components/weekly-rotation` import should occur after import of `components/nav/mobile/NavContext`  import/order
✖ 4 problems (3 errors, 1 warning)
```

## Cause

#14582 renamed `components/discover-weekly` →
`components/weekly-rotation` in place. `d` sorts before
`header`/`lineup`/`nav`/`page`/`tabs`; `w` sorts after all of them, so
the import line that was correctly placed under the old name is now out
of order under the new one. Three call sites were affected.

## Fix

Moved each `WeeklyRotationBanner` import to its new alphabetical
position. Import-only change — no runtime difference, and `--fix`
produces exactly this.

- `pages/feed-page/components/desktop/FeedPageContent.tsx`
- `pages/search-explore-page/components/desktop/SearchExplorePage.tsx`
- `pages/search-explore-page/components/mobile/SearchExplorePage.tsx`

## Test plan

- [x] All three files' `components/` import blocks verified in sorted
order
- [ ] CI lint green (the real check — this is the job that was failing)

## Note

This is currently what blocks the production web deploy. The Production
gate has five runs waiting back to Aug 24, including the 12/31/69
album-date fix (#14579); main HEAD couldn't join them because of this
lint failure.

🤖 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant