: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
refactor(frontend): de-key tracing and new-source scenes (#61995)
Paul D'Ambra037e32f81408
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsx b/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsxindex 3ab9fb801ee2..8d3e9df7d9f0 100644--- a/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsx+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.tsx@@ -17,7 +17,6 @@ import { AccessControlAction } from 'lib/components/AccessControlAction'import { useFloatingContainer } from 'lib/hooks/useFloatingContainerContext'import { LemonBanner } from 'lib/lemon-ui/LemonBanner'import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'-import { tabAwareScene } from 'lib/logic/scenes/tabAwareScene'import { useAttachedLogic } from 'lib/logic/scenes/useAttachedLogic'import { copyToClipboard } from 'lib/utils/copyToClipboard'import { nonHogFunctionTemplatesLogic } from 'scenes/data-pipelines/utils/nonHogFunctionTemplatesLogic'@@ -61,7 +60,6 @@ export interface NewSourceSceneLogicProps {export const newSourceSceneLogic = kea<newSourceSceneLogicType>([path(['products', 'dataWarehouse', 'newSourceSceneLogic']),props({} as NewSourceSceneLogicProps),- tabAwareScene(),connect(() => ({values: [availableSourcesLogic, ['availableSources', 'availableSourcesLoading']],})),diff --git a/products/tracing/frontend/TracingScene.tsx b/products/tracing/frontend/TracingScene.tsxindex 8616dffe13a4..29aa04d15a4c 100644--- a/products/tracing/frontend/TracingScene.tsx+++ b/products/tracing/frontend/TracingScene.tsx@@ -38,8 +38,7 @@ export const scene: SceneExport<TracingSceneLogicProps> = {export default function TracingScene(props: TracingSceneLogicProps = {}): JSX.Element {const sceneLogic = tracingSceneLogic(props)- // Keep filters + data logic alive across tab switches by attaching them to the scene- // root. The root itself is kept mounted by `tabAwareScene()` even when the tab is inactive.+ // Keep filters + data logic alive across React unmounts by attaching them to the scene root.useAttachedLogic(tracingFiltersLogic({ tabId: props.tabId }), sceneLogic)useAttachedLogic(tracingDataLogic({ tabId: props.tabId }), sceneLogic)diff --git a/products/tracing/frontend/tracingSceneLogic.ts b/products/tracing/frontend/tracingSceneLogic.tsindex 0d83d7a2cedb..7dc7a60912b4 100644--- a/products/tracing/frontend/tracingSceneLogic.ts+++ b/products/tracing/frontend/tracingSceneLogic.ts@@ -4,7 +4,6 @@ import { router, urlToAction } from 'kea-router'import posthog from 'posthog-js'import { DEFAULT_UNIVERSAL_GROUP_FILTER } from 'lib/components/UniversalFilters/universalFiltersLogic'-import { tabAwareScene } from 'lib/logic/scenes/tabAwareScene'import { trackedActionToUrl } from 'lib/logic/scenes/trackedActionToUrl'import { parseTagsFilter } from 'lib/utils'import { Params } from 'scenes/sceneTypes'@@ -23,7 +22,6 @@ export interface TracingSceneLogicProps {export const tracingSceneLogic = kea<tracingSceneLogicType>([props({} as TracingSceneLogicProps),path(['products', 'tracing', 'frontend', 'tracingSceneLogic']),- tabAwareScene(),connect((p: TracingSceneLogicProps) => ({values: [