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(dashboard): remove "open insights in new PostHog tabs" from panel (#63288)

Matt Pua134086b01203
diff --git a/frontend/src/scenes/dashboard/DashboardScenePanel.tsx b/frontend/src/scenes/dashboard/DashboardScenePanel.tsx
index ea0272515f5d..fe58be9fb42e 100644
--- a/frontend/src/scenes/dashboard/DashboardScenePanel.tsx
+++ b/frontend/src/scenes/dashboard/DashboardScenePanel.tsx
@@ -1,7 +1,7 @@
import { useActions, useValues } from 'kea'
import { router } from 'kea-router'
-import { IconCode2, IconCopy, IconGraph, IconNotebook, IconPalette, IconTrash } from '@posthog/icons'
+import { IconCode2, IconCopy, IconNotebook, IconPalette, IconTrash } from '@posthog/icons'
import { AccessControlAction } from 'lib/components/AccessControlAction'
import { SceneExportDropdownMenu } from 'lib/components/Scenes/InsightOrDashboard/SceneExportDropdownMenu'
@@ -17,7 +17,6 @@ import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
import { slugify } from 'lib/utils'
import { DashboardEventSource } from 'lib/utils/eventUsageLogic'
-import { newInternalTab } from 'lib/utils/newInternalTab'
import { deleteDashboardLogic } from 'scenes/dashboard/deleteDashboardLogic'
import { duplicateDashboardLogic } from 'scenes/dashboard/duplicateDashboardLogic'
import { interProjectCopyLogic } from 'scenes/resource-transfer/interProjectCopyLogic'
@@ -30,7 +29,6 @@ import {
ScenePanelDivider,
ScenePanelInfoSection,
} from '~/layout/scenes/SceneLayout'
-import { sceneLayoutLogic } from '~/layout/scenes/sceneLayoutLogic'
import { notebooksModel } from '~/models/notebooksModel'
import { tagsModel } from '~/models/tagsModel'
import { AccessControlLevel, AccessControlResourceType, DashboardMode, ExporterFormat } from '~/types'
@@ -50,15 +48,12 @@ export function DashboardScenePanel(): JSX.Element | null {
isSavingTags,
isPinned,
asDashboardTemplate,
- effectiveEditBarFilters,
effectiveDashboardVariableOverrides,
- tiles,
apiUrl,
} = useValues(dashboardLogic)
const { setDashboardMode, updateDashboardTags, togglePinned, setTerraformModalOpen } = useActions(dashboardLogic)
const { createNotebookFromDashboard } = useActions(notebooksModel)
const { showInsightColorsModal } = useActions(dashboardInsightColorsModalLogic)
- const { setScenePanelOpen } = useActions(sceneLayoutLogic)
const { showDuplicateDashboardModal } = useActions(duplicateDashboardLogic)
const { showDeleteDashboardModal } = useActions(deleteDashboardLogic)
@@ -182,35 +177,6 @@ export function DashboardScenePanel(): JSX.Element | null {
<DashboardSaveAsTemplateSceneActions />
{dashboard && <SceneMetalyticsSummaryButton dataAttrKey={RESOURCE_TYPE} />}
- {dashboard && (
- <ButtonPrimitive
- onClick={() => {
- tiles.forEach((tile) => {
- if (tile.insight?.short_id == null) {
- return
- }
- const url = urls.insightView(
- tile.insight.short_id,
- dashboard.id,
- effectiveDashboardVariableOverrides,
- effectiveEditBarFilters,
- tile?.filters_overrides
- )
- newInternalTab(url)
- })
- setScenePanelOpen(false)
- }}
- menuItem
- data-attr="open-insights-in-new-posthog-tabs"
- disabledReasons={{
- 'Cannot open insights when editing dashboard': dashboardMode === DashboardMode.Edit,
- 'Dashboard has no insights': tiles.length === 0,
- }}
- >
- <IconGraph />
- Open insights in new PostHog tabs
- </ButtonPrimitive>
- )}
</ScenePanelActionsSection>
{dashboard && canEditDashboard && (
<>