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(product-analytics): move the saved insights scene into the product (#115903)

Thomas Obermüllerb45105a1aa0c
diff --git a/common/storybook/storybook-timings.json b/common/storybook/storybook-timings.json
index c29163c82204..4bbf821f7908 100644
--- a/common/storybook/storybook-timings.json
+++ b/common/storybook/storybook-timings.json
@@ -1147,7 +1147,7 @@
"chromium": 12.572,
"webkit": 2.779
},
- "frontend/src/scenes/saved-insights/SavedInsights.stories.tsx": {
+ "products/product_analytics/frontend/insights/savedInsights/SavedInsights.stories.tsx": {
"chromium": 14.968,
"webkit": 3.172
},
diff --git a/frontend/src/lib/components/ActivityLog/describers.tsx b/frontend/src/lib/components/ActivityLog/describers.tsx
index a711b7f810f2..a774994a5b38 100644
--- a/frontend/src/lib/components/ActivityLog/describers.tsx
+++ b/frontend/src/lib/components/ActivityLog/describers.tsx
@@ -17,7 +17,6 @@ import { flagActivityDescriber } from 'scenes/feature-flags/activityDescriptions
import { hogFunctionActivityDescriber } from 'scenes/hog-functions/misc/activityDescriptions'
import { notebookActivityDescriber } from 'scenes/notebooks/Notebook/notebookActivityDescriber'
import { productTourActivityDescriber } from 'scenes/product-tours/activityDescriptions'
-import { insightActivityDescriber } from 'scenes/saved-insights/activityDescriptions'
import { replayActivityDescriber } from 'scenes/session-recordings/activityDescription'
import {
legalDocumentActivityDescriber,
@@ -46,6 +45,7 @@ import { externalDataSourceActivityDescriber } from 'products/data_warehouse/fro
import { endpointActivityDescriber } from 'products/endpoints/frontend/activityDescriber'
import { groupActivityDescriber } from 'products/groups/frontend/activityDescriptions'
import { personActivityDescriber } from 'products/persons/frontend/activityDescriptions'
+import { insightActivityDescriber } from 'products/product_analytics/frontend/insights/activityDescriptions'
import { signalScoutConfigActivityDescriber } from 'products/signals/frontend/activityDescriber'
import { stamphogRepoConfigActivityDescriber } from 'products/stamphog/frontend/activityDescriber'
import { workflowActivityDescriber } from 'products/workflows/frontend/Workflows/misc/workflowActivityDescriber'
diff --git a/frontend/src/lib/components/ActivityLog/humanizeActivity.test.tsx b/frontend/src/lib/components/ActivityLog/humanizeActivity.test.tsx
index 87ea6676f9f3..8493b205eb6e 100644
--- a/frontend/src/lib/components/ActivityLog/humanizeActivity.test.tsx
+++ b/frontend/src/lib/components/ActivityLog/humanizeActivity.test.tsx
@@ -12,13 +12,13 @@ import { cohortActivityDescriber } from 'scenes/cohorts/activityDescriptions'
import { dashboardActivityDescriber } from 'scenes/dashboard/dashboardActivityDescriber'
import { dataManagementActivityDescriber } from 'scenes/data-management/dataManagementDescribers'
import { notebookActivityDescriber } from 'scenes/notebooks/Notebook/notebookActivityDescriber'
-import { insightActivityDescriber } from 'scenes/saved-insights/activityDescriptions'
import { surveyActivityDescriber } from 'scenes/surveys/surveyActivityDescriber'
import { teamActivityDescriber } from 'scenes/team-activity/teamActivityDescriber'
import { ActivityScope } from '~/types'
import { actionActivityDescriber } from 'products/actions/frontend/actionActivityDescriber'
+import { insightActivityDescriber } from 'products/product_analytics/frontend/insights/activityDescriptions'
describe('humanizeActivity', () => {
const makeLogItem = (overrides: Partial<ActivityLogItem>): ActivityLogItem => ({
diff --git a/frontend/src/scenes/appScenes.ts b/frontend/src/scenes/appScenes.ts
index 220ef322d207..8573a44eced8 100644
--- a/frontend/src/scenes/appScenes.ts
+++ b/frontend/src/scenes/appScenes.ts
@@ -94,7 +94,7 @@ export const appScenes: Record<Scene | string, () => any> = {
[Scene.RealTimeUsage]: () => import('./real-time-usage/RealTimeUsage'),
[Scene.DashboardTemplateCopy]: () => import('./dashboard/dashboards/templates/DashboardTemplateCopyScene'),
[Scene.SQLEditor]: () => import('./data-warehouse/editor/EditorScene'),
- [Scene.SavedInsights]: () => import('./saved-insights/SavedInsights'),
+ [Scene.SavedInsights]: () => import('products/product_analytics/frontend/insights/savedInsights/SavedInsights'),
[Scene.WebScripts]: () => import('./data-pipelines/WebScriptsScene'),
[Scene.Health]: () => import('./health/HealthScene'),
[Scene.HealthCategoryDetail]: () => import('./health/categoryDetail/HealthCategoryDetailScene'),
diff --git a/frontend/src/scenes/insights/InsightSceneHeader.tsx b/frontend/src/scenes/insights/InsightSceneHeader.tsx
index 2c4a418bf609..64bf39322e7f 100644
--- a/frontend/src/scenes/insights/InsightSceneHeader.tsx
+++ b/frontend/src/scenes/insights/InsightSceneHeader.tsx
@@ -5,11 +5,12 @@ import { LemonBanner, LemonButton } from '@posthog/lemon-ui'
import { DebugCHQueries } from 'lib/components/Shortcuts/utils/DebugCHQueries'
import { insightLogic } from 'scenes/insights/insightLogic'
import { insightSceneLogic } from 'scenes/insights/insightSceneLogic'
-import { ReloadInsight } from 'scenes/saved-insights/ReloadInsight'
import { urls } from 'scenes/urls'
import { InsightShortId, InsightLogicProps, ItemMode } from '~/types'
+import { ReloadInsight } from 'products/product_analytics/frontend/insights/shared/ReloadInsight'
+
import { insightDataLogic } from './insightDataLogic'
import { InsightsNav } from './InsightNav/InsightsNav'
import { InsightPageHeader } from './InsightPageHeader'
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 92c8513d3931..ab518633d1e9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -4520,6 +4520,9 @@ importers:
'@storybook/react':
specifier: 'catalog:'
+ '@testing-library/jest-dom':
+ specifier: '*'
+ version: 5.17.0
'@testing-library/react':
specifier: '*'
diff --git a/products/product_analytics/frontend/emptyState/ProductAnalyticsPrimaryAction.tsx b/products/product_analytics/frontend/emptyState/ProductAnalyticsPrimaryAction.tsx
index d94b11059ea9..50efb5963bcc 100644
--- a/products/product_analytics/frontend/emptyState/ProductAnalyticsPrimaryAction.tsx
+++ b/products/product_analytics/frontend/emptyState/ProductAnalyticsPrimaryAction.tsx
@@ -3,10 +3,11 @@ import { useState } from 'react'
import { AccessControlAction } from 'lib/components/AccessControlAction'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { LemonModal } from 'lib/lemon-ui/LemonModal'
-import { NewInsightMenuContent } from 'scenes/saved-insights/NewInsightMenu'
import { AccessControlLevel, AccessControlResourceType } from '~/types'
+import { NewInsightMenuContent } from 'products/product_analytics/frontend/insights/newInsightMenu/NewInsightMenu'
+
/**
* Create button for the product analytics empty state. It offers the same insight
* types as the scene's own "New" button, in a modal rather than that button's
diff --git a/frontend/src/scenes/saved-insights/activityDescriptions.tsx b/products/product_analytics/frontend/insights/activityDescriptions.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/activityDescriptions.tsx
rename to products/product_analytics/frontend/insights/activityDescriptions.tsx
diff --git a/frontend/src/scenes/saved-insights/HomeTab.test.tsx b/products/product_analytics/frontend/insights/home/HomeTab.test.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/HomeTab.test.tsx
rename to products/product_analytics/frontend/insights/home/HomeTab.test.tsx
diff --git a/frontend/src/scenes/saved-insights/HomeTab.tsx b/products/product_analytics/frontend/insights/home/HomeTab.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/HomeTab.tsx
rename to products/product_analytics/frontend/insights/home/HomeTab.tsx
diff --git a/frontend/src/scenes/saved-insights/HomeTabChartCard.scss b/products/product_analytics/frontend/insights/home/HomeTabChartCard.scss
similarity index 100%
rename from frontend/src/scenes/saved-insights/HomeTabChartCard.scss
rename to products/product_analytics/frontend/insights/home/HomeTabChartCard.scss
diff --git a/frontend/src/scenes/saved-insights/HomeTabChartCard.stories.tsx b/products/product_analytics/frontend/insights/home/HomeTabChartCard.stories.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/HomeTabChartCard.stories.tsx
rename to products/product_analytics/frontend/insights/home/HomeTabChartCard.stories.tsx
diff --git a/frontend/src/scenes/saved-insights/HomeTabChartCard.tsx b/products/product_analytics/frontend/insights/home/HomeTabChartCard.tsx
similarity index 95%
rename from frontend/src/scenes/saved-insights/HomeTabChartCard.tsx
rename to products/product_analytics/frontend/insights/home/HomeTabChartCard.tsx
index 53e5d7e69cd7..17ff59e2ab63 100644
--- a/frontend/src/scenes/saved-insights/HomeTabChartCard.tsx
+++ b/products/product_analytics/frontend/insights/home/HomeTabChartCard.tsx
@@ -11,13 +11,9 @@ import { teamLogic } from 'scenes/teamLogic'
import { Query } from '~/queries/Query/Query'
-import {
- homeTabChartInsightId,
- homeTabDataCollectionId,
-} from 'products/product_analytics/frontend/insights/home/homeTabQueryKeys'
-
import { homeTabDefaultLogic } from './homeTabDefaultLogic'
import { getHomeTabExploreUrl, type HomeTabChartOption } from './homeTabDefaultTiles'
+import { homeTabChartInsightId, homeTabDataCollectionId } from './homeTabQueryKeys'
interface HomeTabChartCardProps {
option: HomeTabChartOption
diff --git a/frontend/src/scenes/saved-insights/HomeTabDefault.stories.tsx b/products/product_analytics/frontend/insights/home/HomeTabDefault.stories.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/HomeTabDefault.stories.tsx
rename to products/product_analytics/frontend/insights/home/HomeTabDefault.stories.tsx
diff --git a/products/product_analytics/frontend/insights/home/HomeTabDefault.test.tsx b/products/product_analytics/frontend/insights/home/HomeTabDefault.test.tsx
index 9b5588e44a50..dc14d903aae2 100644
--- a/products/product_analytics/frontend/insights/home/HomeTabDefault.test.tsx
+++ b/products/product_analytics/frontend/insights/home/HomeTabDefault.test.tsx
@@ -2,8 +2,6 @@ import '@testing-library/jest-dom'
import { act, cleanup, render, screen, waitFor, within } from '@testing-library/react'
-import { HomeTabDefault } from 'scenes/saved-insights/HomeTabDefault'
-import { homeTabDefaultLogic } from 'scenes/saved-insights/homeTabDefaultLogic'
import { savedInsightsLogic } from 'scenes/saved-insights/savedInsightsLogic'
import { teamLogic } from 'scenes/teamLogic'
@@ -13,6 +11,8 @@ import { performQuery } from '~/queries/query'
import { isInsightQueryNode } from '~/queries/utils'
import { initKeaTests } from '~/test/init'
+import { HomeTabDefault } from './HomeTabDefault'
+import { homeTabDefaultLogic } from './homeTabDefaultLogic'
import { homeTabDataCollectionId } from './homeTabQueryKeys'
jest.mock('~/queries/query', () => ({
diff --git a/frontend/src/scenes/saved-insights/HomeTabDefault.tsx b/products/product_analytics/frontend/insights/home/HomeTabDefault.tsx
similarity index 95%
rename from frontend/src/scenes/saved-insights/HomeTabDefault.tsx
rename to products/product_analytics/frontend/insights/home/HomeTabDefault.tsx
index 9e282cc7f8a1..8c192094626b 100644
--- a/frontend/src/scenes/saved-insights/HomeTabDefault.tsx
+++ b/products/product_analytics/frontend/insights/home/HomeTabDefault.tsx
@@ -9,17 +9,11 @@ import { DateFilter } from 'lib/components/DateFilter/DateFilter'
import { CUSTOM_OPTION_KEY } from 'lib/components/DateFilter/types'
import { useAttachedLogic } from 'lib/logic/scenes/useAttachedLogic'
import { dateMapping } from 'lib/utils/dateFilters'
+import { savedInsightsLogic } from 'scenes/saved-insights/savedInsightsLogic'
import { teamLogic } from 'scenes/teamLogic'
import { insightVizDataNodeKey } from '~/queries/nodes/InsightViz/insightVizKeys'
-import { HomeTabExplore } from 'products/product_analytics/frontend/insights/home/HomeTabExplore'
-import { homeTabLoadTimeLogic } from 'products/product_analytics/frontend/insights/home/homeTabLoadTimeLogic'
-import {
- homeTabChartInsightId,
- homeTabStatKey,
-} from 'products/product_analytics/frontend/insights/home/homeTabQueryKeys'
-
import { HomeTabChartCard } from './HomeTabChartCard'
import { homeTabDefaultLogic } from './homeTabDefaultLogic'
import {
@@ -28,8 +22,10 @@ import {
getHomeTabChartOptions,
getHomeTabStatQueries,
} from './homeTabDefaultTiles'
+import { HomeTabExplore } from './HomeTabExplore'
+import { homeTabLoadTimeLogic } from './homeTabLoadTimeLogic'
+import { homeTabChartInsightId, homeTabStatKey } from './homeTabQueryKeys'
import { HomeTabStatTiles } from './HomeTabStatTiles'
-import { savedInsightsLogic } from './savedInsightsLogic'
const HOME_DATE_OPTIONS = dateMapping.filter((option) => option.key !== CUSTOM_OPTION_KEY)
diff --git a/frontend/src/scenes/saved-insights/HomeTabStatTile.tsx b/products/product_analytics/frontend/insights/home/HomeTabStatTile.tsx
similarity index 95%
rename from frontend/src/scenes/saved-insights/HomeTabStatTile.tsx
rename to products/product_analytics/frontend/insights/home/HomeTabStatTile.tsx
index 5fcc26339748..e3f0e94fcc60 100644
--- a/frontend/src/scenes/saved-insights/HomeTabStatTile.tsx
+++ b/products/product_analytics/frontend/insights/home/HomeTabStatTile.tsx
@@ -10,13 +10,9 @@ import { formatItem } from '~/queries/nodes/OverviewGrid/OverviewGrid'
import type { TrendsQueryResponse } from '~/queries/schema/schema-general'
import type { TrendResult } from '~/types'
-import {
- homeTabDataCollectionId,
- homeTabStatKey,
-} from 'products/product_analytics/frontend/insights/home/homeTabQueryKeys'
-
import { homeTabDefaultLogic } from './homeTabDefaultLogic'
import { getHomeTabStatValue, type HomeTabStatQuery } from './homeTabDefaultTiles'
+import { homeTabDataCollectionId, homeTabStatKey } from './homeTabQueryKeys'
interface HomeTabStatTileProps {
stat: HomeTabStatQuery
diff --git a/frontend/src/scenes/saved-insights/HomeTabStatTiles.tsx b/products/product_analytics/frontend/insights/home/HomeTabStatTiles.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/HomeTabStatTiles.tsx
rename to products/product_analytics/frontend/insights/home/HomeTabStatTiles.tsx
diff --git a/frontend/src/scenes/saved-insights/homeTabDefaultLogic.test.ts b/products/product_analytics/frontend/insights/home/homeTabDefaultLogic.test.ts
similarity index 100%
rename from frontend/src/scenes/saved-insights/homeTabDefaultLogic.test.ts
rename to products/product_analytics/frontend/insights/home/homeTabDefaultLogic.test.ts
diff --git a/frontend/src/scenes/saved-insights/homeTabDefaultLogic.ts b/products/product_analytics/frontend/insights/home/homeTabDefaultLogic.ts
similarity index 100%
rename from frontend/src/scenes/saved-insights/homeTabDefaultLogic.ts
rename to products/product_analytics/frontend/insights/home/homeTabDefaultLogic.ts
diff --git a/frontend/src/scenes/saved-insights/homeTabDefaultTiles.test.ts b/products/product_analytics/frontend/insights/home/homeTabDefaultTiles.test.ts
similarity index 100%
rename from frontend/src/scenes/saved-insights/homeTabDefaultTiles.test.ts
rename to products/product_analytics/frontend/insights/home/homeTabDefaultTiles.test.ts
diff --git a/frontend/src/scenes/saved-insights/homeTabDefaultTiles.ts b/products/product_analytics/frontend/insights/home/homeTabDefaultTiles.ts
similarity index 100%
rename from frontend/src/scenes/saved-insights/homeTabDefaultTiles.ts
rename to products/product_analytics/frontend/insights/home/homeTabDefaultTiles.ts
diff --git a/frontend/src/scenes/saved-insights/InsightTypeSketch.tsx b/products/product_analytics/frontend/insights/newInsightMenu/InsightTypeSketch.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/InsightTypeSketch.tsx
rename to products/product_analytics/frontend/insights/newInsightMenu/InsightTypeSketch.tsx
diff --git a/frontend/src/scenes/saved-insights/NewInsightMenu.stories.tsx b/products/product_analytics/frontend/insights/newInsightMenu/NewInsightMenu.stories.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/NewInsightMenu.stories.tsx
rename to products/product_analytics/frontend/insights/newInsightMenu/NewInsightMenu.stories.tsx
diff --git a/frontend/src/scenes/saved-insights/NewInsightMenu.tsx b/products/product_analytics/frontend/insights/newInsightMenu/NewInsightMenu.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/NewInsightMenu.tsx
rename to products/product_analytics/frontend/insights/newInsightMenu/NewInsightMenu.tsx
diff --git a/frontend/src/scenes/saved-insights/newInsightsMenu.tsx b/products/product_analytics/frontend/insights/newInsightMenu/newInsightsMenu.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/newInsightsMenu.tsx
rename to products/product_analytics/frontend/insights/newInsightMenu/newInsightsMenu.tsx
diff --git a/frontend/src/scenes/saved-insights/worldMapSketchData.ts b/products/product_analytics/frontend/insights/newInsightMenu/worldMapSketchData.ts
similarity index 100%
rename from frontend/src/scenes/saved-insights/worldMapSketchData.ts
rename to products/product_analytics/frontend/insights/newInsightMenu/worldMapSketchData.ts
diff --git a/frontend/src/scenes/saved-insights/DraftInsightRow.tsx b/products/product_analytics/frontend/insights/savedInsights/DraftInsightRow.tsx
similarity index 96%
rename from frontend/src/scenes/saved-insights/DraftInsightRow.tsx
rename to products/product_analytics/frontend/insights/savedInsights/DraftInsightRow.tsx
index c65b5d50984f..8a35bf15e036 100644
--- a/frontend/src/scenes/saved-insights/DraftInsightRow.tsx
+++ b/products/product_analytics/frontend/insights/savedInsights/DraftInsightRow.tsx
@@ -8,10 +8,9 @@ import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink'
import { LemonTag } from 'lib/lemon-ui/LemonTag'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { useSummarizeInsight } from 'scenes/insights/summarizeInsight'
+import { SavedInsightListItem, savedInsightsLogic } from 'scenes/saved-insights/savedInsightsLogic'
import { urls } from 'scenes/urls'
-import { SavedInsightListItem, savedInsightsLogic } from './savedInsightsLogic'
-
function draftAgeSeconds(item: SavedInsightListItem): number {
return Math.max(0, dayjs().diff(dayjs(item.created_at), 'second'))
}
diff --git a/frontend/src/scenes/saved-insights/SavedInsights.stories.tsx b/products/product_analytics/frontend/insights/savedInsights/SavedInsights.stories.tsx
similarity index 93%
rename from frontend/src/scenes/saved-insights/SavedInsights.stories.tsx
rename to products/product_analytics/frontend/insights/savedInsights/SavedInsights.stories.tsx
index d6c204d363f5..a0f15eba2bdd 100644
--- a/frontend/src/scenes/saved-insights/SavedInsights.stories.tsx
+++ b/products/product_analytics/frontend/insights/savedInsights/SavedInsights.stories.tsx
@@ -5,11 +5,11 @@ import { App } from 'scenes/App'
import { urls } from 'scenes/urls'
import { mswDecorator } from '~/mocks/browser'
+import funnelTopToBottom from '~/mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json'
+import trendsBarBreakdown from '~/mocks/fixtures/api/projects/team_id/insights/trendsBarBreakdown.json'
+import trendsPieBreakdown from '~/mocks/fixtures/api/projects/team_id/insights/trendsPieBreakdown.json'
import { EMPTY_PAGINATED_RESPONSE, toPaginatedResponse } from '~/mocks/handlers'
-import funnelTopToBottom from '../../mocks/fixtures/api/projects/team_id/insights/funnelTopToBottom.json'
-import trendsBarBreakdown from '../../mocks/fixtures/api/projects/team_id/insights/trendsBarBreakdown.json'
-import trendsPieBreakdown from '../../mocks/fixtures/api/projects/team_id/insights/trendsPieBreakdown.json'
import insightsJson from './__mocks__/insights.json'
const insights = [trendsBarBreakdown, trendsPieBreakdown, funnelTopToBottom]
diff --git a/frontend/src/scenes/saved-insights/SavedInsights.tsx b/products/product_analytics/frontend/insights/savedInsights/SavedInsights.tsx
similarity index 97%
rename from frontend/src/scenes/saved-insights/SavedInsights.tsx
rename to products/product_analytics/frontend/insights/savedInsights/SavedInsights.tsx
index e1c8aaf944f6..bc3c25a6ee90 100644
--- a/frontend/src/scenes/saved-insights/SavedInsights.tsx
+++ b/products/product_analytics/frontend/insights/savedInsights/SavedInsights.tsx
@@ -1,10 +1,9 @@
-import './SavedInsights.scss'
-
import { useActions, useValues } from 'kea'
import { router } from 'kea-router'
import { IconEllipsis, IconHeart, IconHeartFilled, IconTrash } from '@posthog/icons'
+import 'scenes/saved-insights/SavedInsights.scss'
import { AccessControlAction } from 'lib/components/AccessControlAction'
import { ActivityLog } from 'lib/components/ActivityLog/ActivityLog'
import { BulkUpdateTagsButton } from 'lib/components/BulkActions/BulkUpdateTagsButton'
@@ -34,8 +33,10 @@ import { SavedInsightsEmptyState, SavedInsightsErrorState } from 'scenes/insight
import { useSummarizeInsight } from 'scenes/insights/summarizeInsight'
import { maxGlobalLogic } from 'scenes/max/maxGlobalLogic'
import { projectLogic } from 'scenes/projectLogic'
-import { NewInsightShortcuts } from 'scenes/saved-insights/newInsightsMenu'
+import { isDraftInsightRow } from 'scenes/saved-insights/draftInsight'
+import { InsightIcon } from 'scenes/saved-insights/InsightIcon'
import { SavedInsightsFilters } from 'scenes/saved-insights/SavedInsightsFilters'
+import { SavedInsightListItem, savedInsightsLogic } from 'scenes/saved-insights/savedInsightsLogic'
import { sceneConfigurations } from 'scenes/scenes'
import { Scene, SceneExport } from 'scenes/sceneTypes'
import { teamLogic } from 'scenes/teamLogic'
@@ -48,18 +49,13 @@ import { AccessControlLevel, AccessControlResourceType, ActivityScope, SavedInsi
import { productAnalyticsEmptyState } from 'products/product_analytics/frontend/emptyState/productAnalyticsEmptyState'
import { HomeDashboardStarterModal } from 'products/product_analytics/frontend/insights/home/HomeDashboardStarterModal'
-
-export * from './insightTypesMetadata'
-
+import { HomeTab } from 'products/product_analytics/frontend/insights/home/HomeTab'
+import { NewInsightButton } from 'products/product_analytics/frontend/insights/newInsightMenu/NewInsightMenu'
+import { NewInsightShortcuts } from 'products/product_analytics/frontend/insights/newInsightMenu/newInsightsMenu'
import { ProductAnalyticsNotifications } from 'products/product_analytics/frontend/notifications/ProductAnalyticsNotifications'
import { productAnalyticsNotificationsLogic } from 'products/product_analytics/frontend/notifications/productAnalyticsNotificationsLogic'
-import { isDraftInsightRow } from './draftInsight'
import { DraftInsightMoreMenu, DraftInsightNameCell } from './DraftInsightRow'
-import { HomeTab } from './HomeTab'
-import { InsightIcon } from './InsightIcon'
-import { NewInsightButton } from './NewInsightMenu'
-import { SavedInsightListItem, savedInsightsLogic } from './savedInsightsLogic'
export const scene: SceneExport = {
component: SavedInsights,
diff --git a/frontend/src/scenes/saved-insights/__mocks__/insights.json b/products/product_analytics/frontend/insights/savedInsights/__mocks__/insights.json
similarity index 100%
rename from frontend/src/scenes/saved-insights/__mocks__/insights.json
rename to products/product_analytics/frontend/insights/savedInsights/__mocks__/insights.json
diff --git a/frontend/src/scenes/saved-insights/ReloadInsight.tsx b/products/product_analytics/frontend/insights/shared/ReloadInsight.tsx
similarity index 100%
rename from frontend/src/scenes/saved-insights/ReloadInsight.tsx
rename to products/product_analytics/frontend/insights/shared/ReloadInsight.tsx
diff --git a/products/product_analytics/package.json b/products/product_analytics/package.json
index 5458b3cdef75..2176489c9bc1 100644
--- a/products/product_analytics/package.json
+++ b/products/product_analytics/package.json
@@ -14,6 +14,7 @@
},
"devDependencies": {
"@storybook/react": "catalog:",
+ "@testing-library/jest-dom": "*",
"@testing-library/react": "*",
"kea-test-utils": "catalog:",
"timekeeper": "*"