: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
fix: Reload experiments when menu loads (#61402)
Luke Belton10f774cf343e
diff --git a/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx b/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsxindex 8d96d5b7b379..2ae832861bd3 100644--- a/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx+++ b/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx@@ -3,6 +3,7 @@ import { useActions, useValues } from 'kea'import { IconPlus } from '@posthog/icons'import { LemonBanner } from '@posthog/lemon-ui'+import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'import { IconOpenInNew } from 'lib/lemon-ui/icons'import { LemonButton } from 'lib/lemon-ui/LemonButton'import { LemonInput } from 'lib/lemon-ui/LemonInput'@@ -21,10 +22,12 @@ import { joinWithUiHost } from '~/toolbar/utils'const ExperimentsListToolbarMenu = (): JSX.Element => {const { searchTerm } = useValues(experimentsLogic)const { newExperiment } = useActions(experimentsTabLogic)- const { setSearchTerm } = useActions(experimentsLogic)+ const { setSearchTerm, getExperiments } = useActions(experimentsLogic)const { allExperiments, sortedExperiments, allExperimentsLoading } = useValues(experimentsLogic)const { uiHost } = useValues(toolbarConfigLogic)+ useOnMountEffect(getExperiments)+const isWebExperimentsDisabled = Boolean(window?.parent?.posthog?.config?.disable_web_experiments)return (