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.

fix(insights): open info panel not max for endpoint-from-insight flow (#69050)

Thiago Salvatoreaefe46206833
diff --git a/frontend/src/scenes/insights/insightSceneLogic.tsx b/frontend/src/scenes/insights/insightSceneLogic.tsx
index 449ef03318bc..5bb88bdd7292 100644
--- a/frontend/src/scenes/insights/insightSceneLogic.tsx
+++ b/frontend/src/scenes/insights/insightSceneLogic.tsx
@@ -22,6 +22,7 @@ import { urls } from 'scenes/urls'
import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'
import { SIDE_PANEL_CONTEXT_KEY, SidePanelSceneContext } from '~/layout/navigation-3000/sidepanel/types'
+import { sceneLayoutLogic } from '~/layout/scenes/sceneLayoutLogic'
import { getDefaultQuery } from '~/queries/nodes/InsightViz/utils'
import {
DashboardFilter,
@@ -113,7 +114,10 @@ export const insightSceneLogic = kea<insightSceneLogicType>([
['filterTestAccountsDefault'],
featureFlagLogic,
['featureFlags'],
+ sceneLayoutLogic,
+ ['scenePanelIsPresent'],
],
+ actions: [sceneLayoutLogic, ['setScenePanelIsPresent']],
})),
actions({
setInsightId: (insightId: InsightShortId) => ({ insightId }),
@@ -444,11 +448,19 @@ export const insightSceneLogic = kea<insightSceneLogicType>([
setSceneState: [
sharedListeners.reloadInsightLogic,
({ sceneSource }) => {
- if (sceneSource === 'endpoints') {
+ // Only open here when the scene panel already exists; otherwise Info isn't in
+ // `enabledTabs` yet and SidePanel's fallback reroutes to Max. The fresh-navigation
+ // case is handled by the `setScenePanelIsPresent` listener below.
+ if (sceneSource === 'endpoints' && values.scenePanelIsPresent) {
sidePanelStateLogic.findMounted()?.actions.openSidePanel(SidePanelTab.Info)
}
},
],
+ setScenePanelIsPresent: ({ active }) => {
+ if (active && values.sceneSource === 'endpoints') {
+ sidePanelStateLogic.findMounted()?.actions.openSidePanel(SidePanelTab.Info)
+ }
+ },
upgradeQuery: async ({ query }) => {
let upgradedQuery: Node | null = null