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): remove dead in-app-tab scaffolding (#62052)

Paul D'Ambra15e2876e066a
diff --git a/frontend/src/layout/scenes/ConfigureHomeModal.tsx b/frontend/src/layout/scenes/ConfigureHomeModal.tsx
index 3487eee51187..7f97413ecb33 100644
--- a/frontend/src/layout/scenes/ConfigureHomeModal.tsx
+++ b/frontend/src/layout/scenes/ConfigureHomeModal.tsx
@@ -76,8 +76,6 @@ export function ConfigureHomeModal({ isOpen, onClose }: ConfigureHomeModalProps)
hash: '',
title: 'Search',
iconType: 'search',
- active: false,
- pinned: true,
sceneId: Scene.NewTab,
sceneKey: 'newTab',
sceneParams: emptySceneParams,
@@ -127,8 +125,6 @@ export function ConfigureHomeModal({ isOpen, onClose }: ConfigureHomeModalProps)
hash: '',
title: 'Default dashboard',
iconType: 'dashboard',
- active: false,
- pinned: true,
sceneId: Scene.Dashboard,
sceneKey: `dashboard-${dashboardId}`,
sceneParams: emptySceneParams,
@@ -197,8 +193,6 @@ export function ConfigureHomeModal({ isOpen, onClose }: ConfigureHomeModalProps)
hash: '',
title: 'Default dashboard',
iconType: 'dashboard',
- active: false,
- pinned: true,
sceneId: Scene.Dashboard,
sceneKey: `dashboard-${dashboardId}`,
sceneParams: emptySceneParams,
diff --git a/frontend/src/lib/components/Shortcuts/shortcuts.ts b/frontend/src/lib/components/Shortcuts/shortcuts.ts
index 6dd038d08d67..55109c8ca27b 100644
--- a/frontend/src/lib/components/Shortcuts/shortcuts.ts
+++ b/frontend/src/lib/components/Shortcuts/shortcuts.ts
@@ -11,8 +11,6 @@ export const keyBinds: Record<string, string[]> = {
orgSwitcher: ['g', 'then', 'o'],
quickStart: ['g', 'then', 's'],
recentItems: [...baseModifier, 'y'],
- newTab: [...baseModifier, 't'],
- closeActiveTab: [...baseModifier, 'w'],
toggleShortcutMenu: [...baseModifier, 'k'],
toggleShortcutMenuFallback: ['command', 'shift', 'k'],
search: ['command', 'k'],
diff --git a/frontend/src/lib/logic/scenes/tabAwareScene.ts b/frontend/src/lib/logic/scenes/tabAwareScene.ts
deleted file mode 100644
index 4e45b0898d03..000000000000
--- a/frontend/src/lib/logic/scenes/tabAwareScene.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { BuiltLogic, Logic, key } from 'kea'
-
-export const tabAwareScene = <L extends Logic = Logic>() => {
- return (logic: BuiltLogic<L>) => {
- // add a tab-based key if none present
- key((props) => {
- if (!props.tabId) {
- throw new Error('Tab-aware scene logic (' + logic.pathString + ') must have a tabId prop')
- }
- return props.tabId
- })(logic)
- }
-}
diff --git a/frontend/src/scenes/feature-flags/featureFlagLogic.ts b/frontend/src/scenes/feature-flags/featureFlagLogic.ts
index c7d36cc184c3..9d080112ac3a 100644
--- a/frontend/src/scenes/feature-flags/featureFlagLogic.ts
+++ b/frontend/src/scenes/feature-flags/featureFlagLogic.ts
@@ -2757,9 +2757,6 @@ export const featureFlagLogic = kea<featureFlagLogicType>([
},
})),
- // TODO(#58936): this block is missing the scene-tab-cache guard that
- // `actionEditLogic.tsx` (L305-332) uses, so the prompt can fire twice on tab
- // switches. Fix requires making this scene tab-aware (`/making-scenes-tab-aware`).
beforeUnload((logic) => ({
enabled: (newLocation?: CombinedLocation) => {
if (!logic.values.isFormDirty) {
diff --git a/frontend/src/scenes/project-homepage/ai-first/aiFirstHomepageLogic.ts b/frontend/src/scenes/project-homepage/ai-first/aiFirstHomepageLogic.ts
index ff7d4c3983d2..e30cf2fd2588 100644
--- a/frontend/src/scenes/project-homepage/ai-first/aiFirstHomepageLogic.ts
+++ b/frontend/src/scenes/project-homepage/ai-first/aiFirstHomepageLogic.ts
@@ -348,8 +348,6 @@ export const aiFirstHomepageLogic = kea<aiFirstHomepageLogicType>([
hash: '',
title: 'Default dashboard',
iconType: 'dashboard',
- active: false,
- pinned: true,
sceneId: Scene.Dashboard,
sceneKey: `dashboard-${dashboardId}`,
sceneParams: emptySceneParams,
diff --git a/frontend/src/scenes/sceneLogic.test.tsx b/frontend/src/scenes/sceneLogic.test.tsx
index c36d85a43ee2..274cbf4ff12a 100644
--- a/frontend/src/scenes/sceneLogic.test.tsx
+++ b/frontend/src/scenes/sceneLogic.test.tsx
@@ -103,8 +103,6 @@ describe('sceneLogic', () => {
hash: '',
title: 'Default dashboard',
iconType: 'dashboard' as const,
- active: false,
- pinned: true,
sceneId: Scene.Dashboard,
sceneKey: 'dashboard-42',
sceneParams: { params: {}, searchParams: {}, hashParams: {} },
diff --git a/frontend/src/scenes/sceneLogic.tsx b/frontend/src/scenes/sceneLogic.tsx
index cc9f2a3de5d4..4880f5e764d6 100644
--- a/frontend/src/scenes/sceneLogic.tsx
+++ b/frontend/src/scenes/sceneLogic.tsx
@@ -61,17 +61,15 @@ interface MountedSceneLogic {
const generateTabId = (): string => crypto?.randomUUID?.()?.split('-')?.pop() || `${Date.now()}-${Math.random()}`
/**
- * Homepage tab snapshot for JSON persistence: strips `sceneParams` (deep/cyclic routing state),
- * ensures an id, and marks it pinned + inactive. Every other `SceneTab` field is kept so new fields
- * aren't forgotten; if a future field holds non-plain data, omit it here explicitly.
+ * Homepage snapshot for JSON persistence: strips `sceneParams` (deep/cyclic routing state) and
+ * ensures an id. Every other `SceneTab` field is kept so new fields aren't forgotten; if a future
+ * field holds non-plain data, omit it here explicitly.
*/
const tabToPersistableSnapshot = (tab: SceneTab): SceneTab => {
const { sceneParams: _omitSceneParams, ...rest } = tab
return {
...rest,
id: tab.id || generateTabId(),
- pinned: true,
- active: false,
}
}
diff --git a/frontend/src/scenes/sceneTypes.ts b/frontend/src/scenes/sceneTypes.ts
index 90654eef208c..c99ba6c3ba5e 100644
--- a/frontend/src/scenes/sceneTypes.ts
+++ b/frontend/src/scenes/sceneTypes.ts
@@ -244,12 +244,8 @@ export interface SceneTab {
search: string
hash: string
title: string
- active: boolean
customTitle?: string
iconType: FileSystemIconType | 'loading' | 'blank'
- pinned?: boolean
- /** Show a small badge indicator on the tab icon */
- badge?: boolean
sceneId?: string
sceneKey?: string