From 521b94632f9348d9a827a911f04ecf2f571bbb28 Mon Sep 17 00:00:00 2001 From: Nimrod Kramer <41470823+nimrodkra@users.noreply.github.com> Date: Thu, 23 Apr 2026 15:03:23 +0300 Subject: [PATCH 1/2] feat: experiment hiding non-Plus clickbait warning shield on feed 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 --- .../src/components/cards/common/ClickbaitShield.tsx | 13 ++++++++++++- packages/shared/src/lib/featureManagement.ts | 5 +++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/shared/src/components/cards/common/ClickbaitShield.tsx b/packages/shared/src/components/cards/common/ClickbaitShield.tsx index 24dc30ae704..d4507fb621a 100644 --- a/packages/shared/src/components/cards/common/ClickbaitShield.tsx +++ b/packages/shared/src/components/cards/common/ClickbaitShield.tsx @@ -17,8 +17,14 @@ import { FeedSettingsMenu } from '../../feeds/FeedSettings/types'; import { useAuthContext } from '../../../contexts/AuthContext'; import { webappUrl } from '../../../lib/constants'; import { Tooltip } from '../../tooltip/Tooltip'; +import { useFeature } from '../../GrowthBookProvider'; +import { featureFeedClickbaitShieldWarning } from '../../../lib/featureManagement'; -export const ClickbaitShield = ({ post }: { post: Post }): ReactElement => { +export const ClickbaitShield = ({ + post, +}: { + post: Post; +}): ReactElement | null => { const { openModal } = useLazyModal(); const { isPlus } = usePlusSubscription(); const { fetchSmartTitle, fetchedSmartTitle, shieldActive } = @@ -27,8 +33,13 @@ export const ClickbaitShield = ({ post }: { post: Post }): ReactElement => { const router = useRouter(); const { user } = useAuthContext(); const { hasUsedFreeTrial, triesLeft } = useClickbaitTries(); + const showWarningShield = useFeature(featureFeedClickbaitShieldWarning); if (!isPlus) { + if (!fetchedSmartTitle && !showWarningShield) { + return null; + } + return ( Date: Thu, 23 Apr 2026 15:09:20 +0300 Subject: [PATCH 2/2] refactor: gate clickbait shield flag eval behind useConditionalFeature Addresses review: only evaluate feed_clickbait_shield_warning when the user is non-Plus, per CLAUDE.md guidance. Made-with: Cursor --- .../shared/src/components/cards/common/ClickbaitShield.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/shared/src/components/cards/common/ClickbaitShield.tsx b/packages/shared/src/components/cards/common/ClickbaitShield.tsx index d4507fb621a..e5ee4527bd7 100644 --- a/packages/shared/src/components/cards/common/ClickbaitShield.tsx +++ b/packages/shared/src/components/cards/common/ClickbaitShield.tsx @@ -8,6 +8,7 @@ import { useViewSize, ViewSize, useClickbaitTries, + useConditionalFeature, } from '../../../hooks'; import { useLazyModal } from '../../../hooks/useLazyModal'; import { LazyModal } from '../../modals/common/types'; @@ -17,7 +18,6 @@ import { FeedSettingsMenu } from '../../feeds/FeedSettings/types'; import { useAuthContext } from '../../../contexts/AuthContext'; import { webappUrl } from '../../../lib/constants'; import { Tooltip } from '../../tooltip/Tooltip'; -import { useFeature } from '../../GrowthBookProvider'; import { featureFeedClickbaitShieldWarning } from '../../../lib/featureManagement'; export const ClickbaitShield = ({ @@ -33,7 +33,10 @@ export const ClickbaitShield = ({ const router = useRouter(); const { user } = useAuthContext(); const { hasUsedFreeTrial, triesLeft } = useClickbaitTries(); - const showWarningShield = useFeature(featureFeedClickbaitShieldWarning); + const { value: showWarningShield } = useConditionalFeature({ + feature: featureFeedClickbaitShieldWarning, + shouldEvaluate: !isPlus, + }); if (!isPlus) { if (!fetchedSmartTitle && !showWarningShield) {