:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore: Clean up feature flag subscription-tabbed-overview after experiment 381760 (#79428)
posthog[bot]5e4bc48514f0
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex b6fdcc02ef4e..3dbe3430250f 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -4907,13 +4907,13 @@ snapshots:products-subscriptions-subscription-delivery-history--with-expanded-summary--light:hash: v1.k794b7964.e8ea5acdf82c72e927990f4672e1615f9b8269abc31a3feb639fa9b993babad0.5j1v9u_2-7CyIDaD0INwHMOAarvZot8UsqYDMVc0UAEproducts-subscriptions-subscriptions-modal--dashboard-with-subscriptions--dark:- hash: v1.k794b7964.1ae6a6c0560d62ca0da0cf9a02def707fb9b3b3bc001939c9620166dc939fbe2.pMjl3SECFIOBsFl3jPWgyXYrkv2K3iZ9bBNQUIY76wo+ hash: v1.k794b7964.34be5065c2a6641f0ad2a24e1dc57e6505d59ef2757dfe1e720d7d5de9ec33c5.50acEl5pVMJGUvu24toA5wvLdYXmqldRUH0gbdbdZgMproducts-subscriptions-subscriptions-modal--dashboard-with-subscriptions--light:- hash: v1.k794b7964.398a5230923a38b8834bb9749e5270b4ab1aa0738125a283ddc8e344685bc1f9.q-X32n0nnoJodi4QZqWKTJPhS5HQXOHinGgM4A8xwag+ hash: v1.k794b7964.bc54b9d5571ad9aa342a092e9bfee263d87d3ca472b5475a82a0d314a2e261bb.KWqAhfaruwwC3f5RvtDhs9Tob0nYttE25oTOydFDAzsproducts-subscriptions-subscriptions-modal--insight-with-subscriptions--dark:- hash: v1.k794b7964.ef43b021b9269ec1653be0fc79eab667e180a863c59ecd607179ca9091201727.N95_Ukn3XqWeWdHz1KuT-Dm_NouF9xWLwC5YXCo-D7Q+ hash: v1.k794b7964.fdd194fa7f91e1eaa642256ba2dd7e0951bc382b7df24e39c504ba428cfabe0a.KLwxXJI2yw_P7hQMu-vHOJKoXi4mSHf3IVabPbV2vdMproducts-subscriptions-subscriptions-modal--insight-with-subscriptions--light:- hash: v1.k794b7964.dbd17c0ed3d7f831b200da0dc5c868b72f23263264fca9b5a7ac45a58427896e.gvc4udyAOG_t9HTleL9upzG9L3Uj45wZNcYRiDLvsT8+ hash: v1.k794b7964.0850b21723e94659d48e7930f44b3806423409fa4e324370cea825f7ee834371.uKJgYFJ-_LNL0M6CQHDlG1kNfpEccF8eSmPDv3hO-1cproducts-subscriptions-subscriptions-modal--subscriptions-new--dark:hash: v1.k794b7964.f311eeee76a344bb3e5d6f821bfc39eaed7084676ed8303b75f72bc7a1b07850.kivXKHF2HMr1zM8HTo7oNgN81xKNFTmqPgYVxW1za90products-subscriptions-subscriptions-modal--subscriptions-new--light:diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex ff708b103035..e141e50ea06c 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -494,7 +494,6 @@ export const FEATURE_FLAGS = {STREAMLIT_APPS: 'streamlit-apps', // owner: @sakceSUBSCRIPTION_AI_PROMPT: 'ai-subscriptions', // owner: #team-analytics-platform, gates AI prompt-based subscriptionsSUBSCRIPTION_AI_SUMMARY_PROMPT_GUIDE: 'subscription-ai-summary-prompt-guide', // owner: #team-analytics-platform, gates the per-subscription prompt guide textarea- SUBSCRIPTION_TABBED_OVERVIEW: 'subscription-tabbed-overview', // owner: #team-analytics-platform, gates the tabbed subscriptions overview modalSURVEY_HEADLINE_SUMMARY: 'survey-headline-summary', // owner: @adboio #team-surveysSURVEYS_ERROR_TRACKING_CROSS_SELL: 'surveys-in-error-tracking', // owner: @adboio #team-surveysSURVEYS_FORM_BUILDER: 'surveys-form-builder', // owner: @adboio #team-surveysdiff --git a/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.stories.tsx b/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.stories.tsxindex fa592f78f7af..42af3fa5153b 100644--- a/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.stories.tsx+++ b/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.stories.tsx@@ -273,11 +273,10 @@ export const SubscriptionsNew: Story = {args: { subscriptionId: 'new', formScenario: 'default' },}-// Tabbed overview (feature flag on), dashboard context: This dashboard / Insights / AI prompt reports tabs.+// Tabbed overview, dashboard context: This dashboard / Insights / AI prompt reports tabs.export const SubscriptionsTabbed: Story = {parameters: {featureFlags: {- [FEATURE_FLAGS.SUBSCRIPTION_TABBED_OVERVIEW]: 'test',[FEATURE_FLAGS.SUBSCRIPTION_AI_PROMPT]: true,},},diff --git a/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.tsx b/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.tsxindex 401ed4e1d8ea..50286f592195 100644--- a/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.tsx+++ b/products/subscriptions/frontend/components/Subscriptions/SubscriptionsModal.tsx@@ -1,10 +1,7 @@import { useActions, useValues } from 'kea'import { router } from 'kea-router'-import posthog from 'posthog-js'-import { useEffect, useState } from 'react'+import { useState } from 'react'-import { FEATURE_FLAGS } from 'lib/constants'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { LemonModal } from 'lib/lemon-ui/LemonModal'import { Spinner } from 'lib/lemon-ui/Spinner/Spinner'import { userLogic } from 'scenes/userLogic'@@ -13,7 +10,6 @@ import { DashboardType, InsightShortId } from '~/types'import { SubscriptionBaseProps, urlForSubscription, urlForSubscriptions } from './utils'import { EditSubscription } from './views/EditSubscription'-import { ManageSubscriptions } from './views/ManageSubscriptions'import { SubscriptionTabKey, TabbedManageSubscriptions } from './views/TabbedManageSubscriptions'export interface SubscriptionsModalProps {@@ -33,21 +29,10 @@ export function SubscriptionsModal(props: SubscriptionsModalProps): JSX.Elementconst dashboardId = dashboard?.idconst baseProps: SubscriptionBaseProps = { insightShortId, dashboardId }- // Experiment-gated: the flag resolves to a variant string, so only the test variant gets the new UI.- const useTabbedOverview = useFeatureFlag('SUBSCRIPTION_TABBED_OVERVIEW', 'test')// Owned here (not in the tabbed view) so the selected tab survives the edit round-trip,// during which the tabbed view unmounts.const [activeTab, setActiveTab] = useState<SubscriptionTabKey>('resource')- useEffect(() => {- if (isOpen) {- // Records which overview variant the user saw, so the tabbed-overview experiment is measurable.- posthog.capture('subscription_modal_opened', {- tabbed_overview_variant: posthog.getFeatureFlag(FEATURE_FLAGS.SUBSCRIPTION_TABBED_OVERVIEW) ?? null,- })- }- }, [isOpen])-if (userLoading) {return <Spinner className="text-2xl" />}@@ -62,31 +47,18 @@ export function SubscriptionsModal(props: SubscriptionsModalProps): JSX.Elementdata-attr={dataAttr}>{!subscriptionId ? (- useTabbedOverview ? (- <TabbedManageSubscriptions- {...baseProps}- activeTab={activeTab}- onChangeTab={setActiveTab}- onCancel={closeModal}- onSelect={(id, resourceType) =>- push(- urlForSubscription(id, baseProps),- resourceType ? { resource_type: resourceType } : undefined- )- }- />- ) : (- <ManageSubscriptions- {...baseProps}- onCancel={closeModal}- onSelect={(id, resourceType) =>- push(- urlForSubscription(id, baseProps),- resourceType ? { resource_type: resourceType } : undefined- )- }- />- )+ <TabbedManageSubscriptions+ {...baseProps}+ activeTab={activeTab}+ onChangeTab={setActiveTab}+ onCancel={closeModal}+ onSelect={(id, resourceType) =>+ push(+ urlForSubscription(id, baseProps),+ resourceType ? { resource_type: resourceType } : undefined+ )+ }+ />) : (<EditSubscriptionid={subscriptionId}diff --git a/products/subscriptions/frontend/components/Subscriptions/views/ManageSubscriptions.tsx b/products/subscriptions/frontend/components/Subscriptions/views/ManageSubscriptions.tsxdeleted file mode 100644index fd3a7fdefe3f..000000000000--- a/products/subscriptions/frontend/components/Subscriptions/views/ManageSubscriptions.tsx+++ /dev/null@@ -1,128 +0,0 @@-import { useActions, useValues } from 'kea'--import { MailHog } from 'lib/components/hedgehogs'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'-import { LemonButton } from 'lib/lemon-ui/LemonButton'-import { LemonModal } from 'lib/lemon-ui/LemonModal'-import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton'-import { capitalizeFirstLetter, pluralize } from 'lib/utils/strings'-import { organizationLogic } from 'scenes/organizationLogic'-import { urls } from 'scenes/urls'--import { SubscriptionResourceType, SubscriptionType } from '~/types'--import { subscriptionsLogic } from '../subscriptionsLogic'-import { SubscriptionBaseProps } from '../utils'-import { AIPromptReportsLink, SubscriptionEmptyState, SubscriptionListItem } from './SubscriptionOverviewComponents'--interface ManageSubscriptionsProps extends SubscriptionBaseProps {- onCancel: () => void- onSelect: (value: number | 'new', resourceType?: SubscriptionResourceType) => void-}--export function ManageSubscriptions({- insightShortId,- dashboardId,- onCancel,- onSelect,-}: ManageSubscriptionsProps): JSX.Element {- const logic = subscriptionsLogic({- insightShortId,- dashboardId,- })-- const { subscriptions, subscriptionsLoading, deliveringSubscriptionId, togglingEnabledId } = useValues(logic)- const { deleteSubscription, deliverSubscription, setSubscriptionEnabled } = useActions(logic)-- const subscriptionResourceNoun = !insightShortId && dashboardId ? 'dashboard' : 'insight'- const hasResourceSubs = subscriptions.length > 0- const aiPromptReportsEnabled = useFeatureFlag('SUBSCRIPTION_AI_PROMPT')- const { currentOrganization } = useValues(organizationLogic)- const showAiPromptReportsLink =- aiPromptReportsEnabled &&- !!currentOrganization?.is_ai_data_processing_approved &&- (!!insightShortId || !!dashboardId)- const loading = subscriptionsLoading && !hasResourceSubs-- const renderItem = (sub: SubscriptionType): JSX.Element => (- <SubscriptionListItem- key={sub.id}- subscription={sub}- onClick={() => onSelect(sub.id)}- onDelete={() => deleteSubscription(sub.id)}- onDeliver={() => deliverSubscription(sub.id)}- onToggleEnabled={(enabled) => setSubscriptionEnabled(sub.id, enabled)}- isDelivering={deliveringSubscriptionId === sub.id}- isToggling={togglingEnabledId === sub.id}- />- )-- return (- <>- <LemonModal.Header>- <div>- <h3>Manage subscriptions</h3>- <p className="text-sm text-secondary mb-0">- Subscriptions automatically send snapshots and reports to Slack or email on a schedule.- </p>- </div>- </LemonModal.Header>- <LemonModal.Content>- {loading ? (- <div className="deprecated-space-y-2">- <LemonSkeleton className="w-1/2 h-4" />- <LemonSkeleton.Row repeat={2} />- </div>- ) : (- <div className="deprecated-space-y-4">- <div className="deprecated-space-y-2">- {hasResourceSubs ? (- <>- <div>- <strong>{subscriptions.length}</strong>{' '}- {pluralize(subscriptions.length, 'subscription', 'subscriptions', false)}- </div>- <div className="max-h-[60vh] overflow-y-auto flex flex-col gap-2">- {subscriptions.map(renderItem)}- </div>- </>- ) : (- <SubscriptionEmptyState- illustration={<MailHog className="object-contain shrink-0 w-24 h-20" />}- title={`${capitalizeFirstLetter(subscriptionResourceNoun)} subscriptions`}- description={`Send an up-to-date snapshot of this ${subscriptionResourceNoun} to Slack or email on a schedule.`}- actionLabel="Create subscription"- actionType="primary"- prominence="featured"- onAction={() => onSelect('new')}- />- )}- </div>-- {showAiPromptReportsLink && (- <div className="border-t pt-3">- <AIPromptReportsLink />- </div>- )}- </div>- )}- </LemonModal.Content>-- <LemonModal.Footer>- <div className="flex-1 flex gap-2">- {hasResourceSubs ? (- <LemonButton type="secondary" onClick={() => onSelect('new')}>- Add subscription- </LemonButton>- ) : null}- <LemonButton type="tertiary" to={urls.subscriptions()}>- View all subscriptions- </LemonButton>- </div>- <LemonButton type="secondary" onClick={onCancel}>- Close- </LemonButton>- </LemonModal.Footer>- </>- )-}