Skip to content

: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.

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.tsx
index 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 list
ADVANCE_MARKETING_ANALYTICS_SETTINGS: 'advance-marketing-analytics-settings', // owner: @jabahamondes #team-web-analytics
AI_OBSERVABILITY_OFFLINE_EVALUATIONS: 'ai-observability-offline-evaluations', // owner: #team-ai-observability
AI_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 interval
ALERTS_DESTINATION_CUSTOMIZATION: 'alerts-destination-customization', // owner: #team-logs, gates the custom message tag and edit notice on logs alert destinations
ALERTS_INLINE_NOTIFICATIONS: 'alerts-inline-notifications', // owner: @vdekrijger
ALERTS_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-analytics
DASHBOARD_EXPORT_NUDGE: 'dashboard-export-nudge', // owner: #team-analytics-platform multivariate=control,test, nudges people who just exported a dashboard toward a recurring subscription
DASHBOARD_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,new
DASHBOARD_WIDGETS: 'dashboard-widgets', // owner: @mattp #team-analytics-platform
DATA_MODELING_INCREMENTAL_VIEWS: 'data-modeling-incremental-views', // owner: #team-data-modeling
DATA_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 page
INSIGHT_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,test
INTERNAL_FEEDBACK_WIDGET: 'internal-feedback-widget', // owner: @adamleithp, gates the staff UI feedback bar that posts to Slack
JS_SNIPPET_VERSIONING: 'js-snippet-versioning', // owner: #team-client-libraries
LEGACY_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-3
SLACK_DWH: 'slack-dwh', // owner: @MarconLP #team-warehouse-sources
SQL_EDITOR_BI_MODE: 'sql-editor-bi-mode', // owner: @mariusandra #team-data-tools
- SQL_EDITOR_LAZY_SCHEMA: 'sql-editor-lazy-schema', // owner: @mariusandra #team-data-tools
SQL_EDITOR_VIM_MODE: 'sql-editor-vim-mode', // owner: @arthurdedeus
SSE_DASHBOARDS: 'sse-dashboards', // owner: @aspicer #team-analytics-platform
SSO_SETTINGS_REDESIGN: 'sso-settings-redesign', // owner: @reecejones #team-platform-features
diff --git a/products/actions/frontend/components/ActionsTable.tsx b/products/actions/frontend/components/ActionsTable.tsx
index 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/MemberSelectMultiple
import { 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.ts
index 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 = 50
export 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 // featureFlagLogic
actionCount: number
actionsList: 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) => string
hasActiveFilters: (searchTerm: string, filters: ActionsFilters) => boolean
shouldShowEmptyState: (
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)
},
],