Skip to content

Epic 47 — Discovery Feed Rename + Subscriber-Audience Flag

Reworks: Epic 33 (Social Graph) feed tabs. Decision (user, 2026-06-16): The Home Feed tab stays "posts from people you follow" (unchanged). The "For You" tab is renamed "Discovery", and a feature flag switches its audience between posts from everyone (default) and posts only from subscribers. (Separate from the talent jobs "Discovery" surface — Epic 42/40.)

✅ SHIPPED 2026-06-19. New FEATURE_FLAGS.DISCOVERY_AUDIENCE_SUBSCRIBERS_ONLY (seeded enabled: false — everyone by default). forYouFeed (services/feed) checks the flag and, when on, adds an OR candidate filter keeping only posts whose talent OR producer author's user has a subscription in ACTIVE_SUBSCRIPTION_STATUSES (ACTIVE/TRIALING/PAST_DUE, now exported from subscriptions/tier.ts); interleaved system posts are never gated. Internal tab key stays FOR_YOU; only the i18n label changed: feed.tabs.forYou → "Discovery"/"Descobrir"/"Descubrir" (Feed/following unchanged). Tests: feedTabs.test.ts flag on/off candidate gate; feedTabs.i18n.test.ts label per locale. BE 1418 / FE app 573 / DS 44 green; typecheck + i18n-key lint clean. Deploy: seedFeatureFlags inserts the (off) flag row.

Why: Today the "For You" tab (forYouFeed, ranked, 30-day, everyone) has no audience gate. The stakeholders want it rebranded "Discovery" with a flag to optionally restrict it to subscribed authors (a quality/exclusivity lever).

Architecture: New DISCOVERY_AUDIENCE_SUBSCRIBERS_ONLY flag (default off = everyone). When on, forYouFeed candidate query joins author subscription status and keeps only authors with an active subscription. The tab label changes via i18n; keep the internal FOR_YOU key (or rename to DISCOVERY — internal only).

BE-FEED-DISC-001 — Discovery audience flag

Files:

  • Add: DISCOVERY_AUDIENCE_SUBSCRIBERS_ONLY flag (FEATURE_FLAGS + FLAG_DEFAULTS, default off).
  • Edit: castyou-backend/src/services/feed/index.ts forYouFeed — when the flag is on, restrict candidate authors to those with an active subscription.

Acceptance criteria: Flag off → current behaviour (everyone); flag on → only subscriber-authored posts appear in Discovery.

FE-FEED-DISC-001 — Rename "For You" → "Discovery"

Files:

  • Edit: castyou-frontend/apps/app/src/pages/feed/FeedPage.tsx + packages/i18n/locales/{en,pt,es}/app.json (feed.tabs.forYou → "Discovery" / "Descubrir" / "Descobrir"); keep "Feed" (following) label.

Acceptance criteria: The tab reads "Discovery" in all 3 locales; the Feed (following) tab is unchanged.

TEST-FEED-DISC-001 — Discovery coverage

Acceptance criteria: The audience flag's on/off filtering and the renamed tab are tested.