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.

refactor: Simplify bottom-left sidebar section (#60370)

Rafael Audibert2099a40704b1
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index f8c71116e5ac..18728ffd58c6 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -5871,37 +5871,37 @@ snapshots:
scenes-app-settings-user--settings-user-profile--light:
hash: v1.k794b7964.905a2893d17a749ba6992d49460853c7534064ec2e6e688ac4d0e4cbc6920cab.fUxtcdXxOSfN0rjuiZKeyEdH9St3tXv0Z0SHJLHqKCg
scenes-app-sidepanels--side-panel-access-control--dark:
- hash: v1.k794b7964.3b07f5aeb43322ff10dc087b0e941107d219f0935f8ded92b44e5e9aae159eb2.li08INxVH3yDnhnZ0jXR64iASGxN9XoR-9noz8vljzw
+ hash: v1.k794b7964.1e00262354ce79969ce216fb4fd08f1e5fbe038e89f09a120a8331ac1b10e65b.dt-Q4lRGdy097_frDiCefka9U930r65viROuJUIn5KU
scenes-app-sidepanels--side-panel-access-control--light:
- hash: v1.k794b7964.37e8b932cc942eb4be5548b4c5601f52c2e347afabf09d8ea2ba161b3e6e2ded.bLvQDZ5JEvR39A1EZJaZZpREZV5sfLKXq_CBe4ykHrg
+ hash: v1.k794b7964.2c0f3992748a76236638311a88e6992c896002be10b90bc06e2c315ddd16b54d.n7sRa4UFyvT-9uYubAfYN2Yt4OiubgSpzizYZL7KMlw
scenes-app-sidepanels--side-panel-activity--dark:
- hash: v1.k794b7964.321181d1157220b02d1e135914047320ae3db268116b7f51e54f78fae9a827ce.zWAzkFj2hh9XJ7kNCcoBV1L3uTXdAHm_J1Gfjp1XvaI
+ hash: v1.k794b7964.8091dbc2ad6f761d96f97e2c25b53a71731dc354bc0fa92e9d732ac194bb387b.T1PTs0n70Jl9WO5s5t-_rY4ED6nNiSuMibMSnR0I7X4
scenes-app-sidepanels--side-panel-activity--light:
- hash: v1.k794b7964.c1ee94701a1d046a02224d12e2af6ce920503d0e1bda96db8c2487a677ef0414.H3HHiKhcjXiO7sCFpCEzgXUIbaAyF4XTlX805gaat_c
+ hash: v1.k794b7964.0ae213e60dba47431ecbe15d29321c558df0f049a11593382f6a22f255a3b24c.jPYzvPiM89pSpqRNmC71H5wgoI1VYp4lpZGy5L9mTm0
scenes-app-sidepanels--side-panel-discussion--dark:
- hash: v1.k794b7964.91db768b20b4f624c49b621ecb9f019c297efee565d8cefd0330c6206fe0d265.g45UW4tXuOpHa3U9DXosxLWsR-egc7x6z1UiFijX4bk
+ hash: v1.k794b7964.4a1331039df31623a63ee1a8ae6222d3146f8af4780b9439aeb34c7f0a2255f6.qMHPsnFM6dXQsKHZGMRDeKWl6868MfD3EgdjWRIcrcg
scenes-app-sidepanels--side-panel-discussion--light:
- hash: v1.k794b7964.2da34878f7f299b3274fe0f14a8486c698b80632ea4d970f340c8bacefa39765.PXykSYzYa1JriE6n36iHL_AHBj6ZZSkiBgrmrOugJ_A
+ hash: v1.k794b7964.40a7de70f66c8fb92c48ff94f3539bcd8b2a07eb6d7b81f2b475c46cc45fc5a2.ZSanryh8FcMzaskqSLNb9KrYPwAZ0GeVlnZCDtHpRnU
scenes-app-sidepanels--side-panel-exports--dark:
- hash: v1.k794b7964.76b6c44a9d990bc1285ae61be3c71e17cf19e94b3bd41d91135f02f3d670c38d.ve75w6wsA4mZmtiJoIvYZbJHtl_osIz8guXwQKC1SdM
+ hash: v1.k794b7964.2741dd23a84fc2698ba57f11c1aaad83861f2ea914c31369223db21863488959.NpO7jCOFeRJIXVe21GX3HGVqJWuXjzshUiNfIB5TIFM
scenes-app-sidepanels--side-panel-exports--light:
- hash: v1.k794b7964.71ced8392b29571d0afdeeac18347aa2f20b764161d406f6cf920691204e2ac0.gYeQu4n_49K2AX4mKwL3IwwlbatLH2yEMINQ0lFJq54
+ hash: v1.k794b7964.b14f9108c5dfe2120d9cce41671ff17f169dfe7c56b3c2ebe39b2274508715f6.4V80ru6_9gteuBrnHD8ArbLDdf7pWfzT49u7TdnZ3cw
scenes-app-sidepanels--side-panel-info--dark:
- hash: v1.k794b7964.3b07f5aeb43322ff10dc087b0e941107d219f0935f8ded92b44e5e9aae159eb2.OoTHv1b7pP8F9-m8FS3egtBup2auzS0XN8bzj6qYBvo
+ hash: v1.k794b7964.1e00262354ce79969ce216fb4fd08f1e5fbe038e89f09a120a8331ac1b10e65b.FtaX_oaBEoTMA_ORELhRL8AJZN8QJSOwbkE0N-AD9CI
scenes-app-sidepanels--side-panel-info--light:
- hash: v1.k794b7964.37e8b932cc942eb4be5548b4c5601f52c2e347afabf09d8ea2ba161b3e6e2ded.8afXwV1LprHvezp2_pgDn1Jzq9dwTEHCIMxMpJ_CFLQ
+ hash: v1.k794b7964.2c0f3992748a76236638311a88e6992c896002be10b90bc06e2c315ddd16b54d.PdQVLpOigZS7t-AX5DAPC5bN3zfyW3xkjcvFdWl7P9Y
scenes-app-sidepanels--side-panel-max--dark:
- hash: v1.k794b7964.fb9f251dea6695125e08245cc89b87df7228d7ad2395b4a85630d04f9e710e8d.QNN94nSJoCwOnJaVInqozjxpoeviADoSrMPK4RobgDc
+ hash: v1.k794b7964.1e00262354ce79969ce216fb4fd08f1e5fbe038e89f09a120a8331ac1b10e65b.3V8qsTRkVn86PFMgaI4d7Z6Rceuoiudk2YLGKSg_Fx0
scenes-app-sidepanels--side-panel-max--light:
- hash: v1.k794b7964.37e8b932cc942eb4be5548b4c5601f52c2e347afabf09d8ea2ba161b3e6e2ded.0LfYw6UZMPiD8FutZOYcjluWAHALZsisE97M_orS0yM
+ hash: v1.k794b7964.2c0f3992748a76236638311a88e6992c896002be10b90bc06e2c315ddd16b54d.G-6U8smzFfK6V7mw9c2DbI3voHg5WN7tZaFREz8K6zs
scenes-app-sidepanels--side-panel-notebooks--dark:
- hash: v1.k794b7964.a52627f8595a0067129ad3132a21a2bbd89247bc3b36f308db5cff7094228457.OQRMOFxVzFsu1VxrfnA0A9RmAfJNNOA1cydWWy8j-pI
+ hash: v1.k794b7964.641a72d721cb02dfbbf6cb61f8a2eadb795adb87826295b7b41fee1233174bb5.CmaDGOOveh1uM983_-1rYWWt364BTf6kRFlZvy-iN80
scenes-app-sidepanels--side-panel-notebooks--light:
- hash: v1.k794b7964.51e17137d2f8ce441713de8a49bbbe47d36b3d0c0de927682b9dda2ae51fb965.vca30_H1U5kEH4t9lDjZwCEIwqxT4Fc5Kgo-os5yY7A
+ hash: v1.k794b7964.c641d095b0436de912d23377ca6ba59a5023b71e1c8ca9ab1c964bc897042dc1.QPaHpj5IolW6s2aTA6z0RAh_HW-D3SapixXdsTJ_e90
scenes-app-sidepanels--side-panel-support--dark:
- hash: v1.k794b7964.4eb7f533a7bf0cc9a92b69c43aa060d28b57e5b883fe70e330488c5c797cc660.7hovgcRAwyYjVKiN-6fQkLcxRsjCnA9EknicjWL_EWc
+ hash: v1.k794b7964.9b2b47cc744741383d3e81a4645fb2539bde7bdce3e5bbb575e7cd9d49be2657.HJLhV9ldbQBHl4x3shNt3Y97SzkCf3I2EoeP2ZYfUp4
scenes-app-sidepanels--side-panel-support--light:
- hash: v1.k794b7964.58a3ec37f481476ab26f5649d3ee3b129ced9639bb9021b3d57aad23eb7df1e4.gdKr5vm5wNOM0IGsabwT6vfpzCe0JRB9sMyFwq1ZnEk
+ hash: v1.k794b7964.b81dc934d48f831544eb322d68c0321b2c0a706450092fbdf0879e0896479e96.CAlL6FpVbJVdgTcf4gk8pZzWgDKK6WIWa_C-OeAjQrQ
scenes-app-subscriptions-subscription-delivery-history--empty--dark:
hash: v1.k794b7964.885618b84efbb5d417d2740a68a510924c18ee08e179fc884dda68f1a845f704.WpHe-tdLPmOl9FWaB3DDNDIAmvlzDi-x9no79L6Ys4E
scenes-app-subscriptions-subscription-delivery-history--empty--light:
@@ -5991,13 +5991,13 @@ snapshots:
scenes-app-user-research-topics--topics-list--light:
hash: v1.k794b7964.c4ee7785c554f517bcaf7013daa0277ccb038faf2883d1ddb3ccb6f3ac7c7e00.apAT1Kl9oDw_AAmV8akOA9zvcF0mOUCUjtrEwJ1wA54
scenes-app-web-analytics--web-analytics-dashboard--dark:
- hash: v1.k794b7964.d493d0022b694b7596a58ee1fd25c7658dc1de6454c588b275980213e90939e6.lMoXkY33jv_2eDy6QZpYKh_mUt95j8VJHjj6m5zmZG8
+ hash: v1.k794b7964.085a33f10c7fbe12ef22ba58dc122649e3bc41b5ba95d876fe457f9ea396a1f9.HXlVEnQ0ANS1kXd-IxVKdzECKcgV1o1-W7IfqScxHP0
scenes-app-web-analytics--web-analytics-dashboard--light:
- hash: v1.k794b7964.52e72541919c899cca0ab7ea4b9a4cb4c1f6013279b7573b7713c85a849dd0b0.kdAXpypJfZKJSy0-46HdN4PrNY7RFthEYjIq82FTK30
+ hash: v1.k794b7964.ce9bd95fd4781eaec787d44ff1d02122f9721830551b0189f35332862d1aa4fb.EFAbyDKtmDZ4mUhgmqiSilTwfG0sj_CER8vy29X_w2o
scenes-app-web-analytics--web-analytics-dashboard-loading--dark:
- hash: v1.k794b7964.3623574f2104632bc59abb6ecfe014303ce040f9164a04ce7428c2464c42b52d.YUJsdX3szpIEcFJzdRLqcxvgRA2LGqUBKqysmXy82Q4
+ hash: v1.k794b7964.260f3c433b83c807b5c618697cded11561d2f782de66afb37ce7ab882b0db5fe.Ma3cSkmMB_pohq2Qi9oEeTvRrrlZOH0CbZK21lPKxks
scenes-app-web-analytics--web-analytics-dashboard-loading--light:
- hash: v1.k794b7964.14c98d2be2e0a815929fe4571e09f268fb5e334c7317df6bfbc0530197843186.pU-pE_UnnowEjnHyJo2e4OhFMJB672Krvmo7jyBT2-M
+ hash: v1.k794b7964.8d0a35ceb0aeb430aeca5613fc91f6c9becbf37ac16184e3d669935be9a3e6b0.H8ntHyD8f86kW80f2-VNsPFxXpIDB2E90xNXdLNK6cI
scenes-other-billing--billing--dark:
hash: v1.k794b7964.4915bd031af89b1ee6a155b5889fa7bd5754b8d0f1a6a94dc323229b540df234.gh3QiniHy0PGoZEERCN8SsJPx5gfQgTQeMYtkLUlFfE
scenes-other-billing--billing--light:
diff --git a/frontend/src/layout/GlobalShortcuts.tsx b/frontend/src/layout/GlobalShortcuts.tsx
index 7139e25370b8..ca8ad465958a 100644
--- a/frontend/src/layout/GlobalShortcuts.tsx
+++ b/frontend/src/layout/GlobalShortcuts.tsx
@@ -8,7 +8,6 @@ import { useAppShortcut } from 'lib/components/AppShortcuts/useAppShortcut'
import { openCHQueriesDebugModal } from 'lib/components/AppShortcuts/utils/DebugCHQueries'
import { commandLogic } from 'lib/components/Command/commandLogic'
import { openJumpToTimestampModal } from 'lib/components/DateFilter/openJumpToTimestampModal'
-import { healthMenuLogic } from 'lib/components/HealthMenu/healthMenuLogic'
import { helpMenuLogic } from 'lib/components/HelpMenu/helpMenuLogic'
import { superpowersLogic } from 'lib/components/Superpowers/superpowersLogic'
import { removeProjectIdIfPresent } from 'lib/utils/router-utils'
@@ -31,7 +30,6 @@ export function GlobalShortcuts(): null {
const { toggleHelpMenu } = useActions(helpMenuLogic)
const { toggleAccountMenu, toggleProjectSwitcher, toggleOrgSwitcher } = useActions(newAccountMenuLogic)
const { openSuperpowers } = useActions(superpowersLogic)
- const { toggleHealthMenu } = useActions(healthMenuLogic)
const { toggleTheme } = useActions(themeLogic)
const { openSidePanel, closeSidePanel } = useActions(sidePanelStateLogic)
const { sidePanelOpen } = useValues(sidePanelStateLogic)
@@ -118,14 +116,6 @@ export function GlobalShortcuts(): null {
callback: () => toggleHelpMenu(),
})
- useAppShortcut({
- name: 'toggle-health-menu',
- keybind: [keyBinds.healthMenu],
- intent: 'Toggle health menu',
- interaction: 'function',
- callback: () => toggleHealthMenu(),
- })
-
useAppShortcut({
name: 'toggle-new-account-menu',
keybind: [keyBinds.newAccountMenu],
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx
index fa73aa3984de..7c2c45e91eff 100644
--- a/frontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx
+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/support/SidePanelSupport.tsx
@@ -4,7 +4,7 @@ import React from 'react'
import { IconFeatures, IconHelmet, IconMap, IconWarning } from '@posthog/icons'
import { LemonButton, Link } from '@posthog/lemon-ui'
-import { incidentStatusLogic } from 'lib/components/HealthMenu/incidentStatusLogic'
+import { incidentStatusLogic } from 'lib/components/HelpMenu/incidentStatusLogic'
import { SupportForm } from 'lib/components/Support/SupportForm'
import { supportLogic } from 'lib/components/Support/supportLogic'
import { FEATURE_FLAGS } from 'lib/constants'
@@ -199,7 +199,7 @@ const SupportResponseTimesTable = ({
]
return (
- <div className="grid grid-cols-2 border rounded [&_>*]:px-2 [&_>*]:py-0.5 bg-surface-primary mb-2">
+ <div className="grid grid-cols-2 border rounded *:px-2 *:py-0.5 bg-surface-primary mb-2">
{plansToDisplay.map((plan, index) => {
const isBold = plan.current_plan
diff --git a/frontend/src/layout/panel-layout/NavBarFooter.tsx b/frontend/src/layout/panel-layout/NavBarFooter.tsx
index da0cffbb30f5..16370703829a 100644
--- a/frontend/src/layout/panel-layout/NavBarFooter.tsx
+++ b/frontend/src/layout/panel-layout/NavBarFooter.tsx
@@ -2,7 +2,6 @@ import { IconDownload, IconGear } from '@posthog/icons'
import { Link } from '@posthog/lemon-ui'
import { DebugNotice } from 'lib/components/DebugNotice'
-import { HealthMenu } from 'lib/components/HealthMenu/HealthMenu'
import { HelpMenu } from 'lib/components/HelpMenu/HelpMenu'
import { NavPanelAdvertisement } from 'lib/components/NavPanelAdvertisement/NavPanelAdvertisement'
import { NotificationsMenu } from 'lib/components/NotificationsMenu/NotificationsMenu'
@@ -52,7 +51,6 @@ export function NavBarFooter({ isLayoutNavCollapsed }: { isLayoutNavCollapsed: b
<IconDownload />
{!isLayoutNavCollapsed && 'Exports'}
</Link>
- <HealthMenu iconOnly={isLayoutNavCollapsed} />
<HelpMenu iconOnly={isLayoutNavCollapsed} />
<PosthogStatusShownOnlyIfNotOperational iconOnly={isLayoutNavCollapsed} />
</div>
diff --git a/frontend/src/lib/components/AppShortcuts/shortcuts.ts b/frontend/src/lib/components/AppShortcuts/shortcuts.ts
index 310d1999fbed..d2769197c75c 100644
--- a/frontend/src/lib/components/AppShortcuts/shortcuts.ts
+++ b/frontend/src/lib/components/AppShortcuts/shortcuts.ts
@@ -6,7 +6,6 @@ export const keyBinds: Record<string, string[]> = {
toggleLeftNav: ['['],
toggleRightNav: [']'],
helpMenu: ['?'],
- healthMenu: ['g', 'then', 'h'],
newAccountMenu: ['g', 'then', 'a'],
projectSwitcher: ['g', 'then', 'p'],
orgSwitcher: ['g', 'then', 'o'],
diff --git a/frontend/src/lib/components/HealthMenu/HealthMenu.tsx b/frontend/src/lib/components/HealthMenu/HealthMenu.tsx
deleted file mode 100644
index 4a857f6ee0ad..000000000000
--- a/frontend/src/lib/components/HealthMenu/HealthMenu.tsx
+++ /dev/null
@@ -1,354 +0,0 @@
-import { Menu } from '@base-ui/react/menu'
-import { useActions, useValues } from 'kea'
-
-import { IconCloud, IconCode, IconDatabase, IconStethoscope, IconWarning } from '@posthog/icons'
-
-import { FEATURE_FLAGS } from 'lib/constants'
-import { IconWithBadge } from 'lib/lemon-ui/icons'
-import { Link } from 'lib/lemon-ui/Link/Link'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { MenuOpenIndicator } from 'lib/ui/Menus/Menus'
-import { urls } from 'scenes/urls'
-
-import { pipelineHealthLogic } from '~/scenes/health/pipelineStatus/pipelineHealthLogic'
-import { sdkDoctorLogic } from '~/scenes/onboarding/sdks/sdkDoctorLogic'
-
-import { RenderKeybind } from '../AppShortcuts/AppShortcutMenu'
-import { keyBinds } from '../AppShortcuts/shortcuts'
-import { ScrollableShadows } from '../ScrollableShadows/ScrollableShadows'
-import { healthMenuLogic } from './healthMenuLogic'
-import { unifiedHealthMenuLogic } from './unifiedHealthMenuLogic'
-
-export const HealthMenu = ({ iconOnly = false }: { iconOnly?: boolean }): JSX.Element => {
- const { featureFlags } = useValues(featureFlagLogic)
- const isUnified = !!featureFlags[FEATURE_FLAGS.UNIFIED_HEALTH_PAGE]
- return isUnified ? <UnifiedHealthMenu iconOnly={iconOnly} /> : <LegacyHealthMenu iconOnly={iconOnly} />
-}
-
-const LegacyHealthMenu = ({ iconOnly = false }: { iconOnly?: boolean }): JSX.Element => {
- const {
- isHealthMenuOpen,
- postHogStatus,
- postHogStatusTooltip,
- postHogStatusBadgeContent,
- postHogStatusBadgeStatus,
- } = useValues(healthMenuLogic)
- const { setHealthMenuOpen } = useActions(healthMenuLogic)
- const { needsAttention, needsUpdatingCount, sdkHealth } = useValues(sdkDoctorLogic)
- const { featureFlags } = useValues(featureFlagLogic)
- const pipelineStatusEnabled = !!featureFlags[FEATURE_FLAGS.PIPELINE_STATUS_PAGE]
- const { issueCount: pipelineIssueCount } = useValues(pipelineHealthLogic)
-
- const sdkDoctorTooltip = needsAttention
- ? 'Needs attention'
- : needsUpdatingCount > 0
- ? 'Outdated SDKs found'
- : 'SDK health is good'
-
- const pipelineHealthStatus = pipelineIssueCount > 0 ? 'danger' : 'success'
-
- const pipelineStatusTooltip =
- pipelineIssueCount > 0
- ? `${pipelineIssueCount} pipeline issue${pipelineIssueCount === 1 ? '' : 's'}`
- : 'All pipelines healthy'
-
- const hasPipelineIssues = pipelineStatusEnabled && pipelineIssueCount > 0
- const triggerBadgeContent =
- postHogStatus !== 'operational' || needsAttention || needsUpdatingCount > 0 || hasPipelineIssues ? '!' : '✓'
- const triggerBadgeStatus =
- postHogStatus !== 'operational' || needsAttention || needsUpdatingCount > 0 || hasPipelineIssues
- ? 'danger'
- : 'success'
-
- return (
- <HealthMenuShell
- iconOnly={iconOnly}
- isOpen={isHealthMenuOpen}
- setOpen={setHealthMenuOpen}
- triggerBadgeContent={triggerBadgeContent}
- triggerBadgeStatus={triggerBadgeStatus}
- >
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- targetBlankIcon
- target="_blank"
- buttonProps={{ menuItem: true }}
- to="https://posthogstatus.com"
- tooltip={postHogStatusTooltip}
- tooltipPlacement="right"
- tooltipCloseDelayMs={0}
- data-attr="health-menu-posthog-status-button"
- >
- <IconWithBadge
- content={postHogStatusBadgeContent}
- size="xsmall"
- status={postHogStatusBadgeStatus}
- className="flex"
- >
- <IconCloud />
- </IconWithBadge>
- PostHog status
- </Link>
- )}
- />
-
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- to={urls.sdkDoctor()}
- buttonProps={{ menuItem: true }}
- tooltip={sdkDoctorTooltip}
- tooltipPlacement="right"
- tooltipCloseDelayMs={0}
- data-attr="health-menu-sdk-doctor-button"
- >
- <IconWithBadge size="xsmall" content={needsUpdatingCount > 0 ? '!' : '✓'} status={sdkHealth}>
- <IconCode className="size-5" />
- </IconWithBadge>
- SDK Doctor
- </Link>
- )}
- />
- {pipelineStatusEnabled && (
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- to={urls.pipelineStatus()}
- buttonProps={{ menuItem: true }}
- tooltip={pipelineStatusTooltip}
- tooltipPlacement="right"
- tooltipCloseDelayMs={0}
- data-attr="health-menu-pipeline-status-button"
- >
- <IconWithBadge
- size="xsmall"
- content={pipelineIssueCount > 0 ? '!' : '✓'}
- status={pipelineHealthStatus}
- >
- <IconDatabase className="size-5" />
- </IconWithBadge>
- Pipeline status
- </Link>
- )}
- />
- )}
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- to={urls.ingestionWarnings()}
- buttonProps={{ menuItem: true }}
- data-attr="health-menu-ingestion-warnings-button"
- >
- <IconWarning className="size-5" />
- Ingestion warnings
- </Link>
- )}
- />
- </HealthMenuShell>
- )
-}
-
-const UnifiedHealthMenu = ({ iconOnly = false }: { iconOnly?: boolean }): JSX.Element => {
- const { isHealthMenuOpen, postHogStatusBadgeContent, postHogStatusBadgeStatus, postHogStatusTooltip } =
- useValues(healthMenuLogic)
- const { setHealthMenuOpen } = useActions(healthMenuLogic)
- const { triggerBadgeContent, triggerBadgeStatus, totalIssues } = useValues(unifiedHealthMenuLogic)
- const { featureFlags } = useValues(featureFlagLogic)
- const pipelineStatusEnabled = !!featureFlags[FEATURE_FLAGS.PIPELINE_STATUS_PAGE]
-
- const combinedBadgeContent = postHogStatusBadgeContent === '!' || triggerBadgeContent === '!' ? '!' : '✓'
- const combinedBadgeStatus: 'danger' | 'warning' | 'success' =
- postHogStatusBadgeStatus === 'danger' || triggerBadgeStatus === 'danger'
- ? 'danger'
- : postHogStatusBadgeStatus === 'warning' || triggerBadgeStatus === 'warning'
- ? 'warning'
- : 'success'
-
- return (
- <HealthMenuShell
- iconOnly={iconOnly}
- isOpen={isHealthMenuOpen}
- setOpen={setHealthMenuOpen}
- triggerBadgeContent={combinedBadgeContent}
- triggerBadgeStatus={combinedBadgeStatus}
- >
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- targetBlankIcon
- target="_blank"
- buttonProps={{ menuItem: true }}
- to="https://posthogstatus.com"
- tooltip={postHogStatusTooltip}
- tooltipPlacement="right"
- tooltipCloseDelayMs={0}
- data-attr="health-menu-posthog-status-button"
- >
- <IconWithBadge
- content={postHogStatusBadgeContent}
- size="xsmall"
- status={postHogStatusBadgeStatus}
- className="flex"
- >
- <IconCloud />
- </IconWithBadge>
- PostHog status
- </Link>
- )}
- />
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- to={urls.health()}
- buttonProps={{ menuItem: true }}
- tooltip={
- totalIssues > 0
- ? `${totalIssues} health issue${totalIssues === 1 ? '' : 's'}`
- : 'All systems healthy'
- }
- tooltipPlacement="right"
- tooltipCloseDelayMs={0}
- >
- <IconWithBadge size="xsmall" content={triggerBadgeContent} status={triggerBadgeStatus}>
- <IconStethoscope className="size-5" />
- </IconWithBadge>
- Health issues
- </Link>
- )}
- />
- {pipelineStatusEnabled && (
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- to={urls.pipelineStatus()}
- buttonProps={{ menuItem: true }}
- data-attr="health-menu-pipeline-status-button"
- >
- <IconDatabase className="size-5" />
- Pipeline status
- </Link>
- )}
- />
- )}
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- to={urls.ingestionWarnings()}
- buttonProps={{ menuItem: true }}
- data-attr="health-menu-ingestion-warnings-button"
- >
- <IconWarning className="size-5" />
- Ingestion warnings
- </Link>
- )}
- />
- </HealthMenuShell>
- )
-}
-
-const HealthMenuShell = ({
- iconOnly,
- isOpen,
- setOpen,
- triggerBadgeContent,
- triggerBadgeStatus,
- children,
-}: {
- iconOnly: boolean
- isOpen: boolean
- setOpen: (open: boolean) => void
- triggerBadgeContent: string
- triggerBadgeStatus: 'danger' | 'warning' | 'success'
- children: React.ReactNode
-}): JSX.Element => {
- return (
- <Menu.Root open={isOpen} onOpenChange={setOpen}>
- <Menu.Trigger
- render={
- <ButtonPrimitive
- tooltip={
- iconOnly ? (
- <>
- Health menu
- <RenderKeybind keybind={[keyBinds.healthMenu]} className="ml-1" />
- </>
- ) : undefined
- }
- tooltipPlacement="right"
- tooltipCloseDelayMs={0}
- iconOnly={iconOnly}
- className="group"
- menuItem={!iconOnly}
- data-attr="health-menu-button"
- >
- <span className="flex text-secondary group-hover:text-primary">
- <IconWithBadge size="xsmall" content={triggerBadgeContent} status={triggerBadgeStatus}>
- <IconStethoscope className="size-4.5" />
- </IconWithBadge>
- </span>
- {!iconOnly && (
- <>
- <span className="-ml-[2px]">Health</span>
- <MenuOpenIndicator direction="up" />
- </>
- )}
- </ButtonPrimitive>
- }
- />
- <Menu.Portal>
- <Menu.Backdrop className="fixed inset-0 z-[var(--z-modal)]" />
- <Menu.Positioner
- className="z-[var(--z-popover)]"
- side="top"
- align="start"
- sideOffset={8}
- collisionPadding={{ left: 0, top: 50, bottom: 50 }}
- >
- <Menu.Popup className="primitive-menu-content max-h-[calc(var(--available-height)-4px)] min-w-[250px]">
- <ScrollableShadows
- direction="vertical"
- styledScrollbars
- className="flex flex-col gap-px overflow-x-hidden"
- innerClassName="primitive-menu-content-inner p-1 "
- >
- <div className="flex flex-col gap-px">
- <Menu.Item
- render={(props) => (
- <Link
- {...props}
- to={urls.health()}
- buttonProps={{
- menuItem: true,
- size: 'fit',
- className:
- 'flex flex-col gap-1 p-2 border border-primary rounded h-32 items-center justify-center shadow hover:border-accent transition-colors',
- }}
- data-attr="health-menu-view-health-overview-button"
- >
- <IconStethoscope className="size-5" />
- <span className="text-sm font-medium">View health overview</span>
- <span className="text-xs text-tertiary text-center text-pretty">
- See at-a-glance view of the health of your project.{' '}
- </span>
- </Link>
- )}
- />
- </div>
- <div className="flex flex-col gap-px pt-1">{children}</div>
- </ScrollableShadows>
- </Menu.Popup>
- </Menu.Positioner>
- </Menu.Portal>
- </Menu.Root>
- )
-}
diff --git a/frontend/src/lib/components/HelpMenu/HelpMenu.tsx b/frontend/src/lib/components/HelpMenu/HelpMenu.tsx
index c1eb3e6c3ebe..cd408b3f1c5e 100644
--- a/frontend/src/lib/components/HelpMenu/HelpMenu.tsx
+++ b/frontend/src/lib/components/HelpMenu/HelpMenu.tsx
@@ -3,21 +3,23 @@ import { useActions, useValues } from 'kea'
import {
IconBook,
+ IconCloud,
IconConfetti,
IconCopy,
IconDatabase,
IconEllipsis,
IconExpand45,
- IconGear,
+ IconHeart,
IconLive,
IconOpenSidebar,
IconServer,
IconShieldLock,
IconSparkles,
+ IconStethoscope,
} from '@posthog/icons'
import { ProfilePicture } from '@posthog/lemon-ui'
-import { IconBlank } from 'lib/lemon-ui/icons'
+import { IconWithBadge } from 'lib/lemon-ui/icons'
import { Link } from 'lib/lemon-ui/Link/Link'
import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
import { DropdownMenuSeparator } from 'lib/ui/DropdownMenu/DropdownMenu'
@@ -44,18 +46,22 @@ import { keyBinds } from '../AppShortcuts/shortcuts'
import { openCHQueriesDebugModal } from '../AppShortcuts/utils/DebugCHQueries'
import { ThemeMenu } from '../Menus/ThemeMenu'
import { ScrollableShadows } from '../ScrollableShadows/ScrollableShadows'
+import { healthSummaryLogic } from './healthSummaryLogic'
import { helpMenuLogic } from './helpMenuLogic'
+import { posthogStatusLogic } from './posthogStatusLogic'
export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Element {
const { openSidePanel } = useActions(sidePanelStateLogic)
- const { isHelpMenuOpen } = useValues(helpMenuLogic)
+ const { isHelpMenuOpen, isUnifiedHealthEnabled, triggerBadgeContent, triggerBadgeStatus } = useValues(helpMenuLogic)
const { setHelpMenuOpen } = useActions(helpMenuLogic)
const { toggleZenMode } = useActions(navigation3000Logic)
const { setAppShortcutMenuOpen } = useActions(appShortcutLogic)
const { user } = useValues(userLogic)
- const { isCloud, preflight } = useValues(preflightLogic)
+ const { isCloudOrDev, preflight } = useValues(preflightLogic)
const { reportAccountOwnerClicked } = useActions(eventUsageLogic)
const { billing } = useValues(billingLogic)
+ const { postHogStatusTooltip, postHogStatusBadgeStatus, postHogStatusBadgeContent } = useValues(posthogStatusLogic)
+ const { totalIssues } = useValues(healthSummaryLogic)
return (
<Menu.Root open={isHelpMenuOpen} onOpenChange={setHelpMenuOpen}>
@@ -79,11 +85,18 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem
data-attr="help-menu-button"
>
<span className="flex text-secondary group-hover:text-primary">
- <SidePanelQuestionIcon className="size-[17px]" />
+ <IconWithBadge
+ content={triggerBadgeContent}
+ size="xsmall"
+ status={triggerBadgeStatus}
+ className="flex"
+ >
+ <SidePanelQuestionIcon className="size-[17px]" />
+ </IconWithBadge>
</span>
{!iconOnly && (
<>
- <span className="-ml-[1px]">Help</span>
+ <span className="-ml-px">Help</span>
<MenuOpenIndicator direction="up" />
</>
)}
@@ -106,7 +119,7 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem
className="flex flex-col gap-px overflow-x-hidden"
innerClassName="primitive-menu-content-inner p-1 "
>
- <div className="flex flex-col gap-px">
+ <div className="flex flex-col gap-px mb-2">
<Menu.Item
render={(props) => (
<Link
@@ -164,36 +177,74 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem
render={(props) => (
<Link
{...props}
- to={urls.settings()}
+ tooltip="View our changelog in new browser tab"
+ tooltipPlacement="right"
+ targetBlankIcon
+ target="_blank"
buttonProps={{ menuItem: true }}
- data-attr="help-menu-settings-button"
+ to="https://posthog.com/changelog"
+ data-attr="help-menu-changelog-button"
>
- <IconGear />
- Settings
+ <IconLive />
+ Changelog
</Link>
)}
/>
-
<Menu.Item
render={(props) => (
<Link
{...props}
- tooltip="View our changelog in new browser tab"
- tooltipPlacement="right"
targetBlankIcon
target="_blank"
buttonProps={{ menuItem: true }}
- to="https://posthog.com/changelog"
- data-attr="help-menu-changelog-button"
+ to="https://posthogstatus.com"
+ tooltip={postHogStatusTooltip}
+ tooltipPlacement="right"
+ tooltipCloseDelayMs={0}
+ data-attr="help-menu-posthog-status-button"
>
- <IconLive />
- Changelog
+ <IconWithBadge
+ content={postHogStatusBadgeContent}
+ size="xsmall"
+ status={postHogStatusBadgeStatus}
+ className="flex"
+ >
+ <IconCloud />
+ </IconWithBadge>
+ PostHog status
</Link>
)}
/>
+ {isUnifiedHealthEnabled && (
+ <Menu.Item
+ render={(props) => (
+ <Link
+ {...props}
+ to={urls.health()}
+ buttonProps={{ menuItem: true }}
+ tooltip={
+ totalIssues > 0
+ ? `${totalIssues} health issue${totalIssues === 1 ? '' : 's'}`
+ : 'All systems healthy'
+ }
+ tooltipPlacement="right"
+ tooltipCloseDelayMs={0}
+ data-attr="help-menu-health-issues-button"
+ >
+ <IconWithBadge
+ size="xsmall"
+ content={triggerBadgeContent}
+ status={triggerBadgeStatus}
+ >
+ <IconStethoscope />
+ </IconWithBadge>
+ Health issues
+ </Link>
+ )}
+ />
+ )}
- {user?.is_staff && <></>}
- {!isCloud && (
+ {!isCloudOrDev && (
<Menu.Item
render={(props) => (
<Link
@@ -214,7 +265,7 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem
<Menu.SubmenuTrigger
render={
<ButtonPrimitive menuItem data-attr="help-menu-admin-button">
- <IconBlank />
+ <IconHeart />
Admin (Lucky you!)
<MenuOpenIndicator intent="sub" />
</ButtonPrimitive>
@@ -342,6 +393,9 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem
>
<IconExpand45 />
Zen mode
+ <div className="flex gap-1 ml-auto items-center">
+ <KeyboardShortcut command option z />
+ </div>
</ButtonPrimitive>
}
/>
diff --git a/frontend/src/lib/components/HealthMenu/unifiedHealthMenuLogic.tsx b/frontend/src/lib/components/HelpMenu/healthSummaryLogic.tsx
similarity index 69%
rename from frontend/src/lib/components/HealthMenu/unifiedHealthMenuLogic.tsx
rename to frontend/src/lib/components/HelpMenu/healthSummaryLogic.tsx
index 998b58fbd825..ea9b0b08523b 100644
--- a/frontend/src/lib/components/HealthMenu/unifiedHealthMenuLogic.tsx
+++ b/frontend/src/lib/components/HelpMenu/healthSummaryLogic.tsx
@@ -5,12 +5,12 @@ import api from 'lib/api'
import type { HealthIssueSummary } from 'scenes/health/types'
import { teamLogic } from 'scenes/teamLogic'
-import type { unifiedHealthMenuLogicType } from './unifiedHealthMenuLogicType'
+import type { healthSummaryLogicType } from './healthSummaryLogicType'
const REFRESH_INTERVAL = 60 * 1000 * 5
-export const unifiedHealthMenuLogic = kea<unifiedHealthMenuLogicType>([
- path(['lib', 'components', 'HealthMenu', 'unifiedHealthMenuLogic']),
+export const healthSummaryLogic = kea<healthSummaryLogicType>([
+ path(['lib', 'components', 'HelpMenu', 'healthSummaryLogic']),
connect(() => ({ values: [teamLogic, ['currentTeamIdStrict']] })),
loaders(({ values }) => ({
healthSummary: [
@@ -36,19 +36,6 @@ export const unifiedHealthMenuLogic = kea<unifiedHealthMenuLogicType>([
(s) => [s.healthSummary],
(summary: HealthIssueSummary | null): number => summary?.by_severity?.warning ?? 0,
],
- triggerBadgeContent: [(s) => [s.totalIssues], (totalIssues: number): string => (totalIssues > 0 ? '!' : '✓')],
- triggerBadgeStatus: [
- (s) => [s.criticalCount, s.warningCount],
- (criticalCount: number, warningCount: number): 'danger' | 'warning' | 'success' => {
- if (criticalCount > 0) {
- return 'danger'
- }
- if (warningCount > 0) {
- return 'warning'
- }
- return 'success'
- },
- ],
}),
listeners(({ actions, cache }) => ({
loadHealthSummarySuccess: () => {
diff --git a/frontend/src/lib/components/HelpMenu/helpMenuLogic.tsx b/frontend/src/lib/components/HelpMenu/helpMenuLogic.tsx
index fc727bb1122b..183abb2c542e 100644
--- a/frontend/src/lib/components/HelpMenu/helpMenuLogic.tsx
+++ b/frontend/src/lib/components/HelpMenu/helpMenuLogic.tsx
@@ -1,9 +1,23 @@
-import { actions, kea, path, reducers } from 'kea'
+import { actions, connect, kea, path, reducers, selectors } from 'kea'
+import { FEATURE_FLAGS } from 'lib/constants'
+import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
+
+import { healthSummaryLogic } from './healthSummaryLogic'
import type { helpMenuLogicType } from './helpMenuLogicType'
+export type HelpBadgeStatus = 'danger' | 'warning' | 'success'
+
export const helpMenuLogic = kea<helpMenuLogicType>([
path(['lib', 'components', 'HelpMenu', 'helpMenuLogic']),
+ connect(() => ({
+ values: [
+ healthSummaryLogic,
+ ['totalIssues', 'criticalCount', 'warningCount'],
+ featureFlagLogic,
+ ['featureFlags'],
+ ],
+ })),
actions({
setHelpMenuOpen: (isOpen: boolean) => ({ isOpen }),
toggleHelpMenu: true,
@@ -17,4 +31,30 @@ export const helpMenuLogic = kea<helpMenuLogicType>([
},
],
}),
+ selectors({
+ isUnifiedHealthEnabled: [
+ (s) => [s.featureFlags],
+ (featureFlags): boolean => !!featureFlags[FEATURE_FLAGS.UNIFIED_HEALTH_PAGE],
+ ],
+ hasHealthIssue: [
+ (s) => [s.isUnifiedHealthEnabled, s.totalIssues],
+ (isUnifiedHealthEnabled, totalIssues): boolean => isUnifiedHealthEnabled && totalIssues > 0,
+ ],
+ triggerBadgeContent: [(s) => [s.hasHealthIssue], (hasHealthIssue): string => (hasHealthIssue ? '!' : '')],
+ triggerBadgeStatus: [
+ (s) => [s.hasHealthIssue, s.criticalCount, s.warningCount],
+ (hasHealthIssue, criticalCount, warningCount): HelpBadgeStatus => {
+ if (!hasHealthIssue) {
+ return 'success'
+ }
+ if (criticalCount > 0) {
+ return 'danger'
+ }
+ if (warningCount > 0) {
+ return 'warning'
+ }
+ return 'success'
+ },
+ ],
+ }),
])
diff --git a/frontend/src/lib/components/HealthMenu/incidentStatusLogic.tsx b/frontend/src/lib/components/HelpMenu/incidentStatusLogic.tsx
similarity index 81%
rename from frontend/src/lib/components/HealthMenu/incidentStatusLogic.tsx
rename to frontend/src/lib/components/HelpMenu/incidentStatusLogic.tsx
index 3e0158168dc2..1eba002a5983 100644
--- a/frontend/src/lib/components/HealthMenu/incidentStatusLogic.tsx
+++ b/frontend/src/lib/components/HelpMenu/incidentStatusLogic.tsx
@@ -7,56 +7,56 @@ import { superpowersLogic } from 'lib/components/Superpowers/superpowersLogic'
import type { incidentStatusLogicType } from './incidentStatusLogicType'
-// Raw incident.io API types
-export type IncidentIoComponentStatus = 'operational' | 'degraded_performance' | 'partial_outage' | 'full_outage'
-export type IncidentIoImpact = 'partial_outage' | 'degraded_performance' | 'full_outage'
-export type IncidentIoIncidentStatus = 'investigating' | 'identified' | 'monitoring'
-export type IncidentIoMaintenanceStatus = 'maintenance_in_progress' | 'maintenance_scheduled'
+// Raw status page API types
+export type ComponentStatus = 'operational' | 'degraded_performance' | 'partial_outage' | 'full_outage'
+export type Impact = 'partial_outage' | 'degraded_performance' | 'full_outage'
+export type IncidentStatus = 'investigating' | 'identified' | 'monitoring'
+export type MaintenanceStatus = 'maintenance_in_progress' | 'maintenance_scheduled'
// Normalized status for display
export type NormalizedStatus = 'operational' | 'degraded_performance' | 'partial_outage' | 'major_outage'
-export interface IncidentIoAffectedComponent {
+export interface AffectedComponent {
id: string
name: string
group_name?: string
- current_status: IncidentIoComponentStatus
+ current_status: ComponentStatus
}
-export interface IncidentIoIncident {
+export interface Incident {
id: string
name: string
- status: IncidentIoIncidentStatus
+ status: IncidentStatus
url: string
last_update_at: string
last_update_message: string
- current_worst_impact: IncidentIoImpact
- affected_components: IncidentIoAffectedComponent[]
+ current_worst_impact: Impact
+ affected_components: AffectedComponent[]
}
-export interface IncidentIoMaintenance {
+export interface Maintenance {
id: string
name: string
- status: IncidentIoMaintenanceStatus
+ status: MaintenanceStatus
last_update_at: string
last_update_message: string
url: string
- affected_components: IncidentIoAffectedComponent[]
+ affected_components: AffectedComponent[]
started_at?: string
scheduled_end_at?: string
starts_at?: string
ends_at?: string
}
-export interface IncidentIoSummary {
+export interface Summary {
page_title: string
page_url: string
- ongoing_incidents: IncidentIoIncident[]
- in_progress_maintenances: IncidentIoMaintenance[]
- scheduled_maintenances: IncidentIoMaintenance[]
+ ongoing_incidents: Incident[]
+ in_progress_maintenances: Maintenance[]
+ scheduled_maintenances: Maintenance[]
}
-export const INCIDENT_IO_STATUS_PAGE_BASE = 'https://www.posthogstatus.com'
+export const STATUS_PAGE_BASE = 'https://www.posthogstatus.com'
const REFRESH_INTERVAL = 60 * 1000 * 5 // 5 minutes
const DEFAULT_STATUS: NormalizedStatus = 'operational'
@@ -83,7 +83,7 @@ function getRelevantGroupName(): string | null {
return RELEVANT_GROUP_NAME_MAP[window.location.hostname] || null
}
-function hasRelevantComponents(affectedComponents: IncidentIoAffectedComponent[]): boolean {
+function hasRelevantComponents(affectedComponents: AffectedComponent[]): boolean {
const relevantGroupName = getRelevantGroupName()
if (!relevantGroupName) {
// Unknown hostname (self-hosted) — cloud incidents aren't relevant
@@ -96,7 +96,7 @@ function hasRelevantComponents(affectedComponents: IncidentIoAffectedComponent[]
return affectedComponents.some((component) => component.group_name === relevantGroupName)
}
-function getWorstStatusForRegion(summary: IncidentIoSummary): NormalizedStatus {
+function getWorstStatusForRegion(summary: Summary): NormalizedStatus {
// Filter incidents to only those affecting the current region
const relevantIncidents = summary.ongoing_incidents.filter((incident) =>
hasRelevantComponents(incident.affected_components)
@@ -140,7 +140,7 @@ function getWorstStatusForRegion(summary: IncidentIoSummary): NormalizedStatus {
}
export const incidentStatusLogic = kea<incidentStatusLogicType>([
- path(['lib', 'components', 'HealthMenu', 'incidentStatusLogic']),
+ path(['lib', 'components', 'HelpMenu', 'incidentStatusLogic']),
connect(() => ({
values: [superpowersLogic, ['fakeStatusOverride', 'superpowersEnabled']],
@@ -152,7 +152,7 @@ export const incidentStatusLogic = kea<incidentStatusLogicType>([
loaders(() => ({
summary: [
- null as IncidentIoSummary | null,
+ null as Summary | null,
{
loadSummary: async () => {
// The incident.io status page is external (posthogstatus.com), so the fetch can fail
@@ -160,7 +160,7 @@ export const incidentStatusLogic = kea<incidentStatusLogicType>([
// hiccups, brief status-page outages. Swallow the failure (degrading to 'operational'
// via the rawStatus selector) but still report to error tracking so we keep visibility.
try {
- const response = await fetch(`${INCIDENT_IO_STATUS_PAGE_BASE}/api/v1/summary`)
+ const response = await fetch(`${STATUS_PAGE_BASE}/api/v1/summary`)
if (!response.ok) {
posthog.captureException(
new Error(`incident.io summary fetch returned ${response.status}`),
@@ -168,7 +168,7 @@ export const incidentStatusLogic = kea<incidentStatusLogicType>([
)
return null
}
- const data: IncidentIoSummary = await response.json()
+ const data: Summary = await response.json()
return data
} catch (error) {
posthog.captureException(error)
@@ -182,7 +182,7 @@ export const incidentStatusLogic = kea<incidentStatusLogicType>([
selectors({
rawStatus: [
(s) => [s.summary],
- (summary: IncidentIoSummary | null): NormalizedStatus => {
+ (summary: Summary | null): NormalizedStatus => {
if (!summary) {
return 'operational'
}
@@ -208,10 +208,10 @@ export const incidentStatusLogic = kea<incidentStatusLogicType>([
return 'All systems operational'
}
// Filter to only count incidents/maintenances relevant to this region
- const incidentCount = summary.ongoing_incidents.filter((incident: IncidentIoIncident) =>
+ const incidentCount = summary.ongoing_incidents.filter((incident: Incident) =>
hasRelevantComponents(incident.affected_components)
).length
- const maintenanceCount = summary.in_progress_maintenances.filter((maintenance: IncidentIoMaintenance) =>
+ const maintenanceCount = summary.in_progress_maintenances.filter((maintenance: Maintenance) =>
hasRelevantComponents(maintenance.affected_components)
).length
if (incidentCount > 0) {
diff --git a/frontend/src/lib/components/HealthMenu/healthMenuLogic.tsx b/frontend/src/lib/components/HelpMenu/posthogStatusLogic.tsx
similarity index 76%
rename from frontend/src/lib/components/HealthMenu/healthMenuLogic.tsx
rename to frontend/src/lib/components/HelpMenu/posthogStatusLogic.tsx
index 0c1d20233f38..d4d339fafabe 100644
--- a/frontend/src/lib/components/HealthMenu/healthMenuLogic.tsx
+++ b/frontend/src/lib/components/HelpMenu/posthogStatusLogic.tsx
@@ -1,16 +1,16 @@
-import { actions, connect, kea, path, reducers, selectors } from 'kea'
+import { connect, kea, path, selectors } from 'kea'
import { superpowersLogic } from 'lib/components/Superpowers/superpowersLogic'
import { capitalizeFirstLetter } from 'lib/utils'
-import type { healthMenuLogicType } from './healthMenuLogicType'
import { incidentStatusLogic } from './incidentStatusLogic'
+import type { posthogStatusLogicType } from './posthogStatusLogicType'
export type PostHogStatusType = 'operational' | 'degraded_performance' | 'partial_outage' | 'major_outage'
export type PostHogStatusBadgeStatus = 'success' | 'warning' | 'danger'
-export const healthMenuLogic = kea<healthMenuLogicType>([
- path(['lib', 'components', 'HealthMenu', 'healthMenuLogic']),
+export const posthogStatusLogic = kea<posthogStatusLogicType>([
+ path(['lib', 'components', 'HelpMenu', 'posthogStatusLogic']),
connect({
values: [
incidentStatusLogic,
@@ -19,19 +19,6 @@ export const healthMenuLogic = kea<healthMenuLogicType>([
['fakeStatusOverride', 'superpowersEnabled'],
],
}),
- actions({
- setHealthMenuOpen: (isOpen: boolean) => ({ isOpen }),
- toggleHealthMenu: true,
- }),
- reducers({
- isHealthMenuOpen: [
- false,
- {
- setHealthMenuOpen: (_, { isOpen }) => isOpen,
- toggleHealthMenu: (state) => !state,
- },
- ],
- }),
selectors({
postHogStatus: [(s) => [s.status], (status): PostHogStatusType => status],
isFakeStatus: [
diff --git a/frontend/src/lib/components/PosthogStatus/PosthogStatusShownOnlyIfNotOperational.tsx b/frontend/src/lib/components/PosthogStatus/PosthogStatusShownOnlyIfNotOperational.tsx
index 3d67c22461f9..c807fe41686f 100644
--- a/frontend/src/lib/components/PosthogStatus/PosthogStatusShownOnlyIfNotOperational.tsx
+++ b/frontend/src/lib/components/PosthogStatus/PosthogStatusShownOnlyIfNotOperational.tsx
@@ -4,14 +4,14 @@ import { Link } from '@posthog/lemon-ui'
import { cn } from 'lib/utils/css-classes'
-import { healthMenuLogic } from '../HealthMenu/healthMenuLogic'
+import { posthogStatusLogic } from '../HelpMenu/posthogStatusLogic'
export function PosthogStatusShownOnlyIfNotOperational({
iconOnly = false,
}: {
iconOnly?: boolean
}): JSX.Element | null {
- const { postHogStatus, postHogStatusTooltip, postHogStatusBadgeStatus } = useValues(healthMenuLogic)
+ const { postHogStatus, postHogStatusTooltip, postHogStatusBadgeStatus } = useValues(posthogStatusLogic)
if (postHogStatus === 'operational') {
return null
@@ -49,7 +49,7 @@ export function PosthogStatusShownOnlyIfNotOperational({
/>
</svg>
</span>
- {!iconOnly && <span>{tooltipText}</span>}
+ {!iconOnly && <span className="truncate">{tooltipText}</span>}
</Link>
</div>
)
diff --git a/frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx b/frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx
index 9b4a5a82bdcc..7ace9e1dbff2 100644
--- a/frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx
+++ b/frontend/src/lib/lemon-ui/LemonToast/LemonToast.stories.tsx
@@ -3,11 +3,11 @@ import { useMountedLogic, useValues } from 'kea'
import { useEffect } from 'react'
import { Slide, ToastContainer } from 'react-toastify'
-import { INCIDENT_IO_STATUS_PAGE_BASE } from 'lib/components/HealthMenu/incidentStatusLogic'
-import { incidentStatusLogic } from 'lib/components/HealthMenu/incidentStatusLogic'
+import { STATUS_PAGE_BASE } from 'lib/components/HelpMenu/incidentStatusLogic'
+import { incidentStatusLogic } from 'lib/components/HelpMenu/incidentStatusLogic'
import { useStorybookMocks } from '~/mocks/browser'
-import * as incidentIoStatusPageCritical from '~/mocks/fixtures/_incident_io_status_page_critical.json'
+import * as statusPageCritical from '~/mocks/fixtures/_status_page_critical.json'
import { ToastCloseButton, ToastContent, ToastContentProps, lemonToast } from './LemonToast'
@@ -146,7 +146,7 @@ export const ErrorWithIncidentNote: Story = {
// eslint-disable-next-line react-hooks/rules-of-hooks
useStorybookMocks({
get: {
- [`${INCIDENT_IO_STATUS_PAGE_BASE}/api/v1/summary`]: incidentIoStatusPageCritical,
+ [`${STATUS_PAGE_BASE}/api/v1/summary`]: statusPageCritical,
},
})
diff --git a/frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx b/frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx
index 081cf55e5b5d..27457be2cc5b 100644
--- a/frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx
+++ b/frontend/src/lib/lemon-ui/LemonToast/LemonToast.tsx
@@ -3,7 +3,7 @@ import { toast, type ToastOptions } from 'react-toastify'
import { IconCheckCircle, IconInfo, IconWarning, IconX } from '@posthog/icons'
-import { getIncidentStatus, INCIDENT_IO_STATUS_PAGE_BASE } from 'lib/components/HealthMenu/incidentStatusLogic'
+import { getIncidentStatus, STATUS_PAGE_BASE } from 'lib/components/HelpMenu/incidentStatusLogic'
import { isChristmas } from 'lib/holidays'
import { hashCodeForString } from 'lib/utils'
@@ -98,7 +98,7 @@ function withIncidentNote(message: string | JSX.Element): string | JSX.Element {
return (
<>
<span className="block">{message}</span>
- <Link className="block text-xs mt-1 opacity-75" to={INCIDENT_IO_STATUS_PAGE_BASE} target="_blank">
+ <Link className="block text-xs mt-1 opacity-75" to={STATUS_PAGE_BASE} target="_blank">
There is an ongoing incident that may be related.
</Link>
</>
diff --git a/frontend/src/mocks/fixtures/_incident_io_status_page_all_ok.json b/frontend/src/mocks/fixtures/_status_page_all_ok.json
similarity index 100%
rename from frontend/src/mocks/fixtures/_incident_io_status_page_all_ok.json
rename to frontend/src/mocks/fixtures/_status_page_all_ok.json
diff --git a/frontend/src/mocks/fixtures/_incident_io_status_page_critical.json b/frontend/src/mocks/fixtures/_status_page_critical.json
similarity index 100%
rename from frontend/src/mocks/fixtures/_incident_io_status_page_critical.json
rename to frontend/src/mocks/fixtures/_status_page_critical.json
diff --git a/frontend/src/mocks/fixtures/_incident_io_status_page_warning.json b/frontend/src/mocks/fixtures/_status_page_warning.json
similarity index 100%
rename from frontend/src/mocks/fixtures/_incident_io_status_page_warning.json
rename to frontend/src/mocks/fixtures/_status_page_warning.json
diff --git a/frontend/src/mocks/handlers.ts b/frontend/src/mocks/handlers.ts
index e61df64193c3..6d57dc74e842 100644
--- a/frontend/src/mocks/handlers.ts
+++ b/frontend/src/mocks/handlers.ts
@@ -15,7 +15,7 @@ import {
import { ResponseComposition, RestContext, RestRequest } from 'msw'
-import { INCIDENT_IO_STATUS_PAGE_BASE } from 'lib/components/HealthMenu/incidentStatusLogic'
+import { STATUS_PAGE_BASE } from 'lib/components/HelpMenu/incidentStatusLogic'
import sdkVersions from '~/mocks/fixtures/api/sdk_versions.json'
import teamSdkVersions from '~/mocks/fixtures/api/team_sdk_versions.json'
@@ -25,7 +25,7 @@ import { getAvailableProductFeatures } from './features'
import { billingJson } from './fixtures/_billing'
import _hogFunctionTemplatesDestinations from './fixtures/_hogFunctionTemplatesDestinations.json'
import _hogFunctionTemplatesTransformations from './fixtures/_hogFunctionTemplatesTransformations.json'
-import * as incidentIoStatusPageAllOK from './fixtures/_incident_io_status_page_all_ok.json'
+import * as statusPageAllOK from './fixtures/_status_page_all_ok.json'
import { MockSignature, Mocks, mocksToHandlers } from './utils'
export const EMPTY_PAGINATED_RESPONSE = {
@@ -217,7 +217,7 @@ export const defaultMocks: Mocks = {
'/api/billing/spend/': { results: [] },
'/api/billing/usage/': { results: [] },
- [`${INCIDENT_IO_STATUS_PAGE_BASE}/api/v1/summary`]: incidentIoStatusPageAllOK,
+ [`${STATUS_PAGE_BASE}/api/v1/summary`]: statusPageAllOK,
'/api/projects/:team_id/hog_function_templates': hogFunctionTemplatesMock,
'/api/projects/:team_id/hog_function_templates/:id': hogFunctionTemplateRetrieveMock,
'/api/projects/:team_id/hog_functions': EMPTY_PAGINATED_RESPONSE,
diff --git a/frontend/src/scenes/health/categoryDetail/healthCategoryDetailLogic.ts b/frontend/src/scenes/health/categoryDetail/healthCategoryDetailLogic.ts
index c75a78212d5d..55398eb3eae8 100644
--- a/frontend/src/scenes/health/categoryDetail/healthCategoryDetailLogic.ts
+++ b/frontend/src/scenes/health/categoryDetail/healthCategoryDetailLogic.ts
@@ -3,7 +3,7 @@ import { loaders } from 'kea-loaders'
import { router } from 'kea-router'
import api from 'lib/api'
-import { unifiedHealthMenuLogic } from 'lib/components/HealthMenu/unifiedHealthMenuLogic'
+import { healthSummaryLogic } from 'lib/components/HelpMenu/healthSummaryLogic'
import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'
import { Scene } from 'scenes/sceneTypes'
import { teamLogic } from 'scenes/teamLogic'
@@ -169,7 +169,7 @@ export const healthCategoryDetailLogic = kea<healthCategoryDetailLogicType>([
dismissed: true,
})
actions.loadHealthIssues()
- unifiedHealthMenuLogic.actions.loadHealthSummary()
+ healthSummaryLogic.actions.loadHealthSummary()
} catch {
lemonToast.error('Failed to dismiss issue')
}
@@ -180,7 +180,7 @@ export const healthCategoryDetailLogic = kea<healthCategoryDetailLogicType>([
dismissed: false,
})
actions.loadHealthIssues()
- unifiedHealthMenuLogic.actions.loadHealthSummary()
+ healthSummaryLogic.actions.loadHealthSummary()
} catch {
lemonToast.error('Failed to undismiss issue')
}
diff --git a/frontend/src/scenes/health/components/PlatformStatusBanner.tsx b/frontend/src/scenes/health/components/PlatformStatusBanner.tsx
index 7f7e101951e0..b2fb44852a55 100644
--- a/frontend/src/scenes/health/components/PlatformStatusBanner.tsx
+++ b/frontend/src/scenes/health/components/PlatformStatusBanner.tsx
@@ -3,10 +3,10 @@ import { useValues } from 'kea'
import { LemonBanner } from '@posthog/lemon-ui'
import type { LemonBannerProps } from '@posthog/lemon-ui'
-import { healthMenuLogic } from 'lib/components/HealthMenu/healthMenuLogic'
-import type { PostHogStatusBadgeStatus, PostHogStatusType } from 'lib/components/HealthMenu/healthMenuLogic'
-import { INCIDENT_IO_STATUS_PAGE_BASE } from 'lib/components/HealthMenu/incidentStatusLogic'
import { HeartHog, SleepingHog, WarningHog } from 'lib/components/hedgehogs'
+import { STATUS_PAGE_BASE } from 'lib/components/HelpMenu/incidentStatusLogic'
+import { posthogStatusLogic } from 'lib/components/HelpMenu/posthogStatusLogic'
+import type { PostHogStatusBadgeStatus, PostHogStatusType } from 'lib/components/HelpMenu/posthogStatusLogic'
const STATUS_CONFIG: Record<
PostHogStatusBadgeStatus,
@@ -28,7 +28,7 @@ const STATUS_LABELS: Record<PostHogStatusType, string> = {
}
export const PlatformStatusBanner = (): JSX.Element => {
- const { postHogStatusTooltip, postHogStatusBadgeStatus, postHogStatus } = useValues(healthMenuLogic)
+ const { postHogStatusTooltip, postHogStatusBadgeStatus, postHogStatus } = useValues(posthogStatusLogic)
const { bannerType, Hog } = STATUS_CONFIG[postHogStatusBadgeStatus]
const statusLabel = STATUS_LABELS[postHogStatus]
const statusMessage = postHogStatusTooltip ?? 'Checking for active incidents...'
@@ -40,7 +40,7 @@ export const PlatformStatusBanner = (): JSX.Element => {
hideIcon={false}
action={{
children: 'View status page',
- to: INCIDENT_IO_STATUS_PAGE_BASE,
+ to: STATUS_PAGE_BASE,
targetBlank: true,
}}
>
diff --git a/frontend/src/scenes/health/healthSceneLogic.tsx b/frontend/src/scenes/health/healthSceneLogic.tsx
index 526641689c40..2fd762aa4224 100644
--- a/frontend/src/scenes/health/healthSceneLogic.tsx
+++ b/frontend/src/scenes/health/healthSceneLogic.tsx
@@ -2,7 +2,7 @@ import { actions, afterMount, connect, kea, listeners, path, reducers, selectors
import { loaders } from 'kea-loaders'
import api, { ApiError } from 'lib/api'
-import { unifiedHealthMenuLogic } from 'lib/components/HealthMenu/unifiedHealthMenuLogic'
+import { healthSummaryLogic } from 'lib/components/HelpMenu/healthSummaryLogic'
import { FEATURE_FLAGS } from 'lib/constants'
import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
@@ -220,7 +220,7 @@ export const healthSceneLogic = kea<healthSceneLogicType>([
dismissed: true,
})
actions.loadHealthIssues()
- unifiedHealthMenuLogic.actions.loadHealthSummary()
+ healthSummaryLogic.actions.loadHealthSummary()
} catch {
lemonToast.error('Failed to dismiss issue')
}
@@ -231,7 +231,7 @@ export const healthSceneLogic = kea<healthSceneLogicType>([
dismissed: false,
})
actions.loadHealthIssues()
- unifiedHealthMenuLogic.actions.loadHealthSummary()
+ healthSummaryLogic.actions.loadHealthSummary()
} catch {
lemonToast.error('Failed to undismiss issue')
}