: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(hedgehog): seed actor state with user config on spawn (#70745)
Rafael Audibert56d44bf25aab
diff --git a/frontend/src/lib/components/HedgehogMode/HedgehogMode.tsx b/frontend/src/lib/components/HedgehogMode/HedgehogMode.tsxindex cfb8abc3fc9b..cd41e5ddfcdb 100644--- a/frontend/src/lib/components/HedgehogMode/HedgehogMode.tsx+++ b/frontend/src/lib/components/HedgehogMode/HedgehogMode.tsx@@ -38,7 +38,7 @@ export type HedgehogModeProps = {}export function HedgehogMode({ enabledOverride }: HedgehogModeProps): JSX.Element | null {- const { hedgehogModeEnabled } = useValues(hedgehogModeLogic)+ const { hedgehogModeEnabled, hedgehogConfig } = useValues(hedgehogModeLogic)const { setHedgehogMode, setHedgehogModeEnabled, toggleHedgehogMode } = useActions(hedgehogModeLogic)const { isDarkModeOn } = useValues(themeLogic)@@ -46,6 +46,9 @@ export function HedgehogMode({ enabledOverride }: HedgehogModeProps): JSX.Elemenconst config: HedgehogModeConfig = {assetsUrl: getHedgehogModeAssetsUrl(),+ // Seed the actor so it spawns with the user's options (e.g. ai_enabled / "free to roam")+ // already applied, instead of defaulting to roaming until the first syncGame corrects it.+ state: { options: hedgehogConfig.actor_options },platforms: {selector:'.border, .border-t, .LemonButton--primary, .LemonButton--secondary:not(.LemonButton--status-alt:not(.LemonButton--active)), .LemonInput, .LemonSelect, .LemonTable, .LemonSwitch--bordered, .LemonBanner',