: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(product-analytics): remove code for flags with no flag in posthog (#120141)
Paul D'Ambra0f35c3173264
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex 319379bf5c22..509fe1e2346a 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -251,12 +251,10 @@ export const FEATURE_FLAGS = {WEB_ANALYTICS_REFERRER_URL_DRILLDOWN: 'web-analytics-referrer-url-drilldown', // owner: @jabahamondes #team-web-analytics// Temporary feature flags, still WIP, should be removed eventually- ACTION_REFERENCE_COUNT: 'action-reference-count', // owner: @andyzzhao #team-product-analytics, gates bulk action reference counting on actions listADVANCE_MARKETING_ANALYTICS_SETTINGS: 'advance-marketing-analytics-settings', // owner: @jabahamondes #team-web-analyticsAI_OBSERVABILITY_OFFLINE_EVALUATIONS: 'ai-observability-offline-evaluations', // owner: #team-ai-observabilityAI_OBSERVABILITY_TRACE_REDESIGN: 'ai-observability-trace-redesign', // owner: #team-ai-observability, gates the redesigned trace view/** Alert edit modal: check history chart + chart/table toggle (table remains when off). */- ALERTS_15_MINUTE_INTERVAL: 'alerts-15-minute-interval', // owner: #team-analytics-platform, gates 15-minute insight alert intervalALERTS_DESTINATION_CUSTOMIZATION: 'alerts-destination-customization', // owner: #team-logs, gates the custom message tag and edit notice on logs alert destinationsALERTS_INLINE_NOTIFICATIONS: 'alerts-inline-notifications', // owner: @vdekrijgerALERTS_LLM_DETECTOR: 'alerts-llm-detector', // owner: #team-analytics-platform, gates the AI anomaly detector for insight alerts@@ -297,7 +295,6 @@ export const FEATURE_FLAGS = {CUSTOMER_ANALYTICS_TRACK_RULES: 'customer-analytics-track-rules', // owner: @arthurdedeus #team-customer-analyticsDASHBOARD_EXPORT_NUDGE: 'dashboard-export-nudge', // owner: #team-analytics-platform multivariate=control,test, nudges people who just exported a dashboard toward a recurring subscriptionDASHBOARD_LAYOUT_DISCARD_PROMPT: 'dashboard-layout-discard-prompt', // owner: @cory.s #team-analytics-platform- DASHBOARD_TEMPLATE_CHOOSER_EXPERIMENT: 'dashboard-template-chooser-experiment', // owner: @mattp #team-analytics-platform multivariate=control,simple,newDASHBOARD_WIDGETS: 'dashboard-widgets', // owner: @mattp #team-analytics-platformDATA_MODELING_INCREMENTAL_VIEWS: 'data-modeling-incremental-views', // owner: #team-data-modelingDATA_QUALITY_CHECKS: 'data-quality-checks', // owner: #team-data-modeling@@ -364,7 +361,6 @@ export const FEATURE_FLAGS = {INSIGHT_DATA_CHECKS: 'insight-data-checks', // owner: @sampennington #team-product-analytics, checks the events behind an insight and shows the result on the insight pageINSIGHT_DRAG_TO_ZOOM: 'insight-drag-to-zoom', // owner: @sampennington #team-product-analytics, gates x-axis drag-to-zoom on insight charts (trends today, SQL to follow)INSIGHT_EXPORT_NUDGE: 'insight-export-nudge', // owner: #team-analytics-platform multivariate=control,test, nudges people who just exported an insight toward a recurring subscription- INSIGHT_SUBSCRIBE_PROMINENT_BUTTON: 'insight-subscribe-prominent-button', // owner: @mattp #team-analytics-platform multivariate=control,testINTERNAL_FEEDBACK_WIDGET: 'internal-feedback-widget', // owner: @adamleithp, gates the staff UI feedback bar that posts to SlackJS_SNIPPET_VERSIONING: 'js-snippet-versioning', // owner: #team-client-librariesLEGACY_OAUTH_RECONNECT_WARNING: 'legacy-oauth-reconnect-warning', // owner: @jabahamondes #team-web-analytics — kill-switch for the retiring-OAuth-app reconnect banner@@ -524,7 +520,6 @@ export const FEATURE_FLAGS = {SIGNUP_AA_TEST_4_WAY: 'signup-aa-test-4-way', // owner: @andehen #team-experiments multivariate=control,test-1,test-2,test-3SLACK_DWH: 'slack-dwh', // owner: @MarconLP #team-warehouse-sourcesSQL_EDITOR_BI_MODE: 'sql-editor-bi-mode', // owner: @mariusandra #team-data-tools- SQL_EDITOR_LAZY_SCHEMA: 'sql-editor-lazy-schema', // owner: @mariusandra #team-data-toolsSQL_EDITOR_VIM_MODE: 'sql-editor-vim-mode', // owner: @arthurdedeusSSE_DASHBOARDS: 'sse-dashboards', // owner: @aspicer #team-analytics-platformSSO_SETTINGS_REDESIGN: 'sso-settings-redesign', // owner: @reecejones #team-platform-featuresdiff --git a/products/actions/frontend/components/ActionsTable.tsx b/products/actions/frontend/components/ActionsTable.tsxindex 83092592c77d..66f52a4528f1 100644--- a/products/actions/frontend/components/ActionsTable.tsx+++ b/products/actions/frontend/components/ActionsTable.tsx@@ -8,18 +8,15 @@ import { MemberSelectMultiplePopover } from 'lib/components/MemberSelectMultipleimport { ObjectTags } from 'lib/components/ObjectTags/ObjectTags'import { TagSelect } from 'lib/components/TagSelect'import ViewRecordingsPlaylistButton from 'lib/components/ViewRecordingButton/ViewRecordingsPlaylistButton'-import { FEATURE_FLAGS } from 'lib/constants'import { LemonButton } from 'lib/lemon-ui/LemonButton'import { More } from 'lib/lemon-ui/LemonButton/More'import { LemonDivider } from 'lib/lemon-ui/LemonDivider'-import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton'import { LemonTable } from 'lib/lemon-ui/LemonTable'import { createdAtColumn, createdByColumn } from 'lib/lemon-ui/LemonTable/columnUtils'import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink'import { Sorting } from 'lib/lemon-ui/LemonTable/sorting'import { LemonTableColumn, LemonTableColumns } from 'lib/lemon-ui/LemonTable/types'import { Tooltip } from 'lib/lemon-ui/Tooltip'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { teamLogic } from 'scenes/teamLogic'import { urls } from 'scenes/urls'@@ -41,8 +38,6 @@ export function ActionsTable(): JSX.Element {const { actionsList, actionCount, actionsResponseLoading, page, filters, searchTerm } = useValues(actionsLogic)const { setSearchTerm, setFilters, setPage, pinAction, unpinAction, loadActions } = useActions(actionsLogic)const { addProductIntentForCrossSell } = useActions(teamLogic)- const { featureFlags } = useValues(featureFlagLogic)- const referenceCountEnabled = !!featureFlags[FEATURE_FLAGS.ACTION_REFERENCE_COUNT]const sorting: Sorting | null = filters.ordering? { columnKey: filters.ordering.replace(/^-/, ''), order: filters.ordering.startsWith('-') ? -1 : 1 }@@ -132,29 +127,6 @@ export function ActionsTable(): JSX.Element {return <ObjectTags tags={tags} staticOnly />},} as LemonTableColumn<ActionType, keyof ActionType | undefined>,- ...(referenceCountEnabled- ? [- {- title: 'Used by',- dataIndex: 'reference_count',- render: function RenderReferenceCount(_, action: ActionType) {- const count = action.reference_count- if (count === undefined) {- return actionsResponseLoading ? (- <LemonSkeleton className="w-12 h-4" />- ) : (- <span className="text-secondary">—</span>- )- }- return (- <span className="text-secondary">- {count > 0 ? `${count} ${count === 1 ? 'reference' : 'references'}` : 'None'}- </span>- )- },- } as LemonTableColumn<ActionType, keyof ActionType | undefined>,- ]- : []),{ ...createdByColumn(), sorter: true } as LemonTableColumn<ActionType, keyof ActionType | undefined>,{ ...createdAtColumn(), sorter: true } as LemonTableColumn<ActionType, keyof ActionType | undefined>,{diff --git a/products/actions/frontend/logics/actionsLogic.ts b/products/actions/frontend/logics/actionsLogic.tsindex de4d83255c9a..47e9aa3ba2e7 100644--- a/products/actions/frontend/logics/actionsLogic.ts+++ b/products/actions/frontend/logics/actionsLogic.ts@@ -1,10 +1,8 @@-import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { MakeLogicType, actions, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { actionToUrl, urlToAction } from 'kea-router'import api, { CountedPaginatedResponse } from 'lib/api'-import { FEATURE_FLAGS } from 'lib/constants'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { objectsEqual } from 'lib/utils/objects'import { toParams } from 'lib/utils/url'import { DataManagementTab } from 'scenes/data-management/DataManagementScene'@@ -13,8 +11,6 @@ import { urls } from 'scenes/urls'import { SIDE_PANEL_CONTEXT_KEY, SidePanelSceneContext } from '~/layout/navigation-3000/sidepanel/types'import { ActionType, ActivityScope, Breadcrumb } from '~/types'-import type { FeatureFlagsSet } from '../../../../frontend/src/lib/logic/featureFlagLogic'-export const ACTIONS_PER_PAGE = 50export type ActionsResponse = CountedPaginatedResponse<ActionType>@@ -33,7 +29,6 @@ const DEFAULT_FILTERS: ActionsFilters = {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface actionsLogicValues {- featureFlags: FeatureFlagsSet // featureFlagLogicactionCount: numberactionsList: ActionType[]actionsResponse: ActionsResponse@@ -137,7 +132,7 @@ export interface actionsLogicMeta {__keaTypeGenInternalSelectorTypes: {actionsList: (actionsResponse: ActionsResponse) => ActionType[]actionCount: (actionsResponse: ActionsResponse) => number- apiParams: (searchTerm: string, filters: ActionsFilters, page: number, featureFlags: FeatureFlagsSet) => string+ apiParams: (searchTerm: string, filters: ActionsFilters, page: number) => stringhasActiveFilters: (searchTerm: string, filters: ActionsFilters) => booleanshouldShowEmptyState: (actionCount: number,@@ -156,9 +151,6 @@ export type actionsLogicType = MakeLogicType<export const actionsLogic = kea<actionsLogicType>([path(['products', 'actions', 'actionsLogic']),- connect(() => ({- values: [featureFlagLogic, ['featureFlags']],- })),actions({setSearchTerm: (searchTerm: string) => ({ searchTerm }),setFilters: (filters: Partial<ActionsFilters>) => ({ filters }),@@ -223,13 +215,8 @@ export const actionsLogic = kea<actionsLogicType>([actionsList: [(s) => [s.actionsResponse], (response: ActionsResponse): ActionType[] => response.results],actionCount: [(s) => [s.actionsResponse], (response: ActionsResponse): number => response.count],apiParams: [- (s) => [s.searchTerm, s.filters, s.page, s.featureFlags],- (- searchTerm: string,- filters: ActionsFilters,- page: number,- featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet- ): string => {+ (s) => [s.searchTerm, s.filters, s.page],+ (searchTerm: string, filters: ActionsFilters, page: number): string => {const params: Record<string, any> = {limit: ACTIONS_PER_PAGE,offset: (page - 1) * ACTIONS_PER_PAGE,@@ -245,9 +232,6 @@ export const actionsLogic = kea<actionsLogicType>([if (filters.tags.length > 0) {params.tags = JSON.stringify(filters.tags)}- if (featureFlags[FEATURE_FLAGS.ACTION_REFERENCE_COUNT]) {- params.include_reference_count = 1- }return toParams(params)},],