Skip to content

Commit 294b0a5

Browse files
chore(experiments): Clean up flags (#41894)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent cc9ccbe commit 294b0a5

File tree

8 files changed

+5
-34
lines changed

8 files changed

+5
-34
lines changed
3.8 KB
Loading
5.97 KB
Loading

frontend/src/lib/constants.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ export const FEATURE_FLAGS = {
298298
LLM_OBSERVABILITY_SHOW_INPUT_OUTPUT: 'llm-observability-show-input-output', // owner: #team-llm-analytics
299299
MAX_SESSION_SUMMARIZATION: 'max-session-summarization', // owner: #team-posthog-ai
300300
TASK_SUMMARIES: 'task-summaries', // owner: #team-llm-analytics
301-
EXPERIMENTS_RATIO_METRIC: 'experiments-ratio-metric', // owner: @andehen #team-experiments
302301
CDP_NEW_PRICING: 'cdp-new-pricing', // owner: #team-workflows
303302
IMPROVED_COOKIELESS_MODE: 'improved-cookieless-mode', // owner: @robbie-c #team-web-analytics
304303
LIVE_DEBUGGER: 'live-debugger', // owner: @marcecoll
@@ -317,7 +316,6 @@ export const FEATURE_FLAGS = {
317316
NOTEBOOKS_COLLAPSIBLE_SECTIONS: 'notebooks-collapsible-sections', // owner: @daibhin @benjackwhite
318317
QUERY_EXECUTION_DETAILS: 'query-execution-details', // owner: @sakce
319318
PASSWORD_PROTECTED_SHARES: 'password-protected-shares', // owner: @aspicer
320-
EXPERIMENT_TIMESERIES: 'experiment-timeseries', // owner: @jurajmajerik #team-experiments
321319
DASHBOARD_TILE_OVERRIDES: 'dashboard-tile-overrides', // owner: @gesh #team-product-analytics
322320
RECORDINGS_PLAYER_EVENT_PROPERTY_EXPANSION: 'recordings-player-event-property-expansion', // owner: @pauldambra #team-replay
323321
SCHEDULE_FEATURE_FLAG_VARIANTS_UPDATE: 'schedule-feature-flag-variants-update', // owner: @gustavo #team-feature-flags
@@ -327,7 +325,6 @@ export const FEATURE_FLAGS = {
327325
EXPERIMENTS_BREAKDOWN_FILTER: 'experiments-breakdown-filter', // owner: @rodrigoi #team-experiments
328326
TARGETED_PRODUCT_UPSELL: 'targeted-product-upsell', // owner: @raquelmsmith
329327
COHORT_CALCULATION_HISTORY: 'cohort-calculation-history', // owner: @gustavo #team-feature-flags
330-
EXPERIMENTS_HIDE_STOP_BUTTON: 'experiments-hide-stop-button', // owner: @jurajmajerik #team-experiments
331328
REPLAY_CLIENT_SIDE_DECOMPRESSION: 'replay-client-side-decompression', // owner: @pauldambra #team-replay
332329
REPLAY_DECOMPRESSION_WORKER: 'replay-decompression-worker', // owner: @pauldambra #team-replay
333330
EXPERIMENTS_USE_NEW_QUERY_BUILDER: 'experiments-use-new-query-builder', // owner: @andehen #team-experiments

frontend/src/scenes/experiments/ExperimentView/components.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
import { useHogfetti } from 'lib/components/Hogfetti/Hogfetti'
2424
import { InsightLabel } from 'lib/components/InsightLabel'
2525
import { PropertyFilterButton } from 'lib/components/PropertyFilters/components/PropertyFilterButton'
26-
import { FEATURE_FLAGS } from 'lib/constants'
2726
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
2827
import { LoadingBar } from 'lib/lemon-ui/LoadingBar'
2928
import { IconAreaChart } from 'lib/lemon-ui/icons'
@@ -412,7 +411,6 @@ export function PageHeaderCustom(): JSX.Element {
412411
legacyPrimaryMetricsResults,
413412
hasMinimumExposureForResults,
414413
experimentLoading,
415-
featureFlags,
416414
} = useValues(experimentLogic)
417415
const {
418416
launchExperiment,
@@ -442,9 +440,6 @@ export function PageHeaderCustom(): JSX.Element {
442440
hasMinimumExposureForResults &&
443441
(legacyPrimaryMetricsResults.length > 0 || primaryMetricsResults.length > 0)
444442

445-
const shouldShowStopButton =
446-
!isExperimentDraft && isExperimentRunning && featureFlags[FEATURE_FLAGS.EXPERIMENTS_HIDE_STOP_BUTTON] !== 'test'
447-
448443
return (
449444
<>
450445
<SceneTitleSection
@@ -484,17 +479,6 @@ export function PageHeaderCustom(): JSX.Element {
484479
)}
485480
{experiment && isExperimentRunning && (
486481
<div className="flex flex-row gap-2">
487-
{!experiment.end_date && shouldShowStopButton && (
488-
<LemonButton
489-
type="secondary"
490-
data-attr="stop-experiment"
491-
status="danger"
492-
onClick={() => openStopExperimentModal()}
493-
size="small"
494-
>
495-
Stop
496-
</LemonButton>
497-
)}
498482
{isExperimentStopped && (
499483
<LemonButton
500484
type="secondary"
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
1-
import { useValues } from 'kea'
2-
3-
import { FEATURE_FLAGS } from 'lib/constants'
41
import { LemonLabel } from 'lib/lemon-ui/LemonLabel'
52
import { ExperimentRecalculationTime } from 'scenes/settings/environment/ExperimentRecalculationTime'
63
import { OrganizationExperimentStatsMethod } from 'scenes/settings/organization/OrgExperimentStatsMethod'
74

8-
import { experimentLogic } from './experimentLogic'
9-
105
/**
116
* although this works fine for now, if we keep adding more settings we need to refactor this to use the
127
* <Settings /> component. That will require we create a new section for experiments on the SettingsMap.
138
*/
149
export function ExperimentsSettings(): JSX.Element {
15-
const { featureFlags } = useValues(experimentLogic)
16-
const timeseriesEnabled = featureFlags[FEATURE_FLAGS.EXPERIMENT_TIMESERIES]
17-
1810
return (
1911
<div className="space-y-8">
2012
<div>
@@ -25,7 +17,7 @@ export function ExperimentsSettings(): JSX.Element {
2517
</p>
2618
<OrganizationExperimentStatsMethod />
2719
</div>
28-
{timeseriesEnabled && <ExperimentRecalculationTime />}
20+
<ExperimentRecalculationTime />
2921
</div>
3022
)
3123
}

frontend/src/scenes/experiments/MetricsView/new/MetricRowGroup.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import './MetricRowGroup.scss'
22

3-
import { useActions, useValues } from 'kea'
3+
import { useActions } from 'kea'
44
import { useRef, useState } from 'react'
55
import { createPortal } from 'react-dom'
66

77
import { IconTrending } from '@posthog/icons'
88

9-
import { FEATURE_FLAGS } from 'lib/constants'
109
import { IconTrendingDown } from 'lib/lemon-ui/icons'
1110
import { humanFriendlyNumber } from 'lib/utils'
1211
import { VariantTag } from 'scenes/experiments/ExperimentView/components'
@@ -115,10 +114,9 @@ export function MetricRowGroup({
115114
const colors = useChartColors()
116115
const scale = useAxisScale(axisRange, VIEW_BOX_WIDTH, SVG_EDGE_MARGIN)
117116

118-
const { featureFlags } = useValues(experimentLogic)
119117
const { reportExperimentTimeseriesViewed } = useActions(experimentLogic)
120118

121-
const timeseriesEnabled = featureFlags[FEATURE_FLAGS.EXPERIMENT_TIMESERIES] && experiment.stats_config?.timeseries
119+
const timeseriesEnabled = experiment.stats_config?.timeseries
122120

123121
// Calculate total rows for loading/error states
124122
const totalRows = isLoading || error || !result ? 1 : 1 + (result.variant_results?.length || 0)

frontend/src/scenes/experiments/create/createExperimentLogic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export const createExperimentLogic = kea<createExperimentLogicType>([
323323
// Make experiment eligible for timeseries
324324
const statsConfig = {
325325
...values.experiment?.stats_config,
326-
...(values.featureFlags[FEATURE_FLAGS.EXPERIMENT_TIMESERIES] && { timeseries: true }),
326+
timeseries: true,
327327
...(values.featureFlags[FEATURE_FLAGS.EXPERIMENTS_USE_NEW_QUERY_BUILDER] && {
328328
use_new_query_builder: true,
329329
}),

frontend/src/scenes/experiments/experimentLogic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ export const experimentLogic = kea<experimentLogicType>([
971971
// Make experiment eligible for timeseries
972972
const statsConfig = {
973973
...values.experiment?.stats_config,
974-
...(values.featureFlags[FEATURE_FLAGS.EXPERIMENT_TIMESERIES] && { timeseries: true }),
974+
timeseries: true,
975975
...(values.featureFlags[FEATURE_FLAGS.EXPERIMENTS_USE_NEW_QUERY_BUILDER] && {
976976
use_new_query_builder: true,
977977
}),

0 commit comments

Comments
 (0)