: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
chore(navigation): remove the settings side-panel (#59255)
Rafael Audiberte246d551d7a1
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex a053540e9ccd..a37fefb6a278 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -5570,10 +5570,6 @@ snapshots:hash: v1.k794b7964.52706b247c2968cf54e48d58d4d65e34f19e7a4bed2a1719ba8970d4f3c7c1aa.GWO5g8DSrLhGKVymVfPWCTVOCW29JHWYAi0OZlnFiSkscenes-app-sidepanels--side-panel-notebooks--light:hash: v1.k794b7964.6b03bcd66331259f527b65568868dc845d4658c0bcc031ed45bb55b7b7847789.F9vew1h38SQ141i5xQLWKZWiVpb-LLNyDrOI1wG-fQI- scenes-app-sidepanels--side-panel-settings--dark:- hash: v1.k794b7964.f57d2042efda668c50b26969e4335216d27558245d531d2522e7faff48de0eaf.xMwFsyxwL-JWgUlX29lGtOlm65ekb9diClFuhZ1hdbE- scenes-app-sidepanels--side-panel-settings--light:- hash: v1.k794b7964.00460504259896436356e9092f79a8e2e09f9302dd4873df96ae319da7477220.yac-Ww554D0Hnjc6LiislOlnV_3-q6H6WQ4Tin1fsT8scenes-app-sidepanels--side-panel-support--dark:hash: v1.k794b7964.25d3bc059468d880d315a0a19b446435fef1fcdf80075784d26be323295a7839.XVlGukNTQVTyeonIxb3lERnTcOpzwj9MFk8pLjLwzvQscenes-app-sidepanels--side-panel-support--light:diff --git a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsxindex 3a35421b8b23..8fe169997f41 100644--- a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx+++ b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx@@ -53,10 +53,6 @@ export default metatype Story = StoryObj<StoryArgs>-export const SidePanelSettings: Story = {- args: { panel: SidePanelTab.Settings },-}-export const SidePanelNotebooks: Story = {args: { panel: SidePanelTab.Notebooks },}diff --git a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsxindex 701ab2f759e3..baefb6a59925 100644--- a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx+++ b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx@@ -3,7 +3,7 @@ import './SidePanel.scss'import { useActions, useValues } from 'kea'import { lazy, Suspense, useEffect, useRef } from 'react'-import { IconGear, IconLock, IconLogomark, IconNotebook } from '@posthog/icons'+import { IconLock, IconLogomark, IconNotebook } from '@posthog/icons'import { Resizer } from 'lib/components/Resizer/Resizer'import { ResizerLogicProps, resizerLogic } from 'lib/components/Resizer/resizerLogic'@@ -29,7 +29,6 @@ import { SidePanelDiscussion, SidePanelDiscussionIcon } from './panels/discussioimport { SidePanelExports, SidePanelExportsIcon } from './panels/exports/SidePanelExports'import { SidePanelInfo, SidePanelInfoIcon } from './panels/info/SidePanelInfo'import { SidePanelMax } from './panels/max/SidePanelMax'-import { SidePanelSettings } from './panels/settings/SidePanelSettings'import { SidePanelSupport } from './panels/support/SidePanelSupport'import { sidePanelLogic } from './sidePanelLogic'import { SidePanelNavigation } from './SidePanelNavigation'@@ -51,11 +50,6 @@ export const SIDE_PANEL_TABS: Record<SidePanelTab, { label: string; Icon: any; CIcon: SidePanelSupportIcon,Content: SidePanelSupport,},- [SidePanelTab.Settings]: {- label: 'Settings',- Icon: IconGear,- Content: SidePanelSettings,- },[SidePanelTab.Exports]: {label: 'Exports',Icon: SidePanelExportsIcon,diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/settings/SidePanelSettings.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/settings/SidePanelSettings.tsxdeleted file mode 100644index f3e42190f618..000000000000--- a/frontend/src/layout/navigation-3000/sidepanel/panels/settings/SidePanelSettings.tsx+++ /dev/null@@ -1,98 +0,0 @@-import { useActions, useValues } from 'kea'-import { useEffect, useRef } from 'react'--import { IconArrowLeft, IconExternal } from '@posthog/icons'-import { LemonButton } from '@posthog/lemon-ui'--import { capitalizeFirstLetter } from 'lib/utils'-import { useOpenAi } from 'scenes/max/useOpenAi'-import { Settings } from 'scenes/settings/Settings'-import { settingsLogic } from 'scenes/settings/settingsLogic'-import { SettingsLogicProps } from 'scenes/settings/types'-import { urls } from 'scenes/urls'--import { SidePanelTab } from '~/types'--import { SidePanelPaneHeader } from '../../components/SidePanelPaneHeader'-import { sidePanelStateLogic } from '../../sidePanelStateLogic'-import { sidePanelSettingsLogic } from './sidePanelSettingsLogic'--export const SidePanelSettings = (): JSX.Element => {- const { effectiveSettings, previousTab } = useValues(sidePanelSettingsLogic)- const { setSettings, setPreviousTab } = useActions(sidePanelSettingsLogic)- const { closeSidePanel } = useActions(sidePanelStateLogic)- const { openAi } = useOpenAi()- const scrollContainerRef = useRef<HTMLDivElement | null>(null)-- const settingsLogicProps: SettingsLogicProps = {- ...effectiveSettings,- logicKey: `sidepanel:${effectiveSettings.sectionId}`,- }- const { selectedSectionId, selectedLevel } = useValues(settingsLogic(settingsLogicProps))-- useEffect(() => {- setSettings({- sectionId: selectedSectionId ?? undefined,- settingLevelId: selectedLevel,- })- }, [selectedSectionId, selectedLevel, setSettings])-- useEffect(() => {- if (effectiveSettings.settingId) {- const timeout = setTimeout(() => {- const container = scrollContainerRef.current- if (!container) {- return- }-- container- .querySelector<HTMLElement>(`[id="${effectiveSettings.settingId}"]`)- ?.scrollIntoView({ behavior: 'smooth', block: 'start' })- }, 1000 / 60)- return () => clearTimeout(timeout)- }- }, [effectiveSettings.settingId])-- const cameFromMax =- previousTab === SidePanelTab.Max &&- (selectedSectionId === 'environment-max' || selectedSectionId === ('project-max' as typeof selectedSectionId))-- return (- <div className="flex flex-col overflow-hidden">- <SidePanelPaneHeader- title={- <>- {cameFromMax && (- <LemonButton- size="small"- icon={<IconArrowLeft />}- onClick={() => {- setPreviousTab(null)- openAi()- }}- tooltip="Back to PostHog AI"- tooltipPlacement="bottom-end"- />- )}- {`${capitalizeFirstLetter(selectedLevel)} settings`}- </>- }- >- <LemonButton- size="small"- to={urls.settings(- effectiveSettings.sectionId ?? effectiveSettings.settingLevelId,- effectiveSettings.settingId- )}- onClick={() => closeSidePanel()}- sideIcon={<IconExternal />}- >- All settings- </LemonButton>- </SidePanelPaneHeader>- <div className="flex-1 p-3 overflow-y-auto" ref={scrollContainerRef}>- <Settings hideSections {...settingsLogicProps} />- </div>- </div>- )-}diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic.tsxdeleted file mode 100644index 1fae613422b9..000000000000--- a/frontend/src/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic.tsx+++ /dev/null@@ -1,98 +0,0 @@-import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'--import { SettingsLogicProps } from 'scenes/settings/types'--import { SidePanelTab } from '~/types'--import { sidePanelContextLogic } from '../../sidePanelContextLogic'-import { sidePanelStateLogic } from '../../sidePanelStateLogic'-import type { sidePanelSettingsLogicType } from './sidePanelSettingsLogicType'--export const sidePanelSettingsLogic = kea<sidePanelSettingsLogicType>([- path(['layout', 'navigation-3000', 'sidepanel', 'panels', 'sidePanelSettingsLogic']),- connect(() => ({- values: [- sidePanelStateLogic,- ['selectedTab', 'sidePanelOpen'],- sidePanelContextLogic,- ['sceneSidePanelContext'],- ],- actions: [sidePanelStateLogic, ['openSidePanel', 'closeSidePanel']],- })),-- actions({- closeSettingsPanel: true,- openSettingsPanel: (settingsLogicProps: SettingsLogicProps) => ({- settingsLogicProps,- }),- setSettings: (settingsLogicProps: Partial<SettingsLogicProps>) => ({- settingsLogicProps,- }),- setPreviousTab: (tab: SidePanelTab | null) => ({ tab }),- }),-- reducers(() => ({- settings: [- {} as SettingsLogicProps,- {- openSettingsPanel: (_, { settingsLogicProps }) => {- return settingsLogicProps- },- setSettings: (state, { settingsLogicProps }) => {- return { ...state, ...settingsLogicProps }- },- closeSettingsPanel: () => ({}),- },- ],- /** Whether the current settings were explicitly set via openSettingsPanel.- * Stays true while the user remains on the Settings tab so the explicit- * section/setting is preserved (and so `sidePanelLogic.enabledTabs` keeps- * Settings available on scenes without a `settings_section`). Resets when- * the user switches to a different tab or closes the panel. */- isExplicitSettings: [- false,- {- openSettingsPanel: () => true,- closeSettingsPanel: () => false,- closeSidePanel: () => false,- openSidePanel: (state, { tab }) => (tab === SidePanelTab.Settings ? state : false),- },- ],- previousTab: [- null as SidePanelTab | null,- {- setPreviousTab: (_, { tab }) => tab,- closeSettingsPanel: () => null,- },- ],- })),-- selectors({- isOpen: [- (s) => [s.sidePanelOpen, s.selectedTab],- (sidePanelOpen, selectedTab) => sidePanelOpen && selectedTab === SidePanelTab.Settings,- ],- /** When opened from the tab bar, we use the scene's settings_section.- * When opened via openSettingsPanel({ sectionId }), the explicit value takes precedence. */- effectiveSettings: [- (s) => [s.settings, s.isExplicitSettings, s.sceneSidePanelContext],- (settings, isExplicitSettings, sceneSidePanelContext): SettingsLogicProps => {- if (isExplicitSettings) {- return settings- }- const sceneSection = sceneSidePanelContext?.settings_section- return sceneSection ? { sectionId: sceneSection } : settings- },- ],- }),-- listeners(({ actions, values }) => ({- openSettingsPanel: () => {- actions.setPreviousTab(values.selectedTab)- actions.openSidePanel(SidePanelTab.Settings)- },- closeSettingsPanel: () => {- actions.closeSidePanel(SidePanelTab.Settings)- },- })),-])diff --git a/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx b/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsxindex c3ca81e393a2..c31f6205d9b0 100644--- a/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx+++ b/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx@@ -9,7 +9,6 @@ import { userLogic } from 'scenes/userLogic'import { sceneLayoutLogic } from '~/layout/scenes/sceneLayoutLogic'import { AvailableFeature, SidePanelTab } from '~/types'-import { sidePanelSettingsLogic } from './panels/settings/sidePanelSettingsLogic'import { sidePanelContextLogic } from './sidePanelContextLogic'import type { sidePanelLogicType } from './sidePanelLogicType'import { sidePanelStateLogic } from './sidePanelStateLogic'@@ -39,8 +38,6 @@ export const sidePanelLogic = kea<sidePanelLogicType>([['isCloudOrDev'],userLogic,['hasAvailableFeature'],- sidePanelSettingsLogic,- ['isExplicitSettings'],],actions: [sidePanelStateLogic, ['closeSidePanel', 'openSidePanel']],})),@@ -53,16 +50,8 @@ export const sidePanelLogic = kea<sidePanelLogicType>([s.scenePanelIsPresent,s.isCloudOrDev,s.hasAvailableFeature,- s.isExplicitSettings,],- (- sceneSidePanelContext,- currentTeam,- scenePanelIsPresent,- isCloudOrDev,- hasAvailableFeature,- isExplicitSettings- ) => {+ (sceneSidePanelContext, currentTeam, scenePanelIsPresent, isCloudOrDev, hasAvailableFeature) => {const tabs: SidePanelTab[] = []if (scenePanelIsPresent) {@@ -81,14 +70,6 @@ export const sidePanelLogic = kea<sidePanelLogicType>([tabs.push(SidePanelTab.AccessControl)}- // Settings is enabled when the scene declares a `settings_section` OR when the- // user explicitly opened settings via `openSettingsPanel(...)` (e.g. the gear- // icon next to "Filter out internal and test users"). Direct, non-explicit- // `openSidePanel(Settings)` calls still respect scene context.- if (sceneSidePanelContext.settings_section || isExplicitSettings) {- tabs.push(SidePanelTab.Settings)- }-// Exports and Support are openable programmatically but not shown in the nav bartabs.push(SidePanelTab.Exports)@@ -106,14 +87,10 @@ export const sidePanelLogic = kea<sidePanelLogicType>([/** Tabs shown in the navigation bar */visibleTabs: [- (s) => [s.enabledTabs, s.sceneSidePanelContext],- (enabledTabs, sceneSidePanelContext): SidePanelTab[] => {+ (s) => [s.enabledTabs],+ (enabledTabs): SidePanelTab[] => {// Some tabs are openable programmatically but not shown in the nav barconst hiddenTabs: SidePanelTab[] = [SidePanelTab.Exports]- // Hide Settings from the nav bar unless the scene declares a settings_section.- if (!sceneSidePanelContext.settings_section) {- hiddenTabs.push(SidePanelTab.Settings)- }return enabledTabs.filter((tab) => !hiddenTabs.includes(tab))},],diff --git a/frontend/src/layout/navigation-3000/sidepanel/types.ts b/frontend/src/layout/navigation-3000/sidepanel/types.tsindex cc93e53964ef..e2d18f1f755a 100644--- a/frontend/src/layout/navigation-3000/sidepanel/types.ts+++ b/frontend/src/layout/navigation-3000/sidepanel/types.ts@@ -1,6 +1,5 @@import { ActivityLogItem } from 'lib/components/ActivityLog/humanizeActivity'-import { SettingSectionId } from '~/scenes/settings/types'import { APIScopeObject, ActivityScope, CommentType } from '~/types'/** Allows scenes to set a context which enables richer features of the side panel */@@ -12,6 +11,5 @@ export type SidePanelSceneContext = {// only currently used for comments which are very similar to activity itemsactivity_item_context?: CommentType['item_context']discussions_disabled?: boolean- settings_section?: SettingSectionId}export const SIDE_PANEL_CONTEXT_KEY = 'sidePanelContext'diff --git a/frontend/src/lib/components/ProductSetup/productSetupLogic.ts b/frontend/src/lib/components/ProductSetup/productSetupLogic.tsindex 337334ba051e..69cc17cc2b0d 100644--- a/frontend/src/lib/components/ProductSetup/productSetupLogic.ts+++ b/frontend/src/lib/components/ProductSetup/productSetupLogic.ts@@ -8,7 +8,6 @@ import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'import { inviteLogic } from 'scenes/settings/organization/inviteLogic'import { teamLogic } from 'scenes/teamLogic'-import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'import { ProductKey } from '~/queries/schema/schema-general'import { ActivationTaskStatus } from '~/types'@@ -55,8 +54,6 @@ export const productSetupLogic = kea<productSetupLogicType>([actions: [inviteLogic,['showInviteModal'],- sidePanelSettingsLogic,- ['openSettingsPanel'],reverseProxyCheckerLogic,['loadHasReverseProxy'],globalSetupLogic,diff --git a/frontend/src/lib/components/TestAccountFiltersSwitch.test.tsx b/frontend/src/lib/components/TestAccountFiltersSwitch.test.tsxindex e0fe2190ae05..6265bc3ce704 100644--- a/frontend/src/lib/components/TestAccountFiltersSwitch.test.tsx+++ b/frontend/src/lib/components/TestAccountFiltersSwitch.test.tsx@@ -1,103 +1,29 @@import '@testing-library/jest-dom'import { cleanup, render, screen } from '@testing-library/react'-import userEvent from '@testing-library/user-event'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'-import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'-import { sidePanelLogic } from '~/layout/navigation-3000/sidepanel/sidePanelLogic'-import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'import { initKeaTests } from '~/test/init'-import { SidePanelTab } from '~/types'import { TestAccountFilterSwitch } from './TestAccountFiltersSwitch'-// Regression coverage for https://github.com/PostHog/posthog/pull/59112-// — clicking the gear icon next to "Filter out internal and test users" used to-// open the PostHog AI (Max) side panel instead of Settings on any scene whose-// `SIDE_PANEL_CONTEXT_KEY` selector did not declare a `settings_section`-// (experiments, SQL editor, LLM analytics, hog functions, etc.).-describe('TestAccountFilterSwitch — gear icon opens Settings, not the AI side panel', () => {+describe('TestAccountFilterSwitch — gear icon links to internal test filtering settings', () => {beforeEach(() => {initKeaTests()featureFlagLogic.mount()- // Mount the side-panel state machinery directly. We deliberately do NOT- // mount any scene logic, so `sceneSidePanelContext.settings_section` is- // undefined — the exact condition under which the bug used to bite.- sidePanelStateLogic.mount()- sidePanelSettingsLogic.mount()- sidePanelLogic.mount()})afterEach(() => {cleanup()})- it('routes the user to the Settings side panel when the gear icon is clicked', async () => {- const onChange = jest.fn()- render(<TestAccountFilterSwitch checked={false} onChange={onChange} />)+ it('navigates to the project product analytics settings, scrolled to internal-user-filtering', () => {+ render(<TestAccountFilterSwitch checked={false} onChange={jest.fn()} />)- // The LemonSwitch itself has role="switch"; the gear is the only plain button.- const gear = screen.getByRole('button')- await userEvent.click(gear)-- const stateValues = sidePanelStateLogic.values- const enabledTabs = sidePanelLogic.values.enabledTabs-- expect(stateValues.sidePanelOpen).toBe(true)- expect(stateValues.selectedTab).toBe(SidePanelTab.Settings)-- // The bug was that on a scene without `settings_section`, Settings was- // missing from `enabledTabs`, so `SidePanel.tsx`'s fallback `useEffect`- // flipped `selectedTab` to `Max`. Asserting Settings is enabled proves- // the fallback's `!sidePanelOpenAndAvailable` precondition is false.- expect(enabledTabs).toContain(SidePanelTab.Settings)- expect(enabledTabs.includes(SidePanelTab.Max)).toBe(true)- // Replicates the `sidePanelOpenAndAvailable` check from SidePanel.tsx —- // when true, the fallback to Max cannot run.- expect(enabledTabs.includes(stateValues.selectedTab!)).toBe(true)- })-- it('forwards the explicit section and setting ids that scroll to internal-user-filtering', async () => {- const onChange = jest.fn()- render(<TestAccountFilterSwitch checked={false} onChange={onChange} />)-- await userEvent.click(screen.getByRole('button'))-- // `settings` carries the explicit args from `openSettingsPanel(...)`. The- // Settings panel reads these to scroll the right setting into view.- expect(sidePanelSettingsLogic.values.settings).toEqual({- sectionId: 'project-product-analytics',- settingId: 'internal-user-filtering',- })- expect(onChange).not.toHaveBeenCalled()- })-- it('keeps the Settings nav-bar gear hidden on scenes without a settings_section after the click', async () => {- const onChange = jest.fn()- render(<TestAccountFilterSwitch checked={false} onChange={onChange} />)-- await userEvent.click(screen.getByRole('button'))-- // Settings is now in enabledTabs (so the panel can render and the fallback- // doesn't flip to Max), but it is intentionally still hidden from the nav- // bar — that gear icon should only appear when the scene declares a- // `settings_section`.- expect(sidePanelLogic.values.enabledTabs).toContain(SidePanelTab.Settings)- expect(sidePanelLogic.values.visibleTabs).not.toContain(SidePanelTab.Settings)- })-- it('does NOT enable Settings when openSidePanel(Settings) is called without explicit args', async () => {- // This is the path the SidePanel storybook (`SidePanelSettings` story) uses:- // `useActions(sidePanelStateLogic).openSidePanel(SidePanelTab.Settings)`. On- // a scene without `settings_section` (e.g. the dashboards URL the stories- // pin themselves to) Settings should remain unavailable so the fallback- // useEffect in SidePanel.tsx still routes to Max — preserving the existing- // storybook snapshot.- sidePanelStateLogic.actions.openSidePanel(SidePanelTab.Settings)-- expect(sidePanelLogic.values.enabledTabs).not.toContain(SidePanelTab.Settings)- expect(sidePanelSettingsLogic.values.isExplicitSettings).toBe(false)+ // The LemonSwitch itself has role="switch"; the gear is rendered as a link.+ // The router prepends a `/project/<id>` prefix to the href, so match the suffix.+ const gear = screen.getByRole('link')+ expect(gear.getAttribute('href')).toMatch(/\/settings\/project-product-analytics#internal-user-filtering$/)})})diff --git a/frontend/src/lib/components/TestAccountFiltersSwitch.tsx b/frontend/src/lib/components/TestAccountFiltersSwitch.tsxindex 2849cf93f6fe..4b695096d8c4 100644--- a/frontend/src/lib/components/TestAccountFiltersSwitch.tsx+++ b/frontend/src/lib/components/TestAccountFiltersSwitch.tsx@@ -1,11 +1,10 @@-import { useActions, useValues } from 'kea'+import { useValues } from 'kea'import { IconGear } from '@posthog/icons'import { LemonButton, LemonSwitch, LemonSwitchProps } from '@posthog/lemon-ui'import { teamLogic } from 'scenes/teamLogic'--import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'+import { urls } from 'scenes/urls'type TestAccountFilterProps = Partial<LemonSwitchProps> & {checked: boolean@@ -15,7 +14,6 @@ type TestAccountFilterProps = Partial<LemonSwitchProps> & {export function TestAccountFilterSwitch({ checked, onChange, ...props }: TestAccountFilterProps): JSX.Element | null {const { currentTeam } = useValues(teamLogic)const hasFilters = (currentTeam?.test_account_filters || []).length > 0- const { openSettingsPanel } = useActions(sidePanelSettingsLogic)return (<LemonSwitchid="test-account-filter"@@ -36,12 +34,7 @@ export function TestAccountFilterSwitch({ checked, onChange, ...props }: TestAccsize="small"noPaddingclassName="ml-1"- onClick={() =>- openSettingsPanel({- sectionId: 'project-product-analytics',- settingId: 'internal-user-filtering',- })- }+ to={urls.settings('project-product-analytics', 'internal-user-filtering')}/></div>}diff --git a/frontend/src/scenes/heatmaps/components/HeatmapsBrowser.tsx b/frontend/src/scenes/heatmaps/components/HeatmapsBrowser.tsxindex 9fdb18aca047..51b2d78611bf 100644--- a/frontend/src/scenes/heatmaps/components/HeatmapsBrowser.tsx+++ b/frontend/src/scenes/heatmaps/components/HeatmapsBrowser.tsx@@ -14,8 +14,8 @@ import { useResizeObserver } from 'lib/hooks/useResizeObserver'import { IconOpenInNew } from 'lib/lemon-ui/icons'import { FixedReplayHeatmapBrowser } from 'scenes/heatmaps/components/FixedReplayHeatmapBrowser'import { teamLogic } from 'scenes/teamLogic'+import { urls } from 'scenes/urls'-import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'import { SceneContent } from '~/layout/scenes/components/SceneContent'import { FilterPanel } from './FilterPanel'@@ -311,15 +311,13 @@ function Warnings(): JSX.Element | null {const { currentTeam } = useValues(teamLogic)const heatmapsEnabled = currentTeam?.heatmaps_opt_in- const { openSettingsPanel } = useActions(sidePanelSettingsLogic)-return !heatmapsEnabled ? (<LemonBannertype="warning"action={{type: 'secondary',icon: <IconGear />,- onClick: () => openSettingsPanel({ sectionId: 'environment-heatmaps', settingId: 'heatmaps' }),+ to: urls.settings('environment-heatmaps', 'heatmaps'),children: 'Configure',}}dismissKey="heatmaps-might-be-disabled-warning"diff --git a/frontend/src/scenes/heatmaps/components/HeatmapsWarnings.tsx b/frontend/src/scenes/heatmaps/components/HeatmapsWarnings.tsxindex 8a0158584a09..ea25dacdb58b 100644--- a/frontend/src/scenes/heatmaps/components/HeatmapsWarnings.tsx+++ b/frontend/src/scenes/heatmaps/components/HeatmapsWarnings.tsx@@ -1,25 +1,22 @@-import { useActions, useValues } from 'kea'+import { useValues } from 'kea'import { IconGear } from '@posthog/icons'import { LemonBanner } from '@posthog/lemon-ui'import { teamLogic } from 'scenes/teamLogic'--import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'+import { urls } from 'scenes/urls'export function HeatmapsWarnings(): JSX.Element | null {const { currentTeam } = useValues(teamLogic)const heatmapsEnabled = currentTeam?.heatmaps_opt_in- const { openSettingsPanel } = useActions(sidePanelSettingsLogic)-return !heatmapsEnabled ? (<LemonBannertype="warning"action={{type: 'secondary',icon: <IconGear />,- onClick: () => openSettingsPanel({ sectionId: 'environment-heatmaps', settingId: 'heatmaps' }),+ to: urls.settings('environment-heatmaps', 'heatmaps'),children: 'Configure',}}dismissKey="heatmaps-might-be-disabled-warning"diff --git a/frontend/src/scenes/heatmaps/scenes/heatmap/heatmapRecordingLogic.ts b/frontend/src/scenes/heatmaps/scenes/heatmap/heatmapRecordingLogic.tsindex 58aa0310730b..8bec7a1f5841 100644--- a/frontend/src/scenes/heatmaps/scenes/heatmap/heatmapRecordingLogic.ts+++ b/frontend/src/scenes/heatmaps/scenes/heatmap/heatmapRecordingLogic.ts@@ -4,7 +4,6 @@ import { sceneConfigurations } from 'scenes/scenes'import { Scene } from 'scenes/sceneTypes'import { urls } from 'scenes/urls'-import { SIDE_PANEL_CONTEXT_KEY, SidePanelSceneContext } from '~/layout/navigation-3000/sidepanel/types'import { Breadcrumb } from '~/types'import type { heatmapRecordingLogicType } from './heatmapRecordingLogicType'@@ -25,9 +24,5 @@ export const heatmapRecordingLogic = kea<heatmapRecordingLogicType>([]},],- [SIDE_PANEL_CONTEXT_KEY]: [- () => [],- (): SidePanelSceneContext => ({ settings_section: 'environment-heatmaps' }),- ],})),])diff --git a/frontend/src/scenes/heatmaps/scenes/heatmaps/heatmapsSceneLogic.ts b/frontend/src/scenes/heatmaps/scenes/heatmaps/heatmapsSceneLogic.tsindex 84ad7cf499f8..490a0049f0ec 100644--- a/frontend/src/scenes/heatmaps/scenes/heatmaps/heatmapsSceneLogic.ts+++ b/frontend/src/scenes/heatmaps/scenes/heatmaps/heatmapsSceneLogic.ts@@ -8,7 +8,6 @@ import { Scene } from 'scenes/sceneTypes'import { teamLogic } from 'scenes/teamLogic'import { urls } from 'scenes/urls'-import { SIDE_PANEL_CONTEXT_KEY, SidePanelSceneContext } from '~/layout/navigation-3000/sidepanel/types'import { Breadcrumb, HeatmapSavedFilters, HeatmapScreenshotType } from '~/types'import type { heatmapsSceneLogicType } from './heatmapsSceneLogicType'@@ -74,10 +73,6 @@ export const heatmapsSceneLogic = kea<heatmapsSceneLogicType>([]},],- [SIDE_PANEL_CONTEXT_KEY]: [- () => [],- (): SidePanelSceneContext => ({ settings_section: 'environment-heatmaps' }),- ],})),listeners(({ actions, values }) => ({loadSavedHeatmaps: async (_, breakpoint) => {diff --git a/frontend/src/scenes/insights/insightSceneLogic.tsx b/frontend/src/scenes/insights/insightSceneLogic.tsxindex f8ba6504a054..33f8afc64fb1 100644--- a/frontend/src/scenes/insights/insightSceneLogic.tsx+++ b/frontend/src/scenes/insights/insightSceneLogic.tsx@@ -344,9 +344,8 @@ export const insightSceneLogic = kea<insightSceneLogicType>([},access_control_resource: 'insight',access_control_resource_id: `${insight.id}`,- settings_section: 'project-product-analytics',}- : { settings_section: 'project-product-analytics' }+ : null},],maxContext: [diff --git a/frontend/src/scenes/max/components/MaxChangelog.tsx b/frontend/src/scenes/max/components/MaxChangelog.tsxindex b299ddb81a23..74bba95b8908 100644--- a/frontend/src/scenes/max/components/MaxChangelog.tsx+++ b/frontend/src/scenes/max/components/MaxChangelog.tsx@@ -6,8 +6,7 @@ import { LemonButton, LemonTag } from '@posthog/lemon-ui'import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { Popover } from 'lib/lemon-ui/Popover/Popover'--import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'+import { urls } from 'scenes/urls'import { AlertEntry, ChangelogEntry, maxChangelogLogic } from '../maxChangelogLogic'@@ -45,7 +44,6 @@ export function MaxChangelog(): JSX.Element | null {const alertsFlagEnabled = useFeatureFlag('POSTHOG_AI_ALERTS')const { entries, alerts, isOpen, hasUnread, hasAlerts, isVisible } = useValues(maxChangelogLogic)const { openChangelog, closeChangelog, dismissChangelog } = useActions(maxChangelogLogic)- const { openSettingsPanel } = useActions(sidePanelSettingsLogic)const displayedEntries = useMemo(() => entries.slice(0, 4), [entries])const hasMoreEntries = entries.length > 4@@ -109,10 +107,8 @@ export function MaxChangelog(): JSX.Element | null {<LemonButtonsize="xsmall"type="tertiary"- onClick={() => {- closeChangelog()- openSettingsPanel({ sectionId: 'environment-max' })- }}+ onClick={() => closeChangelog()}+ to={urls.settings('environment-max')}>Show all</LemonButton>diff --git a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorControls.tsx b/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorControls.tsxindex 07c09f045444..dc4ea136072a 100644--- a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorControls.tsx+++ b/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorControls.tsx@@ -28,8 +28,7 @@ import {playerInspectorLogic,} from 'scenes/session-recordings/player/inspector/playerInspectorLogic'import { teamLogic } from 'scenes/teamLogic'--import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'+import { urls } from 'scenes/urls'import { SessionRecordingPlayerMode, sessionRecordingPlayerLogic } from '../sessionRecordingPlayerLogic'import { InspectorSearchInfo } from './components/InspectorSearchInfo'@@ -142,7 +141,6 @@ function NetworkFilterSettingsButton(): JSX.Element {const { logicProps } = useValues(sessionRecordingPlayerLogic)const { allItemsByItemType } = useValues(playerInspectorLogic(logicProps))const { currentTeam } = useValues(teamLogic)- const { openSettingsPanel } = useActions(sidePanelSettingsLogic)const hasNetworkItems = allItemsByItemType['network']?.length > 0@@ -167,12 +165,7 @@ function NetworkFilterSettingsButton(): JSX.Element {icon={<IconGear />}fullWidthsize="xsmall"- onClick={() =>- openSettingsPanel({- sectionId: 'project-replay',- settingId: 'replay-network',- })- }+ to={urls.settings('project-replay', 'replay-network')}>Configure network capture in settings.</LemonButton>@@ -189,7 +182,6 @@ function ConsoleFilterSettingsButton(): JSX.Element {const { logicProps } = useValues(sessionRecordingPlayerLogic)const { allItemsByItemType } = useValues(playerInspectorLogic(logicProps))const { currentTeam } = useValues(teamLogic)- const { openSettingsPanel } = useActions(sidePanelSettingsLogic)const hasConsoleItems = allItemsByItemType['console']?.length > 0@@ -214,12 +206,7 @@ function ConsoleFilterSettingsButton(): JSX.Element {icon={<IconGear />}fullWidthsize="xsmall"- onClick={() =>- openSettingsPanel({- sectionId: 'project-replay',- settingId: 'replay',- })- }+ to={urls.settings('project-replay', 'replay')}>Configure console log capture in settings.</LemonButton>diff --git a/frontend/src/types.ts b/frontend/src/types.tsindex 88df352e320e..fed9773dde13 100644--- a/frontend/src/types.ts+++ b/frontend/src/types.ts@@ -6402,7 +6402,6 @@ export enum SidePanelTab {Max = 'max',Notebooks = 'notebook',Support = 'support',- Settings = 'settings',Activity = 'activity',Discussion = 'discussion',Exports = 'exports',diff --git a/products/logs/frontend/hooks/useOpenLogsSettingsPanel.ts b/products/logs/frontend/hooks/useOpenLogsSettingsPanel.tsindex b58b4a7ef569..10951f655092 100644--- a/products/logs/frontend/hooks/useOpenLogsSettingsPanel.ts+++ b/products/logs/frontend/hooks/useOpenLogsSettingsPanel.ts@@ -1,14 +1,14 @@import { useActions } from 'kea'+import { router } from 'kea-router'import posthog from 'posthog-js'import { teamLogic } from 'scenes/teamLogic'+import { urls } from 'scenes/urls'-import { sidePanelSettingsLogic } from '~/layout/navigation-3000/sidepanel/panels/settings/sidePanelSettingsLogic'import { ProductIntentContext, ProductKey } from '~/queries/schema/schema-general'export function useOpenLogsSettingsPanel(): () => void {const { addProductIntent } = useActions(teamLogic)- const { openSettingsPanel } = useActions(sidePanelSettingsLogic)return () => {posthog.capture('logs settings opened')@@ -16,9 +16,6 @@ export function useOpenLogsSettingsPanel(): () => void {product_type: ProductKey.LOGS,intent_context: ProductIntentContext.LOGS_SETTINGS_OPENED,})- openSettingsPanel({- sectionId: 'environment-logs',- settingId: 'logs',- })+ router.actions.push(urls.settings('environment-logs', 'logs'))}}