Skip to content

feat(discover-weekly): put the feature behind the discover_weekly flag - #14581

Merged
dylanjeffers merged 1 commit into
mainfrom
feat/discover-weekly-flag
Aug 28, 2026
Merged

feat(discover-weekly): put the feature behind the discover_weekly flag#14581
dylanjeffers merged 1 commit into
mainfrom
feat/discover-weekly-flag

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Why

Discover Weekly is fully merged to main but has never shipped. Web/desktop don't auto-deploy — they're gated on a manual Production environment approval that ships everything sitting on main as one batch. There are unrelated fixes waiting on that approval, and approving it today would take Discover Weekly to prod along with them.

A flag is the cheap way out: ship the batch, leave the mix dark, turn it on deliberately.

What

Adds FeatureFlags.DISCOVER_WEEKLY (discover_weekly) — off in production defaults, on in development so local/dev keeps working unchanged.

Gated at three points, which covers every entry:

Gate Covers
DiscoverWeeklyBanner (web) Explore desktop, Explore mobile-web, desktop feed
DiscoverWeekly (native) Explore, feed
DiscoverWeeklyPage (web) the /explore/discover-weekly URL

Both banners already returned null on an empty or failed mix, so every surface that renders them is built to tolerate a missing banner — the flag check rides that same early return, and no layout changes were needed. Verified the containers: the desktop Explore section list wraps each entry in a Fragment (no DOM node, so no stray flex gap), mobile Explore is a gap column, and the native feed passes it as a header.

The web page redirects to Explore instead of 404ing, since the URL is public and shareable. It waits on isLoaded first so an enabled user isn't bounced on the first frame.

enabled is threaded into useDiscoverWeekly at each call site, so a disabled flag costs no API request.

Notes

  • The native DiscoverWeeklyScreen is reachable only through the native banner (no deep link maps to it), so it needs no separate gate.
  • DISCOVER_WEEKLY_PAGE deliberately stays in staticRoutes — dropping it would make /explore/discover-weekly parse as a user handle while the flag is off.
  • The API endpoint is already live in prod and is left alone; it's inert with no client calling it.

Testing

  • tsc --noEmit clean in common, web, and mobile
  • eslint clean on all four changed files (run from each package root)
  • responsiveCoverage.test.ts passes (3/3) — it asserts against DiscoverWeeklyPage.tsx

🤖 Generated with Claude Code

Discover Weekly is merged to main but has never shipped, and web/desktop
deploys are gated on a manual approval that batches everything sitting on
main. Unrelated fixes are waiting on that approval, so the mix needs an
off switch rather than a revert.

Adds `discover_weekly`, defaulted off in production and on in development.
Gated at three points, which is every way in:

- The web banner (Explore desktop, Explore mobile-web, desktop feed)
- The native banner (Explore, feed)
- The web page, which is reachable by URL and so redirects to Explore
  rather than 404ing on a link that predates the rollout

The banners already returned null on an empty or failed mix, so the
surfaces around them are built to tolerate a missing banner -- the flag
check rides that same return. The native screen is reachable only through
the native banner, so it needs no separate gate.

`enabled` is threaded into `useDiscoverWeekly` at each site so a disabled
flag costs no request.

`DISCOVER_WEEKLY_PAGE` stays in `staticRoutes`: dropping it would make
`/explore/discover-weekly` parse as a user handle while the flag is off.

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

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 59b43cb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@dylanjeffers
dylanjeffers merged commit 49de085 into main Aug 28, 2026
17 checks passed
@dylanjeffers
dylanjeffers deleted the feat/discover-weekly-flag branch August 28, 2026 20:38
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