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(cdp): fix dead back arrow on notification configuration pages (#64163)

Phill233d184f0ef7
diff --git a/frontend/src/scenes/feature-flags/FeatureFlags.tsx b/frontend/src/scenes/feature-flags/FeatureFlags.tsx
index d0d686152355..0d1108de4185 100644
--- a/frontend/src/scenes/feature-flags/FeatureFlags.tsx
+++ b/frontend/src/scenes/feature-flags/FeatureFlags.tsx
@@ -728,6 +728,7 @@ function FeatureFlagNotificationsTab(): JSX.Element {
subTemplateId="feature-flag-change"
description="Get notified when feature flags are created, updated, or deleted."
dialogTitle="New feature flag notification"
+ returnTo={urls.featureFlags(FeatureFlagsTab.NOTIFICATIONS)}
/>
)
}
diff --git a/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx b/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx
index 97e9f3ad2322..fd8398085b1a 100644
--- a/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx
+++ b/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx
@@ -14,6 +14,7 @@ import {
import { HogFunctionList } from 'scenes/hog-functions/list/HogFunctionsList'
import { HogFunctionTemplateList } from 'scenes/hog-functions/list/HogFunctionTemplateList'
import { getFiltersFromSubTemplateId } from 'scenes/hog-functions/list/LinkedHogFunctions'
+import { urls } from 'scenes/urls'
import { CyclotronJobFiltersType, HogFunctionSubTemplateType } from '~/types'
@@ -117,6 +118,7 @@ function HealthAlertsEntryPointInner(): JSX.Element {
<HogFunctionList
forceFilterGroups={HOG_FUNCTION_FILTER_LIST}
type="internal_destination"
+ returnTo={urls.healthAlerts(selectedKinds ?? undefined)}
onDeleteHogFunction={(hogFunction) => {
posthog.capture('health_alerts_deleted', { hog_function_id: hogFunction.id })
}}
diff --git a/frontend/src/scenes/hog-functions/list/LinkedHogFunctions.tsx b/frontend/src/scenes/hog-functions/list/LinkedHogFunctions.tsx
index 11f2805f901f..9e61e7ba7f59 100644
--- a/frontend/src/scenes/hog-functions/list/LinkedHogFunctions.tsx
+++ b/frontend/src/scenes/hog-functions/list/LinkedHogFunctions.tsx
@@ -81,6 +81,7 @@ export function LinkedHogFunctions({
key={logicKey}
forceFilterGroups={hogFunctionFilterList}
type={type}
+ returnTo={queryParams?.returnTo}
hideFeedback={hideFeedback}
emptyText={emptyText}
extraControls={
diff --git a/frontend/src/scenes/hog-functions/list/NotificationsPane.tsx b/frontend/src/scenes/hog-functions/list/NotificationsPane.tsx
index 955b1ad13a6a..b62a298ebe55 100644
--- a/frontend/src/scenes/hog-functions/list/NotificationsPane.tsx
+++ b/frontend/src/scenes/hog-functions/list/NotificationsPane.tsx
@@ -23,6 +23,8 @@ export interface NotificationsPaneProps {
dialogTitle?: string
/** The billing feature required to use notifications. Defaults to AUDIT_LOGS. */
requiredFeature?: AvailableFeature
+ /** Where the back arrow on a notification's configuration page should return to */
+ returnTo?: string
}
export function NotificationsPane({
@@ -30,6 +32,7 @@ export function NotificationsPane({
description,
dialogTitle,
requiredFeature = AvailableFeature.AUDIT_LOGS,
+ returnTo,
}: NotificationsPaneProps): JSX.Element {
const restrictedReason = useRestrictedArea({
scope: RestrictionScope.Project,
@@ -56,6 +59,7 @@ export function NotificationsPane({
<HogFunctionList
forceFilterGroups={hogFunctionFilterList}
type="internal_destination"
+ returnTo={returnTo}
extraControls={
<LemonButton
type="primary"