Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useActions, useValues } from 'kea'
import React from 'react'

import { IconFeatures, IconHelmet, IconMap } from '@posthog/icons'
import { IconFeatures, IconHelmet, IconMap, IconWarning } from '@posthog/icons'
import { LemonButton, Link } from '@posthog/lemon-ui'

import { SupportForm } from 'lib/components/Support/SupportForm'
Expand All @@ -20,6 +20,8 @@ import { AvailableFeature, BillingFeatureType, BillingPlan, BillingType, SidePan

import { SidePanelPaneHeader } from '../components/SidePanelPaneHeader'
import { sidePanelLogic } from '../sidePanelLogic'
import { sidePanelStatusIncidentIoLogic } from './sidePanelStatusIncidentIoLogic'
import { sidePanelStatusLogic } from './sidePanelStatusLogic'

const Section = ({ title, children }: { title: string; children: React.ReactNode }): React.ReactElement => {
return (
Expand All @@ -32,6 +34,54 @@ const Section = ({ title, children }: { title: string; children: React.ReactNode
)
}

const StatusPageAlert = (): JSX.Element | null => {
const { featureFlags } = useValues(featureFlagLogic)
const useIncidentIo = !!featureFlags[FEATURE_FLAGS.INCIDENT_IO_STATUS_PAGE]
const { openSidePanel } = useActions(sidePanelLogic)

const { status: atlassianStatus, statusPage } = useValues(sidePanelStatusLogic)
const { status: incidentIoStatus, statusDescription: incidentIoDescription } =
useValues(sidePanelStatusIncidentIoLogic)

const status = useIncidentIo ? incidentIoStatus : atlassianStatus

if (status === 'operational') {
return null
}

const description = useIncidentIo
? incidentIoDescription
: statusPage?.status.description || 'We are experiencing issues'

const severityClass = status.includes('outage')
? 'bg-danger-highlight border-danger'
: 'bg-warning-highlight border-warning'

return (
<div className={`border rounded p-3 mb-3 ${severityClass}`}>
<div className="flex items-start gap-2">
<IconWarning className="text-warning w-5 h-5 shrink-0 mt-0.5" />
<div className="flex-1">
<p className="font-semibold mb-1">{description}</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will the description actually include?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it always something based on a count of active incidents? like 1 ongoing incident in your example?

Copy link
Contributor Author

@clr182 clr182 Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the desc is pulled from sidePanelStatusIncidentLogic.tsx and depends on the INCIDENT_IO_STATUS_PAGE flag. when it's an incident.io status it's a count based message like the examplke

<p className="text-sm mb-2">
We're aware of issues that may affect your experience. Check our status page for updates before
contacting support.
</p>
<LemonButton
type="secondary"
size="small"
fullWidth
center
onClick={() => openSidePanel(SidePanelTab.Status)}
>
View status page
</LemonButton>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be tempted to delete the button (it's quite big IMO) and inline the status link with a href on the current status text

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this instead?
image

</div>
</div>
</div>
)
}

// In order to set these turn on the `support-message-override` feature flag.

//Support offsite messaging
Expand Down Expand Up @@ -323,6 +373,7 @@ export function SidePanelSupport(): JSX.Element {

{showEmailSupport && isBillingLoaded && (
<Section title="Contact us">
<StatusPageAlert />
<p>Can't find what you need and PostHog AI unable to help?</p>
<LemonButton
type="secondary"
Expand Down
Loading