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(frontend): keep kea-test-utils off the authenticated shell (#126880)

Paul D'Ambra2d73c3a580a4
diff --git a/frontend/bin/check-eager-graph.mjs b/frontend/bin/check-eager-graph.mjs
index 6bc2016b85ea..7ca513c77e4c 100644
--- a/frontend/bin/check-eager-graph.mjs
+++ b/frontend/bin/check-eager-graph.mjs
@@ -97,6 +97,8 @@ const ROOTS = [
'src/lib/logic/billing/billingLogic.tsx',
// Product setup statuses need a logged-in team, so AuthenticatedShell mounts the preload.
'src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts',
+ // See the authenticated shell's note: a test library never ships on a boot path.
+ 'node_modules/kea-test-utils/',
],
},
{
@@ -107,6 +109,9 @@ const ROOTS = [
forbidden: [
'node_modules/monaco-editor/',
'products/product_analytics/frontend/insights/activityDescriptions',
+ // A test library. Its expectLogic and jest matchers ship with any import, so use
+ // objectsEqual from lib/utils/objects and delay from lib/utils/async instead.
+ 'node_modules/kea-test-utils/',
// Widget previews render product UI (recordings player, error tracking list, logs) and
// are only needed by the add-widget modal; the recordings player logic pulls in rrweb.
{
diff --git a/frontend/src/layout/navigation-3000/sidepanel/sidePanelContextLogic.ts b/frontend/src/layout/navigation-3000/sidepanel/sidePanelContextLogic.ts
index 3a4b3c697494..a68491742b52 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/sidePanelContextLogic.ts
+++ b/frontend/src/layout/navigation-3000/sidepanel/sidePanelContextLogic.ts
@@ -1,8 +1,8 @@
import { MakeLogicType, connect, kea, path, selectors } from 'kea'
import { router } from 'kea-router'
-import { objectsEqual } from 'kea-test-utils'
import { removeProjectIdIfPresent } from 'lib/utils/kea-router'
+import { objectsEqual } from 'lib/utils/objects'
import { sceneLogic } from 'scenes/sceneLogic'
import { SceneConfig } from 'scenes/sceneTypes'