: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(insights): remove notification entrypoint experiment (#82671)
Matt Pua63baf097a9c6
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex ee57cfcc46e0..8064e85f4c0d 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -6519,9 +6519,9 @@ snapshots:scenes-app-insights-error-empty-states--estimated-query-execution-time-too-long--light:hash: v1.k794b7964.64c380e25170b0fc5f041051d81ecaffbee6c7d27b5cd089791b6c3a935aee1e.vh2_IGlmhOovhn4Enx5sywCBxW_ozxGNdkO36J6U95Escenes-app-insights-error-empty-states--funnel-single-step--dark:- hash: v1.k794b7964.47cfc59403ba75bddbbf44794ab0b3edffd0c238151662ba5dadfdaae15bd06e.O38GhXZVC2J2zaoIJO4HauYeXt5ojykpdy3AiMDNSrY+ hash: v1.k794b7964.95191b5eabf851e9190e78385e9b9c66305ef02e0239996a2505c12642a8cfe7.AzXYpom0Oilotqx9JOMUfUrK5VA4GaPcLHki2FkLGxwscenes-app-insights-error-empty-states--funnel-single-step--light:- hash: v1.k794b7964.49098739cf73ac9854bc1d46cfd56405adcd40293f444d5ff8de1262b8bb1d1e.-7-iNk2KTD2g20fzTZf9fQyHGs647o8oWLMiUQ5XQ4M+ hash: v1.k794b7964.66bd00443e2e711874ed527bf57144f29725e97fe6485bd851a5a08fc1312baa.tlLUxnCoHj_VOErbA4ZPNkryCh306EmzhqWZkD8heAUscenes-app-insights-error-empty-states--long-loading--dark:hash: v1.k794b7964.a6429bcd1656dc70e30624f2e2f222d77d001a2a0e6fd49e0715598251e08e5e.GjorOUsq0kK5NJezAdyIBqFjJBIveAR3brvuMItSSYcscenes-app-insights-error-empty-states--long-loading--light:diff --git a/frontend/src/lib/components/Scenes/InsightSubscribeProminentButton.tsx b/frontend/src/lib/components/Scenes/InsightSubscribeProminentButton.tsxindex 9b68c9821229..3f191729267b 100644--- a/frontend/src/lib/components/Scenes/InsightSubscribeProminentButton.tsx+++ b/frontend/src/lib/components/Scenes/InsightSubscribeProminentButton.tsx@@ -4,10 +4,8 @@ import posthog from 'posthog-js'import { IconBell, IconWarning } from '@posthog/icons'-import { FEATURE_FLAGS } from 'lib/constants'import { IconWithCount } from 'lib/lemon-ui/icons/icons'import { LemonButton } from 'lib/lemon-ui/LemonButton'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'import {DropdownMenu,@@ -29,19 +27,6 @@ interface InsightSubscribeProminentButtonProps {canCreateAlert: boolean}-function notificationLabelForVariant(variant: boolean | string | undefined): string | null {- switch (variant) {- case 'notifications':- return 'Notifications'- case 'get-updates':- return 'Get updates'- case 'monitor':- return 'Monitor'- default:- return null- }-}-function SubscribeIcon({ insightShortId }: { insightShortId: InsightShortId }): JSX.Element {const { hasAvailableFeature } = useValues(userLogic)const { subscriptions } = useValues(subscriptionsLogic({ insightShortId }))@@ -67,81 +52,72 @@ export function InsightSubscribeProminentButton({return <SubscribeButton insightShortId={insightShortId} />}- return <ExperimentButton insightShortId={insightShortId} />+ return <NotificationButton insightShortId={insightShortId} />}-function ExperimentButton({ insightShortId }: { insightShortId: InsightShortId }): JSX.Element {+function NotificationButton({ insightShortId }: { insightShortId: InsightShortId }): JSX.Element {const { push } = useActions(router)- const { featureFlags } = useValues(featureFlagLogic)- const notificationEntrypointVariant = featureFlags[FEATURE_FLAGS.INSIGHT_NOTIFICATION_ENTRYPOINT]- const notificationLabel = notificationLabelForVariant(notificationEntrypointVariant)- if (notificationLabel) {- return (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <LemonButton- type="secondary"- size="small"- icon={<IconBell />}- data-attr="insight-notify-prominent-button"- >- {notificationLabel}- </LemonButton>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuGroup>- <DropdownMenuItem asChild>- <ButtonPrimitive- menuItem- autoHeight- className="items-start py-1"- onClick={() => {- posthog.capture('insight notify prominent button clicked', {- insight_short_id: insightShortId,- option: 'alerts',- header_copy: notificationLabel,- })- push(urls.insightAlerts(insightShortId))- }}- >- <IconWarning className="mt-0.5" />- <span className="flex flex-col">- <span>Alerts</span>- <span className="text-secondary text-xs">- Notify me when the insight meets a condition- </span>- </span>- </ButtonPrimitive>- </DropdownMenuItem>- <DropdownMenuItem asChild>- <ButtonPrimitive- menuItem- autoHeight- className="items-start py-1"- onClick={() => {- posthog.capture('insight notify prominent button clicked', {- insight_short_id: insightShortId,- option: 'subscriptions',- header_copy: notificationLabel,- })- push(urlForSubscriptions({ insightShortId }))- }}- >- <IconBell className="mt-0.5" />- <span className="flex flex-col">- <span>Subscriptions</span>- <span className="text-secondary text-xs">Send me a recurring report</span>+ return (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <LemonButton+ type="secondary"+ size="small"+ icon={<IconBell />}+ data-attr="insight-notify-prominent-button"+ >+ Monitor+ </LemonButton>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuGroup>+ <DropdownMenuItem asChild>+ <ButtonPrimitive+ menuItem+ autoHeight+ className="items-start py-1"+ onClick={() => {+ posthog.capture('insight notify prominent button clicked', {+ insight_short_id: insightShortId,+ option: 'alerts',+ })+ push(urls.insightAlerts(insightShortId))+ }}+ >+ <IconWarning className="mt-0.5" />+ <span className="flex flex-col">+ <span>Alerts</span>+ <span className="text-secondary text-xs">+ Notify me when the insight meets a condition</span>- </ButtonPrimitive>- </DropdownMenuItem>- </DropdownMenuGroup>- </DropdownMenuContent>- </DropdownMenu>- )- }-- return <SubscribeButton insightShortId={insightShortId} />+ </span>+ </ButtonPrimitive>+ </DropdownMenuItem>+ <DropdownMenuItem asChild>+ <ButtonPrimitive+ menuItem+ autoHeight+ className="items-start py-1"+ onClick={() => {+ posthog.capture('insight notify prominent button clicked', {+ insight_short_id: insightShortId,+ option: 'subscriptions',+ })+ push(urlForSubscriptions({ insightShortId }))+ }}+ >+ <IconBell className="mt-0.5" />+ <span className="flex flex-col">+ <span>Subscriptions</span>+ <span className="text-secondary text-xs">Send me a recurring report</span>+ </span>+ </ButtonPrimitive>+ </DropdownMenuItem>+ </DropdownMenuGroup>+ </DropdownMenuContent>+ </DropdownMenu>+ )}function SubscribeButton({ insightShortId }: { insightShortId: InsightShortId }): JSX.Element {diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex a7ec588ac9ce..1b7e220ff0f7 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -178,7 +178,6 @@ export const FEATURE_FLAGS = {CREATE_BUTTON_NAV_EXPERIMENT: 'create-button-nav-experiment', // owner: #team-platform-ux multivariate=control,test — adds a Create dropdown to the top of the Browse tab in the left navFEATURE_FLAG_DISABLE_AND_ARCHIVE_EXPERIMENT: 'feature-flag-disable-and-archive-experiment', // owner: #team-feature-flags multivariate=control,test, adds a destructive "Disable and archive" option alongside "Disable only" in the disable-flag confirmation dialog, control keeps the plain disable confirmationINBOX_SELF_DRIVING_EMPTY_STATE: 'inbox-self-driving-empty-state',- INSIGHT_NOTIFICATION_ENTRYPOINT: 'insight-notification-entrypoint', // owner: #team-product-analytics multivariate=control,notifications,get-updates,monitor — tests notification-entry-point copy against the prominent Subscribe buttonSTARRED_REORDER: 'starred-reorder', // owner: #team-platform-ux, drag-and-drop reorder of starred shortcuts in the side panelUX_HIDE_PROJECT_NOTICE: 'ux-hide-project-notice', // owner: #team-platform-ux, hides the project notice banner across all scenes