Skip to content

feat: experiment hiding non-Plus clickbait warning shield on feed#5912

Open
nimrodkra wants to merge 2 commits intomainfrom
feat/clickbait-shield-warning-experiment
Open

feat: experiment hiding non-Plus clickbait warning shield on feed#5912
nimrodkra wants to merge 2 commits intomainfrom
feat/clickbait-shield-warning-experiment

Conversation

@nimrodkra
Copy link
Copy Markdown
Member

@nimrodkra nimrodkra commented Apr 23, 2026

Summary

Runs a GrowthBook experiment to hide the yellow/red warning ClickbaitShield badge from non-Plus users on feed cards, without touching the rest of the feature.

  • Adds boolean feature feed_clickbait_shield_warning (default true) in packages/shared/src/lib/featureManagement.ts.
  • In packages/shared/src/components/cards/common/ClickbaitShield.tsx, when non-Plus and the user has not fetched the smart title for this post, returns null if the flag is false.

Behavior

  • Plus users: unchanged (ShieldIcon / ShieldCheckIcon).
  • Non-Plus after a free try (fetchedSmartTitle = true): unchanged — still shows the green ShieldCheckIcon as proof of value.
  • Non-Plus, warning state (fetchedSmartTitle = false): hidden when the flag is false; unchanged when true (default/control).
  • Post detail PostClickbaitShield: unchanged.
  • Feed header ToggleClickbaitShield: unchanged.

Rollout

  1. Land with the flag defaulting to true (no user impact).
  2. Configure a 50/50 GrowthBook experiment on non-Plus users.
  3. Watch feed engagement and Plus conversion; flip default or clean up based on results.

Test plan

  • Plus account: card shield renders as before (toggles original/optimized).
  • Non-Plus, flag on (default): yellow/red warning shield renders as before.
  • Non-Plus, flag off via GrowthBook override: no shield on cards for unfetched posts.
  • Non-Plus, flag off, after using a free try on a post: green ShieldCheckIcon still renders on that card.
  • Post detail pages and the feed header ToggleClickbaitShield are unaffected under both variants.

Made with Cursor

Preview domain

https://feat-clickbait-shield-warning-ex.preview.app.daily.dev

Adds feed_clickbait_shield_warning GrowthBook boolean feature (default
true) and gates the non-Plus warning state of ClickbaitShield behind it.
When the flag is false, non-Plus users no longer see the yellow/red
warning badge on feed cards. The green proof-of-value shield (after a
free try), the Plus experience, post-detail PostClickbaitShield, and the
feed header toggle are all unchanged.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Apr 23, 2026 0:13am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Apr 23, 2026 0:13am

Request Review

@nimrodkra
Copy link
Copy Markdown
Member Author

@claude please reivew this pr

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 23, 2026

Claude finished @nimrodkra's task in 1m 31s —— View job


PR Review

  • Gather context and read changed files
  • Review featureManagement.ts changes
  • Review ClickbaitShield.tsx changes
  • Post final review

Overall the change is minimal, correct, and well-scoped. One process concern and a few minor notes below.


packages/shared/src/lib/featureManagement.ts

✅ Clean addition. The feature key feed_clickbait_shield_warning follows existing snake_case conventions. Default true (show shield = control) is the safe starting point so there's no impact at merge time.


packages/shared/src/components/cards/common/ClickbaitShield.tsx

useFeature vs useConditionalFeature⚠️ Medium concern

The project's CLAUDE.md explicitly requires useConditionalFeature with shouldEvaluate to avoid unnecessary GrowthBook evaluations. The current code uses useFeature which evaluates the flag unconditionally on every card render — including for Plus users who will never reach the if (!isPlus) branch where the flag is consumed.

// ❌ Current — evaluates on every card, even for Plus users
const showWarningShield = useFeature(featureFeedClickbaitShieldWarning);
// ✅ Preferred — only evaluates when user is non-Plus
const { value: showWarningShield } = useConditionalFeature({
  feature: featureFeedClickbaitShieldWarning,
  shouldEvaluate: !isPlus,
});

Fix this →


Logic correctness — ✅

The guard condition is correct and maps exactly to the stated behavior:

if (!fetchedSmartTitle && !showWarningShield) {
  return null;
}
  • Non-Plus, unfetched, flag off → null
  • Non-Plus, fetched (free trial used), flag off → falls through to show green ShieldCheckIcon
  • Plus → skips this block entirely ✅

ReactElement | null return type — ✅ Correctly updated.


Summary

One fix needed before merging: swap useFeatureuseConditionalFeature with shouldEvaluate: !isPlus per project conventions. Everything else looks good.

Addresses review: only evaluate feed_clickbait_shield_warning when the
user is non-Plus, per CLAUDE.md guidance.

Made-with: Cursor
@nimrodkra
Copy link
Copy Markdown
Member Author

Addressed the review: switched to useConditionalFeature with shouldEvaluate: !isPlus per CLAUDE.md, so the flag no longer evaluates for Plus users. Pushed as ad91e8d.

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