: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
perf(frontend): keep two shell imports below the feature layer (#126765)
Paul D'Ambra762afdfc06fd
diff --git a/frontend/bin/layer-baseline.txt b/frontend/bin/layer-baseline.txtindex 588e30b4bc22..bdc3f28ddcd4 100644--- a/frontend/bin/layer-baseline.txt+++ b/frontend/bin/layer-baseline.txt@@ -6,7 +6,6 @@frontend/src/layout/ErrorProjectUnavailable.tsx -> frontend/src/scenes/organization/CreateOrganizationModal.tsxfrontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/authentication/two-factor-setup/TwoFactorSetupModal.tsxfrontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/billing/PaymentEntryModal.tsx-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/max/components/MaybePhaiOnboarding.tsxfrontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/organization/CreateOrganizationModal.tsxfrontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/project/CreateProjectModal.tsxfrontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts@@ -16,31 +15,20 @@ frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/themes/PreviewingCusfrontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/welcome/WelcomeDialog.tsxfrontend/src/layout/GlobalModals.tsx -> products/conversations/frontend/components/ComposeTicket/composeTicketLogic.tsfrontend/src/layout/GlobalModals.tsx -> products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic.ts-frontend/src/layout/GlobalModals.tsx -> products/tracing/frontend/components/TraceDialog/traceDialogLogic.tsfrontend/src/layout/InternalFeedback/InternalFeedbackWidget.tsx -> frontend/src/toolbar/shared/product-tours/ElementHighlight.tsxfrontend/src/layout/InternalFeedback/internalFeedbackLogic.ts -> frontend/src/toolbar/shared/utils.tsfrontend/src/layout/navigation-3000/Navigation.tsx -> frontend/src/scenes/max/maxGlobalLogic.tsx-frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/accessControlsLogic.ts -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/layout/navigation-3000/sidepanel/panels/access_control/accessControlLogic.ts -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/layout/navigation-3000/sidepanel/panels/access_control/roleAccessControlLogic.ts -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/layout/navigation-3000/sidepanel/panels/activity/quill/QuillActivityMemberFilter.tsx -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/layout/navigation-3000/sidepanel/panels/activity/quill/QuillActivitySubscribeMenu.tsx -> frontend/src/scenes/hog-functions/sub-templates/sub-templates.tsfrontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx -> products/notifications/frontend/resourceEditedLogic.tsfrontend/src/layout/navigation-3000/sidepanel/panels/max/SidePanelMax.tsx -> frontend/src/scenes/max/maxLogic.tsx-frontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx -> frontend/src/scenes/billing/billingLogic.tsxfrontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx -> products/conversations/frontend/components/SidePanel/SidePanelTickets.tsxfrontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx -> products/conversations/frontend/components/SidePanel/sidepanelTicketsLogic.ts-frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/layout/navigation-3000/sidepanel/sidePanelTabs.tsx -> products/conversations/frontend/components/SidePanel/SidePanelSupportIcon.tsx-frontend/src/layout/navigation/Breadcrumbs/breadcrumbsLogic.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsx-frontend/src/layout/navigation/ImpersonationNotice/impersonationNoticeLogic.ts -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/activity/live/liveEventsLogic.tsxfrontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/authentication/verify-email/verifyEmailLogic.tsfrontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/billing/billingLogic.tsxfrontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/insights/EmptyStates/sampleDataStateLogic.ts-frontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/settings/organization/inviteLogic.tsfrontend/src/layout/navigation/projectNoticeLogic.tsx -> frontend/src/scenes/welcome/productBranding.tsfrontend/src/layout/panel-layout/DatabaseTree/DatabaseTree.tsx -> frontend/src/scenes/data-warehouse/editor/ConnectionSelector.tsx@@ -65,15 +53,12 @@ frontend/src/layout/panel-layout/navbar/tabs/NavTabChat.tsx -> products/posthog_frontend/src/layout/panel-layout/navbar/tabs/NavTabChat.tsx -> products/posthog_ai/frontend/api/primitives.tsfrontend/src/layout/panel-layout/navbar/tabs/navProductItems.ts -> frontend/src/scenes/data-management/definitionsSceneTabsLogic.tsxfrontend/src/layout/panel-layout/navbar/tabs/navProductItems.ts -> frontend/src/scenes/onboarding/welcome/welcomeNavItem.ts-frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts -> frontend/src/scenes/settings/organization/aiConsentLogic.tsfrontend/src/layout/scenes/components/SceneTitlePanelButton.tsx -> frontend/src/scenes/max/useMaxTool.tsfrontend/src/layout/scenes/components/SceneTitleSection.tsx -> frontend/src/scenes/max/components/AnimatedSparkles.tsxfrontend/src/layout/today/TodayAiPanel.tsx -> frontend/src/scenes/max/components/PhaiSidePanelChat.tsxfrontend/src/layout/today/TodayAiPanel.tsx -> frontend/src/scenes/max/maxGlobalLogic.tsxfrontend/src/layout/today/TodayAiPanel.tsx -> frontend/src/scenes/max/maxLogic.tsx-frontend/src/layout/today/TodayAiPanel.tsx -> products/signals/frontend/inbox/inboxTaskKickoffLogic.ts-frontend/src/layout/today/TodayAiPanel.tsx -> products/signals/frontend/inbox/logics/scoutAiLogic.tsfrontend/src/layout/today/TodayAnalyticsSidebar.tsx -> frontend/src/scenes/analytics/AnalyticsPinButton.tsxfrontend/src/layout/today/TodayAnalyticsSidebar.tsx -> frontend/src/scenes/analytics/AnalyticsSpaceGlyph.tsxfrontend/src/layout/today/TodayAnalyticsSidebar.tsx -> frontend/src/scenes/analytics/AnalyticsTypeIcon.tsx@@ -91,26 +76,21 @@ frontend/src/layout/today/TodayProductsAnalyticsHint.tsx -> frontend/src/scenes/frontend/src/layout/today/TodayProductsAnalyticsHint.tsx -> frontend/src/scenes/analytics/analyticsUtils.tsfrontend/src/layout/today/TodaySessionBadges.tsx -> products/tasks/frontend/spaces/TaskPullRequestChip.tsxfrontend/src/layout/today/TodaySessionBadges.tsx -> products/tasks/frontend/spaces/TaskUserAvatar.tsx-frontend/src/layout/today/TodaySessionHandoffDialog.tsx -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/layout/today/TodaySessionHoverCard.tsx -> products/tasks/frontend/spaces/TaskPullRequestChip.tsxfrontend/src/layout/today/TodaySessionHoverCard.tsx -> products/tasks/frontend/spaces/TaskUserAvatar.tsxfrontend/src/layout/today/TodaySessionRow.tsx -> products/posthog_ai/frontend/api/logics.tsfrontend/src/layout/today/TodaySettingsSidebar.tsx -> frontend/src/scenes/settings/settingsLogic.tsfrontend/src/layout/today/TodaySettingsSidebar.tsx -> frontend/src/scenes/settings/settingsNavTree.tsfrontend/src/layout/today/TodaySettingsSidebar.tsx -> frontend/src/scenes/settings/types.ts-frontend/src/layout/today/TodaySupportPanel.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/layout/today/TodaySupportPanel.tsx -> frontend/src/scenes/billing/billingLogic.tsxfrontend/src/layout/today/TodaySupportPanel.tsx -> products/conversations/frontend/components/QuillSidePanel/QuillSupportTickets.tsxfrontend/src/layout/today/TodaySupportPanel.tsx -> products/conversations/frontend/components/SidePanel/sidepanelTicketsLogic.tsfrontend/src/layout/today/TodaySupportResponseTimes.tsx -> frontend/src/scenes/billing/billingLogic.tsx-frontend/src/layout/today/todayAiChatLogic.ts -> frontend/src/scenes/max/components/PhaiSidePanelChat.tsxfrontend/src/layout/today/todayAiChatLogic.ts -> frontend/src/scenes/max/mainFocusUrl.tsfrontend/src/layout/today/todayAiChatLogic.ts -> frontend/src/scenes/max/maxGlobalLogic.tsxfrontend/src/layout/today/todayAiChatLogic.ts -> frontend/src/scenes/max/maxLogic.tsxfrontend/src/layout/today/todayAiChatLogic.ts -> products/posthog_ai/frontend/api/logics.tsfrontend/src/layout/today/todayAiChatLogic.ts -> products/posthog_ai/frontend/logics/attachedContextLogic.ts-frontend/src/layout/today/todayAiChatLogic.ts -> products/signals/frontend/inbox/inboxTaskKickoffLogic.ts-frontend/src/layout/today/todayAiChatLogic.ts -> products/signals/frontend/inbox/logics/scoutAiLogic.tsfrontend/src/layout/today/todayAnalyticsLogic.ts -> frontend/src/scenes/analytics/analyticsPinnedLogic.tsfrontend/src/layout/today/todayAnalyticsLogic.ts -> frontend/src/scenes/analytics/analyticsUtils.tsfrontend/src/layout/today/todayContextPanelLogic.ts -> frontend/src/scenes/notebooks/NotebookPanel/notebookPanelLogic.ts@@ -125,7 +105,6 @@ frontend/src/layout/today/todayObjectGlances.ts -> products/feature_flags/frontefrontend/src/layout/today/todayOrgMenuLogic.ts -> frontend/src/scenes/billing/billingLogic.tsxfrontend/src/layout/today/todayOrgMenuLogic.ts -> frontend/src/scenes/settings/organization/inviteLogic.tsfrontend/src/layout/today/todayPaneSearch.ts -> frontend/src/scenes/analytics/analyticsUtils.ts-frontend/src/layout/today/todayPanelChatSessionLogic.ts -> frontend/src/scenes/max/components/PhaiSidePanelChat.tsxfrontend/src/layout/today/todayPanelChatSessionLogic.ts -> products/posthog_ai/frontend/api/logics.tsfrontend/src/layout/today/todayPanelTaskLogic.ts -> products/posthog_ai/frontend/api/logics.tsfrontend/src/layout/today/todayPreviewCards.ts -> frontend/src/scenes/library/libraryUtils.ts@@ -197,7 +176,6 @@ frontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts -> frontefrontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts -> frontend/src/scenes/dashboard/newDashboardLogic.tsfrontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts -> frontend/src/scenes/insights/insightLogic.tsxfrontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts -> frontend/src/scenes/insights/sharedUtils.ts-frontend/src/lib/components/AgentPromptButton/AgentPromptButton.tsx -> frontend/src/scenes/max/maxGlobalLogic.tsxfrontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.ts -> frontend/src/scenes/health/healthCategories.tsxfrontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.ts -> frontend/src/scenes/hog-functions/configuration/sampleGlobalsContexts.tsfrontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.ts -> frontend/src/scenes/hog-functions/sub-templates/sub-templates.ts@@ -276,10 +254,7 @@ frontend/src/lib/components/ChartFilter/ChartFilter.tsx -> frontend/src/scenes/ifrontend/src/lib/components/ChartFilter/ChartFilter.tsx -> frontend/src/scenes/insights/utils/queryUtils.tsfrontend/src/lib/components/ChartFilter/ChartFilter.tsx -> products/product_analytics/frontend/insights/chartAlternatives/ChartDisplayIcon.tsxfrontend/src/lib/components/ChartFilter/ChartFilter.tsx -> products/product_analytics/frontend/insights/chartAlternatives/chartDisplayOptions.ts-frontend/src/lib/components/CommandKSearch/commandKSearchLogic.tsx -> frontend/src/scenes/max/components/PhaiSidePanelChat.tsx-frontend/src/lib/components/CommandKSearch/commandKSearchLogic.tsx -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/lib/components/CommandKSearch/commandKSearchLogic.tsx -> products/posthog_ai/frontend/api/logics.ts-frontend/src/lib/components/Comments/commentsLogic.ts -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/lib/components/CyclotronJob/CyclotronJobInputs.tsx -> frontend/src/scenes/hog-functions/email-templater/EmailTemplater.tsxfrontend/src/lib/components/CyclotronJob/CyclotronJobInputsValidation.ts -> frontend/src/scenes/hog-functions/email-templater/types.tsfrontend/src/lib/components/CyclotronJob/integrations/integrationSetups.tsx -> frontend/src/scenes/integrations/aws-s3/AwsS3SetupModal.tsx@@ -315,7 +290,6 @@ frontend/src/lib/components/FlagCalledRebuildBanner/flagCalledDependencies.ts ->frontend/src/lib/components/FlagCalledRebuildBanner/flagCalledDependencies.ts -> frontend/src/scenes/feature-flags/flagEvaluationsTable.tsfrontend/src/lib/components/FlagCalledRebuildBanner/flagCalledRebuildBannerLogic.ts -> frontend/src/scenes/feature-flags/flagEvaluationsTable.tsfrontend/src/lib/components/HedgehogMode/HedgehogMode.tsx -> frontend/src/toolbar/shared/toolbarConfigLogic.ts-frontend/src/lib/components/HedgehogMode/hedgehogModeLogic.ts -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/lib/components/HedgehogMode/hedgehogModeLogic.ts -> frontend/src/toolbar/shared/toolbarConfigLogic.tsfrontend/src/lib/components/HedgehogMode/hedgehogModeLogic.ts -> frontend/src/toolbar/shared/toolbarFetch.tsfrontend/src/lib/components/HelpMenu/HelpMenu.tsx -> frontend/src/scenes/billing/billingLogic.tsx@@ -345,13 +319,7 @@ frontend/src/lib/components/IntervalFilter/IntervalFilter.tsx -> frontend/src/scfrontend/src/lib/components/JSSnippet.tsx -> docs/onboarding/product-analytics/index.tsfrontend/src/lib/components/JSSnippet.tsx -> frontend/src/scenes/settings/environment/proxyLogic.tsfrontend/src/lib/components/LiveUserCount/liveUserCountLogic.ts -> frontend/src/queries/utils.ts-frontend/src/lib/components/MemberMultiSelect.tsx -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/lib/components/MemberSelect.tsx -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/lib/components/MemberSelectMultiple.tsx -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/lib/components/MemberSelectMultipleOptions.tsx -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/lib/components/MemberSelectMultiplePopover.tsx -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/lib/components/Metalytics/metalyticsLogic.ts -> frontend/src/queries/utils.ts-frontend/src/lib/components/Metalytics/metalyticsLogic.ts -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/lib/components/NotFound/index.tsx -> frontend/src/scenes/activity/explore/defaults.tsfrontend/src/lib/components/NotFound/index.tsx -> frontend/src/scenes/notebooks/Nodes/NotebookNodeContext.tsfrontend/src/lib/components/PathCleanFilters/PathRegexModal.tsx -> frontend/src/scenes/session-recordings/components/AiRegexHelper/AiRegexHelper.tsx@@ -365,7 +333,6 @@ frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx -> products/persfrontend/src/lib/components/PropertyFilters/PropertyFilters.tsx -> frontend/src/scenes/cohorts/CohortFilters/CohortCriteriaRowBuilder.tsxfrontend/src/lib/components/PropertyFilters/components/GroupKeyFilterTooltip.tsx -> products/persons/frontend/components/GroupActorDisplay.tsxfrontend/src/lib/components/PropertyFilters/components/GroupKeySelect.tsx -> products/persons/frontend/components/GroupActorDisplay.tsx-frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.tsx -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx -> products/error_tracking/frontend/components/Assignee/AssigneeDisplay.tsxfrontend/src/lib/components/PropertyFilters/components/PropertyValue.tsx -> products/error_tracking/frontend/components/Assignee/AssigneeSelect.tsxfrontend/src/lib/components/PropertyFilters/components/TaxonomicPropertyFilter.tsx -> products/cohorts/frontend/realtime/CohortRealtimeTag.tsx@@ -377,8 +344,6 @@ frontend/src/lib/components/PropertyKeyInfo.tsx -> frontend/src/scenes/surveys/sfrontend/src/lib/components/QuickFilters/quickFiltersLogic.ts -> frontend/src/exporter/exporterViewLogic.tsfrontend/src/lib/components/ResultMenu/ResultMenu.tsx -> frontend/src/scenes/insights/utils.tsxfrontend/src/lib/components/ReverseProxyChecker/reverseProxyCheckerLogic.ts -> frontend/src/queries/utils.ts-frontend/src/lib/components/RichContentEditor/MentionsExtension.tsx -> frontend/src/scenes/organization/membersLogic.tsx-frontend/src/lib/components/RichContentEditor/RichContentNodeMention.tsx -> frontend/src/scenes/organization/membersLogic.tsxfrontend/src/lib/components/SaveToCohortModalContent/saveToCohortModalContentLogic.ts -> frontend/src/scenes/cohorts/cohortEditLogic.tsfrontend/src/lib/components/SaveToCohortModalContent/saveToCohortModalContentLogic.ts -> frontend/src/scenes/cohorts/cohortSavedToast.tsfrontend/src/lib/components/Scenes/InsightOrDashboard/SceneAddToNotebookDropdownMenu.tsx -> frontend/src/scenes/notebooks/types.ts@@ -412,7 +377,6 @@ frontend/src/lib/components/SmoothingFilter/SmoothingFilter.tsx -> frontend/src/frontend/src/lib/components/SmoothingFilter/SmoothingFilter.tsx -> frontend/src/scenes/insights/insightVizDataLogic.tsfrontend/src/lib/components/SmoothingFilter/SmoothingFilter.tsx -> products/product_analytics/frontend/insights/trends/trendsDataLogic.tsfrontend/src/lib/components/SocialLoginButton/SocialLoginButton.tsx -> frontend/src/scenes/authentication/shared/passkeyLogic.ts-frontend/src/lib/components/Superpowers/Superpowers.tsx -> frontend/src/scenes/max/maxGlobalLogic.tsxfrontend/src/lib/components/Superpowers/buildFakeBillingAlert.ts -> frontend/src/scenes/billing/billing-utils.tsfrontend/src/lib/components/SurveyResponseDisplay/SurveyResponseDisplay.tsx -> frontend/src/scenes/surveys/hooks/useSurveyResponseColumns.tsxfrontend/src/lib/components/SurveyResponseDisplay/SurveyResponseDisplay.tsx -> frontend/src/scenes/surveys/surveyLogic.tsx@@ -462,18 +426,14 @@ frontend/src/lib/lemon-ui/LemonColor/LemonColorButton.tsx -> frontend/src/lib/lofrontend/src/lib/lemon-ui/LemonColor/LemonColorGlyph.tsx -> frontend/src/lib/logic/dataThemeLogic.tsxfrontend/src/lib/lemon-ui/LemonColor/LemonColorGlyph.tsx -> frontend/src/lib/logic/themeLogic.tsfrontend/src/lib/lemon-ui/LemonColor/LemonColorPicker.tsx -> frontend/src/lib/logic/dataThemeLogic.tsx-frontend/src/lib/lemon-ui/LemonDrawer/LemonDrawer.tsx -> frontend/src/lib/components/KeyboardShortcut/KeyboardShortcut.tsxfrontend/src/lib/lemon-ui/LemonDrawer/LemonDrawer.tsx -> frontend/src/lib/components/Resizer/Resizer.tsxfrontend/src/lib/lemon-ui/LemonDrawer/LemonDrawer.tsx -> frontend/src/lib/components/Resizer/resizerLogic.tsfrontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx -> frontend/src/lib/components/AutoSizer/index.ts-frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx -> frontend/src/lib/components/KeyboardShortcut/KeyboardShortcut.tsxfrontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.tsx -> frontend/src/lib/components/CodeSnippet/index.tsfrontend/src/lib/lemon-ui/LemonMarkdown/LemonMarkdown.tsx -> frontend/src/lib/components/RichContentEditor/RichContentNodeMention.tsxfrontend/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram.tsx -> frontend/src/lib/components/CodeSnippet/index.tsfrontend/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram.tsx -> frontend/src/lib/logic/themeLogic.tsfrontend/src/lib/lemon-ui/LemonMarkdown/mention.ts -> frontend/src/lib/components/RichContentEditor/types.ts-frontend/src/lib/lemon-ui/LemonMenu/LemonMenu.tsx -> frontend/src/lib/components/KeyboardShortcut/KeyboardShortcut.tsx-frontend/src/lib/lemon-ui/LemonModal/LemonModal.tsx -> frontend/src/lib/components/KeyboardShortcut/KeyboardShortcut.tsxfrontend/src/lib/lemon-ui/LemonRichContent/LemonRichContentEditor.tsx -> frontend/src/lib/components/Cards/TextCard/TextCard.tsxfrontend/src/lib/lemon-ui/LemonRichContent/LemonRichContentEditor.tsx -> frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsxfrontend/src/lib/lemon-ui/LemonRichContent/LemonRichContentEditor.tsx -> frontend/src/lib/components/RichContentEditor/CommandEnterExtension.tsx@@ -489,8 +449,6 @@ frontend/src/lib/lemon-ui/LemonTable/columnUtils.tsx -> frontend/src/lib/componefrontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx -> frontend/src/lib/components/Cards/TextCard/TextCard.tsxfrontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx -> frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsxfrontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx -> frontend/src/lib/logic/preflightLogic.tsx-frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx -> frontend/src/lib/components/HelpMenu/incidentStatus.ts-frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx -> frontend/src/lib/holidays.tsxfrontend/src/lib/lemon-ui/LemonTree/LemonTree.tsx -> frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsxfrontend/src/lib/lemon-ui/Link/Link.tsx -> frontend/src/scenes/urls.tsfrontend/src/lib/lemon-ui/Popover/Popover.tsx -> frontend/src/lib/components/ScrollableShadows/ScrollableShadows.tsx@@ -628,13 +586,11 @@ frontend/src/queries/nodes/DataVisualization/dataVisualizationLogic.ts -> producfrontend/src/queries/nodes/DataVisualization/eventColumnLabels.ts -> frontend/src/scenes/insights/utils.tsxfrontend/src/queries/nodes/EventsNode/EventName.tsx -> products/actions/frontend/components/EventName.tsxfrontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx -> frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsSceneLogic.ts-frontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx -> frontend/src/scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic.tsxfrontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx -> frontend/src/scenes/data-warehouse/saved_queries/savedQueryNameValidation.tsfrontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx -> frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsSceneLogic.tsfrontend/src/queries/nodes/HogQLX/render.tsx -> products/mcp_analytics/frontend/components/BrandMarkLabel.tsxfrontend/src/queries/nodes/InsightQuery/defaults.ts -> products/product_analytics/frontend/insights/journeys/stepSourcePresets.ts-frontend/src/queries/nodes/InsightViz/ComputationTimeWithRefresh.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/queries/nodes/InsightViz/ComputationTimeWithRefresh.tsx -> frontend/src/scenes/insights/insightDataLogic.tsxfrontend/src/queries/nodes/InsightViz/ComputationTimeWithRefresh.tsx -> frontend/src/scenes/insights/insightLogic.tsxfrontend/src/queries/nodes/InsightViz/FlagCallsRetentionNotice.tsx -> frontend/src/scenes/feature-flags/flagEvaluationsTable.ts@@ -696,14 +652,10 @@ frontend/src/queries/query.ts -> frontend/src/exporter/exporterViewLogic.tsfrontend/src/scenes/AuthenticatedShell.tsx -> frontend/src/scenes/billing/billingLogic.tsxfrontend/src/scenes/AuthenticatedShell.tsx -> frontend/src/scenes/onboarding/shared/wizard-sync/WizardHandoffDialog.tsxfrontend/src/scenes/AuthenticatedShell.tsx -> frontend/src/scenes/onboarding/shared/wizard-sync/WizardSyncDebugPanel.tsx-frontend/src/scenes/AuthenticatedShell.tsx -> frontend/src/scenes/onboarding/shared/wizard-sync/WizardSyncFab.tsxfrontend/src/scenes/AuthenticatedShell.tsx -> products/webmcp/frontend/logics/webmcpLogic.ts-frontend/src/scenes/AuthenticatedShell.tsx -> products/wizard/frontend/runs/WizardRunSyncFab.tsx-frontend/src/scenes/appLogic.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/scenes/appScenes.ts -> frontend/src/scenes/project-homepage/importProjectHomepage.tsfrontend/src/scenes/bootApp.ts -> frontend/src/scenes/notebooks/AddToNotebook/registerNotebookLinkDrag.tsfrontend/src/scenes/sceneLogic.tsx -> frontend/src/exporter/exporterViewLogic.ts-frontend/src/scenes/sceneLogic.tsx -> frontend/src/scenes/PreflightCheck/preflightLogic.tsxfrontend/src/scenes/sceneLogic.tsx -> frontend/src/scenes/authentication/auth/loginLogic.tsfrontend/src/scenes/sceneLogic.tsx -> frontend/src/scenes/coupons/utils.tsfrontend/src/scenes/sceneLogic.tsx -> frontend/src/scenes/onboarding/onboardingDelegationState.tsdiff --git a/frontend/src/layout/GlobalModals.tsx b/frontend/src/layout/GlobalModals.tsxindex 41fa041c81eb..d86c8797df21 100644--- a/frontend/src/layout/GlobalModals.tsx+++ b/frontend/src/layout/GlobalModals.tsx@@ -11,6 +11,7 @@ import { superpowersLogic } from 'lib/components/Superpowers/superpowersLogic'import { TimeSensitiveAuthenticationModal } from 'lib/components/TimeSensitiveAuthentication/TimeSensitiveAuthentication'import { GlobalCustomUnitModal } from 'lib/components/UnitPicker/GlobalCustomUnitModal'import { UpgradeModal } from 'lib/components/UpgradeModal/UpgradeModal'+import { traceDialogOpenLogic } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import { useKeepMountedWhileOpen } from 'lib/hooks/useKeepMountedWhileOpen'import { lazyWithRetry } from 'lib/utils/retryImport'import { TwoFactorSetupModal } from 'scenes/authentication/two-factor-setup/TwoFactorSetupModal'@@ -25,7 +26,6 @@ import { MaybeWelcomeDialog } from 'scenes/welcome/WelcomeDialog'import { composeTicketLogic } from 'products/conversations/frontend/components/ComposeTicket/composeTicketLogic'import { logsViewerModalLogic } from 'products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic'-import { traceDialogOpenLogic } from 'products/tracing/frontend/components/TraceDialog/traceDialogOpenLogic'import { globalModalsLogic } from './globalModalsLogic'diff --git a/frontend/src/lib/components/PropertyFilters/components/PropertyFiltersDisplay.tsx b/frontend/src/lib/components/PropertyFilters/components/PropertyFiltersDisplay.tsxindex 04ce26fff140..75a16fe88e3c 100644--- a/frontend/src/lib/components/PropertyFilters/components/PropertyFiltersDisplay.tsx+++ b/frontend/src/lib/components/PropertyFilters/components/PropertyFiltersDisplay.tsx@@ -1,3 +1,5 @@+import '../PropertyFilters.scss'+import { AnyPropertyFilter } from '~/types'import { PropertyFilterButton } from './PropertyFilterButton'diff --git a/frontend/src/lib/components/Superpowers/Superpowers.tsx b/frontend/src/lib/components/Superpowers/Superpowers.tsxindex 694d3ab08481..931bd1143a60 100644--- a/frontend/src/lib/components/Superpowers/Superpowers.tsx+++ b/frontend/src/lib/components/Superpowers/Superpowers.tsx@@ -9,7 +9,6 @@ import { pngHoggie } from 'lib/brand/hoggies'import { LemonModal } from 'lib/lemon-ui/LemonModal'import { preflightLogic } from 'lib/logic/preflightLogic'import { organizationLogic } from 'scenes/organizationLogic'-import { aiConsentLogic } from 'scenes/settings/organization/aiConsentLogic'import { teamLogic } from 'scenes/teamLogic'import { userLogic } from 'scenes/userLogic'@@ -251,7 +250,7 @@ function SuperpowersContent(): JSX.Element {const { fakeStatusOverride, fakeBillingAlert, mcpHintsDismissed } = useValues(superpowersLogic)const { closeSuperpowers, setFakeStatusOverride, setFakeBillingAlert, reenableMCPHints } =useActions(superpowersLogic)- const { dataProcessingAccepted } = useValues(aiConsentLogic)+ const { currentOrganization } = useValues(organizationLogic)const { updateOrganization } = useActions(organizationLogic)const { isDev } = useValues(preflightLogic)@@ -399,7 +398,7 @@ function SuperpowersContent(): JSX.Element {description="Toggle organization-level AI data processing approval (dev only)"control={<LemonSwitch- checked={dataProcessingAccepted}+ checked={!!currentOrganization?.is_ai_data_processing_approved}onChange={(checked) => updateOrganization({ is_ai_data_processing_approved: checked })}/>}diff --git a/products/tracing/frontend/components/TraceDialog/traceDialogOpenLogic.ts b/frontend/src/lib/components/ViewTraceButton/traceDialogOpenLogic.tssimilarity index 68%rename from products/tracing/frontend/components/TraceDialog/traceDialogOpenLogic.tsrename to frontend/src/lib/components/ViewTraceButton/traceDialogOpenLogic.tsindex 47c0a436f939..981abee6dce3 100644--- a/products/tracing/frontend/components/TraceDialog/traceDialogOpenLogic.ts+++ b/frontend/src/lib/components/ViewTraceButton/traceDialogOpenLogic.ts@@ -2,15 +2,13 @@ import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reduimport { router } from 'kea-router'import type { LocationChangedPayload } from 'kea-router/lib/types'-import type { TraceLinkParams } from 'lib/components/ViewTraceButton/traceUrl'-import { usableId } from 'lib/components/ViewTraceButton/usableId'import { FEATURE_FLAGS } from 'lib/constants'import { type FeatureFlagsSet, featureFlagLogic } from 'lib/logic/featureFlagLogic'-import { sessionPlayerModalLogic } from 'scenes/session-recordings/player/modal/sessionPlayerModalLogic'import type { LogSeverityLevel } from '~/queries/schema/schema-general'-import { logsViewerModalLogic } from 'products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic'+import type { TraceLinkParams } from './traceUrl'+import { usableId } from './usableId'/** The log the dialog was opened from, shown above the tree so the reason for the trace stays in view. */export interface TraceDialogSource {@@ -55,23 +53,6 @@ export interface traceDialogOpenLogicValues {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface traceDialogOpenLogicActions {- openLogsViewerModal: (- options?:- | import('products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic').OpenLogsViewerModalOptions- | undefined- ) => {- fullScreen: boolean- id: string- initialFilters: Partial<- import('products/logs/frontend/components/LogsViewer/config/types').LogsViewerFilters- > | null- openedFrom:- | null- | import('products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic').LogsViewerModalOrigin- personId: string | null- pinnedFilters: null | import('~/types').UniversalFiltersGroup- sessionId: string | null- } // logsViewerModalLogiclocationChanged: ({method,pathname,@@ -93,17 +74,6 @@ export interface traceDialogOpenLogicActions {searchParams: Record<string, any>url: string} // router- openSessionPlayer: (- sessionRecording: Pick<import('~/types').SessionRecordingType, 'id' | 'matching_events'>,- initialTimestamp?: number | null | undefined,- modalContext?:- | import('scenes/session-recordings/player/modal/sessionPlayerModalLogic').SessionPlayerModalContext- | undefined- ) => {- initialTimestamp: number | null- modalContext: import('scenes/session-recordings/player/modal/sessionPlayerModalLogic').SessionPlayerModalContext- sessionRecording: Pick<import('~/types').SessionRecordingType, 'id' | 'matching_events'>- } // sessionPlayerModalLogiccloseTraceDialog: (reason?: TraceDialogCloseReason) => {reason: TraceDialogCloseReason}@@ -137,19 +107,12 @@ export type traceDialogOpenLogicType = MakeLogicType</*** Whether the trace dialog is open, and which trace it shows. Every logged-in page mounts this logic,- * so it must not import the trace view. traceDialogLogic loads the trace when the dialog mounts.+ * so it must not import feature code. traceDialogLogic loads the trace when the dialog mounts.*/export const traceDialogOpenLogic = kea<traceDialogOpenLogicType>([- path(['products', 'tracing', 'frontend', 'components', 'TraceDialog', 'traceDialogOpenLogic']),+ path(['lib', 'components', 'ViewTraceButton', 'traceDialogOpenLogic']),connect(() => ({- actions: [- router,- ['locationChanged'],- sessionPlayerModalLogic,- ['openSessionPlayer'],- logsViewerModalLogic,- ['openLogsViewerModal'],- ],+ actions: [router, ['locationChanged']],values: [featureFlagLogic, ['featureFlags']],})),actions({@@ -198,18 +161,6 @@ export const traceDialogOpenLogic = kea<traceDialogOpenLogicType>([],}),listeners(({ values, actions, cache }) => ({- // The player and the full-screen logs viewer are global modals that can sit below this one,- // so opening either from the inspector would put it behind the dialog.- openSessionPlayer: () => {- if (values.isOpen) {- actions.closeTraceDialog()- }- },- openLogsViewerModal: () => {- if (values.isOpen) {- actions.closeTraceDialog()- }- },locationChanged: ({ pathname }) => {// Query and hash changes fire locationChanged too, so only a new pathname closes the dialog.if (pathname === cache.lastPathname) {@@ -225,3 +176,13 @@ export const traceDialogOpenLogic = kea<traceDialogOpenLogicType>([cache.lastPathname = router.values.location.pathname}),])++/**+ * The session player and the full-screen logs viewer are global modals that render below the trace+ * dialog. Each one calls this when it opens, so it does not open hidden behind the dialog.+ */+export function closeTraceDialogUnderModal(): void {+ if (traceDialogOpenLogic.findMounted()?.values.isOpen) {+ traceDialogOpenLogic.actions.closeTraceDialog()+ }+}diff --git a/frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts b/frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.tsindex b8c3d14bc3bc..549125735414 100644--- a/frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts+++ b/frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts@@ -1,6 +1,8 @@-import { MakeLogicType, actions, kea, path, reducers } from 'kea'+import { MakeLogicType, actions, kea, listeners, path, reducers } from 'kea'import { actionToUrl, router, urlToAction } from 'kea-router'+import { closeTraceDialogUnderModal } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'+import { SessionRecordingId, SessionRecordingType } from '~/types'interface HashParams {@@ -85,6 +87,11 @@ export const sessionPlayerModalLogic = kea<sessionPlayerModalLogicType>([},],}),+ listeners(() => ({+ openSessionPlayer: () => {+ closeTraceDialogUnderModal()+ },+ })),actionToUrl(({ values }) => {const buildURL = (): [string,diff --git a/products/logs/frontend/components/LogsViewer/LogContextLinks/LogContextLinks.tsx b/products/logs/frontend/components/LogsViewer/LogContextLinks/LogContextLinks.tsxindex 1e56daa3da76..717e8176ffd2 100644--- a/products/logs/frontend/components/LogsViewer/LogContextLinks/LogContextLinks.tsx+++ b/products/logs/frontend/components/LogsViewer/LogContextLinks/LogContextLinks.tsx@@ -3,6 +3,7 @@ import { useValues } from 'kea'import { LemonTag } from '@posthog/lemon-ui'import ViewRecordingButton, { RecordingPlayerType } from 'lib/components/ViewRecordingButton/ViewRecordingButton'+import type { TraceDialogEntryPoint } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import { usableId } from 'lib/components/ViewTraceButton/usableId'import { ViewTraceButton } from 'lib/components/ViewTraceButton/ViewTraceButton'import { FEATURE_FLAGS } from 'lib/constants'@@ -16,7 +17,6 @@ import { logsConfigLogic } from 'products/logs/frontend/logsConfigLogic'import { ParsedLogMessage } from 'products/logs/frontend/types'import { getDistinctIdWithKey, getSessionIdFromLogAttributes } from 'products/logs/frontend/utils'import { PersonDisplay } from 'products/persons/frontend/components/PersonDisplay'-import type { TraceDialogEntryPoint } from 'products/tracing/frontend/components/TraceDialog/traceDialogOpenLogic'import { useOpenTraceDialog } from 'products/tracing/frontend/components/TraceDialog/useOpenTraceDialog'import { type ErrorScope } from 'products/tracing/frontend/errorCorrelation'diff --git a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx b/products/logs/frontend/components/LogsViewer/LogsViewer.tsxindex e18d13ea9388..779c0929e473 100644--- a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx+++ b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx@@ -4,6 +4,7 @@ import { useCallback, useEffect, useRef } from 'react'import { LemonDivider } from '@posthog/lemon-ui'import { TZLabelProps } from 'lib/components/TZLabel'+import { traceDialogOpenLogic } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import { useKeyboardHotkeys } from 'lib/hooks/useKeyboardHotkeys'import { UniversalFiltersGroup } from '~/types'@@ -22,7 +23,6 @@ import { logsExportLogic } from 'products/logs/frontend/components/LogsViewer/loimport { QueryFailedOverlay } from 'products/logs/frontend/components/QueryFailedOverlay'import { VirtualizedLogsList } from 'products/logs/frontend/components/VirtualizedLogsList/VirtualizedLogsList'import { virtualizedLogsListLogic } from 'products/logs/frontend/components/VirtualizedLogsList/virtualizedLogsListLogic'-import { traceDialogOpenLogic } from 'products/tracing/frontend/components/TraceDialog/traceDialogOpenLogic'import { LogDetailsModal } from './LogDetailsModal'import { logDetailsModalLogic } from './LogDetailsModal/logDetailsModalLogic'diff --git a/products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic.ts b/products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic.tsindex fc5178704d26..7bd2f5a34cfc 100644--- a/products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic.ts+++ b/products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic.ts@@ -2,6 +2,8 @@ import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reduimport { router } from 'kea-router'import type { LocationChangedPayload } from 'kea-router/lib/types'+import { closeTraceDialogUnderModal } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'+import { UniversalFiltersGroup } from '~/types'import { LogsViewerFilters, LogsViewerScope } from 'products/logs/frontend/components/LogsViewer/config/types'@@ -140,6 +142,9 @@ export const logsViewerModalLogic = kea<logsViewerModalLogicType>([],}),listeners(({ values, actions, cache }) => ({+ openLogsViewerModal: () => {+ closeTraceDialogUnderModal()+ },locationChanged: ({ pathname }) => {// close the (often full-screen) modal when navigating to a new scene, e.g. via cmd+k.// query/hash-only changes fire locationChanged too (the viewer syncs filters to thediff --git a/products/tracing/frontend/components/TraceDialog/TraceDialogSpanRow.tsx b/products/tracing/frontend/components/TraceDialog/TraceDialogSpanRow.tsxindex 4bfa6a1615ff..38fbe705a189 100644--- a/products/tracing/frontend/components/TraceDialog/TraceDialogSpanRow.tsx+++ b/products/tracing/frontend/components/TraceDialog/TraceDialogSpanRow.tsx@@ -4,6 +4,7 @@ import { IconChevronRight, IconWarning } from '@posthog/icons'import { LemonTag, Tooltip } from '@posthog/lemon-ui'import { getSeriesColor } from 'lib/colors'+import type { TraceDialogSource } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import { cn } from 'lib/utils/css-classes'import { humanFriendlyNumber } from 'lib/utils/numbers'@@ -12,7 +13,6 @@ import { formatDuration } from 'products/tracing/frontend/TraceWaterfallView'import type { TraceRunToggleMethod, TraceViewTimeline } from '../TraceView/traceViewLogic'import { LOG_MARK_TAG_TYPE, TraceDialogLogMark } from './TraceDialogLogMark'-import type { TraceDialogSource } from './traceDialogOpenLogic'import { summarizeRun, type TraceDialogRow } from './traceDialogRows'import { indentPx, MAX_VISUAL_DEPTH, TraceDialogTreeLines } from './TraceDialogTreeLines'diff --git a/products/tracing/frontend/components/TraceDialog/TraceDialogSpanTree.tsx b/products/tracing/frontend/components/TraceDialog/TraceDialogSpanTree.tsxindex 7a07f117bafb..78810bfe8574 100644--- a/products/tracing/frontend/components/TraceDialog/TraceDialogSpanTree.tsx+++ b/products/tracing/frontend/components/TraceDialog/TraceDialogSpanTree.tsx@@ -4,6 +4,7 @@ import { List, useListRef } from 'react-window'import { AutoSizer } from 'lib/components/AutoSizer'import { SizeProps } from 'lib/components/AutoSizer/AutoSizer'+import type { TraceDialogSource } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import { getTimelineTicks } from 'products/tracing/frontend/spanTree'import { formatDuration } from 'products/tracing/frontend/TraceWaterfallView'@@ -16,7 +17,6 @@ import {type TraceViewTimeline,} from '../TraceView/traceViewLogic'import { TraceDialogMoreSpansRow } from './TraceDialogMoreSpansRow'-import type { TraceDialogSource } from './traceDialogOpenLogic'import { rowSpanNode, type TraceDialogRow } from './traceDialogRows'import { TraceDialogSpanRow } from './TraceDialogSpanRow'diff --git a/products/tracing/frontend/components/TraceDialog/traceDialogLogic.test.ts b/products/tracing/frontend/components/TraceDialog/traceDialogLogic.test.tsindex 03b55e8b622b..5adbd3eddd5c 100644--- a/products/tracing/frontend/components/TraceDialog/traceDialogLogic.test.ts+++ b/products/tracing/frontend/components/TraceDialog/traceDialogLogic.test.ts@@ -3,6 +3,7 @@ import { expectLogic } from 'kea-test-utils'import posthog from 'posthog-js'import api from 'lib/api'+import { traceDialogOpenLogic } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import { FEATURE_FLAGS } from 'lib/constants'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { sessionPlayerModalLogic } from 'scenes/session-recordings/player/modal/sessionPlayerModalLogic'@@ -16,7 +17,6 @@ import type { Span } from 'products/tracing/frontend/types'import { traceViewLogic } from '../TraceView/traceViewLogic'import { TRACE_DIALOG_VIEW_ID, traceDialogLogic } from './traceDialogLogic'-import { traceDialogOpenLogic } from './traceDialogOpenLogic'type TracePage = Awaited<ReturnType<typeof api.tracing.getTrace>>@@ -254,9 +254,18 @@ describe('traceDialogLogic', () => {})it.each([- ['a recording opens', () => sessionPlayerModalLogic.actions.openSessionPlayer({ id: 'session-1' })],- ['the full-screen logs viewer opens', () => logsViewerModalLogic.actions.openLogsViewerModal()],- ])('closes when %s, since that modal sits behind the dialog', async (_name, open) => {+ [+ 'a recording opens',+ sessionPlayerModalLogic,+ () => sessionPlayerModalLogic.actions.openSessionPlayer({ id: 'session-1' }),+ ],+ [+ 'the full-screen logs viewer opens',+ logsViewerModalLogic,+ () => logsViewerModalLogic.actions.openLogsViewerModal(),+ ],+ ])('closes when %s, since that modal sits behind the dialog', async (_name, modalLogic, open) => {+ modalLogic.mount()logic.actions.openTraceDialog({ traceId: 'abc123' }, { entryPoint: 'log_details' })await expectLogic(logic, open).toMatchValues({ isOpen: false })diff --git a/products/tracing/frontend/components/TraceDialog/traceDialogLogic.ts b/products/tracing/frontend/components/TraceDialog/traceDialogLogic.tsindex 014fdf79d6f5..fe7a8ef271a1 100644--- a/products/tracing/frontend/components/TraceDialog/traceDialogLogic.ts+++ b/products/tracing/frontend/components/TraceDialog/traceDialogLogic.ts@@ -3,6 +3,12 @@ import { loaders } from 'kea-loaders'import posthog from 'posthog-js'import api from 'lib/api'+import {+ type TraceDialogCloseReason,+ type TraceDialogEntryPoint,+ type TraceDialogSource,+ traceDialogOpenLogic,+} from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import type { TraceLinkParams } from 'lib/components/ViewTraceButton/traceUrl'import { dayjs } from 'lib/dayjs'@@ -19,12 +25,6 @@ import { tracingCorrelationConfigLogic } from 'products/tracing/frontend/tracingimport type { Span, SpanInspectorTab, TraceViewMode } from 'products/tracing/frontend/types'import { traceViewLogic } from '../TraceView/traceViewLogic'-import {- type TraceDialogCloseReason,- type TraceDialogEntryPoint,- type TraceDialogSource,- traceDialogOpenLogic,-} from './traceDialogOpenLogic'// The trace endpoint pages at 2,000 spans, so this caps the dialog at 10,000. Bigger traces open in// Tracing, which pages in on scroll.@@ -91,7 +91,7 @@ export interface traceDialogLogicActions {} // traceDialogOpenLogicopenTraceDialog: (trace: TraceLinkParams,- options: import('./traceDialogOpenLogic').OpenTraceDialogOptions+ options: import('lib/components/ViewTraceButton/traceDialogOpenLogic').OpenTraceDialogOptions) => {entryPoint: TraceDialogEntryPointopenedFrom: TraceDialogSource | nulldiff --git a/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.test.tsx b/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.test.tsxindex ddda07c80594..067826729f78 100644--- a/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.test.tsx+++ b/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.test.tsx@@ -4,6 +4,7 @@ import { cleanup, fireEvent, render, screen } from '@testing-library/react'import { Provider } from 'kea'import { router } from 'kea-router'+import { traceDialogOpenLogic } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import { ViewTraceButton } from 'lib/components/ViewTraceButton/ViewTraceButton'import { FEATURE_FLAGS } from 'lib/constants'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'@@ -11,7 +12,6 @@ import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { initKeaTests } from '~/test/init'import { AccessControlLevel, AccessControlResourceType, AppContext } from '~/types'-import { traceDialogOpenLogic } from './traceDialogOpenLogic'import { useOpenTraceDialog } from './useOpenTraceDialog'function DialogTraceButton(): JSX.Element | null {diff --git a/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.ts b/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.tsindex afc80675ed11..93f2feccb7f3 100644--- a/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.ts+++ b/products/tracing/frontend/components/TraceDialog/useOpenTraceDialog.ts@@ -1,10 +1,9 @@import { useActions, useValues } from 'kea'import { type MouseEvent, useCallback } from 'react'+import { type OpenTraceDialogOptions, traceDialogOpenLogic } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import type { TraceLinkParams } from 'lib/components/ViewTraceButton/traceUrl'-import { type OpenTraceDialogOptions, traceDialogOpenLogic } from './traceDialogOpenLogic'-export type OpenTraceDialogHandler = (event: MouseEvent | null,trace: TraceLinkParams,diff --git a/products/tracing/frontend/components/TraceView/TraceView.tsx b/products/tracing/frontend/components/TraceView/TraceView.tsxindex 3fb666a94a3d..92d3a5438013 100644--- a/products/tracing/frontend/components/TraceView/TraceView.tsx+++ b/products/tracing/frontend/components/TraceView/TraceView.tsx@@ -5,6 +5,7 @@ import { LemonSegmentedButton, type LemonSegmentedButtonOption } from '@posthog/import { Resizer } from 'lib/components/Resizer/Resizer'import { type ResizerLogicProps, resizerLogic } from 'lib/components/Resizer/resizerLogic'+import type { TraceDialogSource } from 'lib/components/ViewTraceButton/traceDialogOpenLogic'import type { SpanTreeNode } from '~/queries/schema/schema-general'@@ -14,7 +15,6 @@ import type { ErrorScope } from 'products/tracing/frontend/errorCorrelation'import { TraceCompareFlame } from 'products/tracing/frontend/TraceCompareFlame'import type { SpanInspectorTab, TraceViewMode } from 'products/tracing/frontend/types'-import type { TraceDialogSource } from '../TraceDialog/traceDialogOpenLogic'import { TraceDialogSpanTree } from '../TraceDialog/TraceDialogSpanTree'import { TraceLoadMoreFooter } from './TraceLoadMoreFooter'import { type TraceOperationsScope, traceViewLogic, type TraceViewSurface } from './traceViewLogic'