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.

chore(alerts): move shared AlertWizard into lib/components/Alerting (4/7) (#68939)

Matt Puadaf27f9147d3
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/AlertWizard.tsx b/frontend/src/lib/components/Alerting/AlertWizard/AlertWizard.tsx
similarity index 100%
rename from frontend/src/scenes/hog-functions/AlertWizard/AlertWizard.tsx
rename to frontend/src/lib/components/Alerting/AlertWizard/AlertWizard.tsx
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/AlertWizardStepper.tsx b/frontend/src/lib/components/Alerting/AlertWizard/AlertWizardStepper.tsx
similarity index 100%
rename from frontend/src/scenes/hog-functions/AlertWizard/AlertWizardStepper.tsx
rename to frontend/src/lib/components/Alerting/AlertWizard/AlertWizardStepper.tsx
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/alertWizardLogic.test.ts b/frontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.test.ts
similarity index 100%
rename from frontend/src/scenes/hog-functions/AlertWizard/alertWizardLogic.test.ts
rename to frontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.test.ts
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/alertWizardLogic.ts b/frontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.ts
similarity index 99%
rename from frontend/src/scenes/hog-functions/AlertWizard/alertWizardLogic.ts
rename to frontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.ts
index 7cd83883928c..4ce25bfa96ba 100644
--- a/frontend/src/scenes/hog-functions/AlertWizard/alertWizardLogic.ts
+++ b/frontend/src/lib/components/Alerting/AlertWizard/alertWizardLogic.ts
@@ -137,7 +137,7 @@ function extractDestinationKeyFromAlert(alert: HogFunctionType, allDestinations:
export const alertWizardLogic = kea<alertWizardLogicType>([
props({} as AlertWizardLogicProps),
key((p) => p.logicKey),
- path((key) => ['scenes', 'hog-functions', 'AlertWizard', 'alertWizardLogic', key]),
+ path((key) => ['lib', 'components', 'Alerting', 'AlertWizard', 'alertWizardLogic', key]),
actions({
setAlertCreationView: (view: AlertCreationView) => ({ view }),
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/steps/ConfigureStep.tsx b/frontend/src/lib/components/Alerting/AlertWizard/steps/ConfigureStep.tsx
similarity index 100%
rename from frontend/src/scenes/hog-functions/AlertWizard/steps/ConfigureStep.tsx
rename to frontend/src/lib/components/Alerting/AlertWizard/steps/ConfigureStep.tsx
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/steps/DestinationStep.tsx b/frontend/src/lib/components/Alerting/AlertWizard/steps/DestinationStep.tsx
similarity index 100%
rename from frontend/src/scenes/hog-functions/AlertWizard/steps/DestinationStep.tsx
rename to frontend/src/lib/components/Alerting/AlertWizard/steps/DestinationStep.tsx
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/steps/TriggerStep.tsx b/frontend/src/lib/components/Alerting/AlertWizard/steps/TriggerStep.tsx
similarity index 100%
rename from frontend/src/scenes/hog-functions/AlertWizard/steps/TriggerStep.tsx
rename to frontend/src/lib/components/Alerting/AlertWizard/steps/TriggerStep.tsx
diff --git a/frontend/src/scenes/hog-functions/AlertWizard/steps/WizardCard.tsx b/frontend/src/lib/components/Alerting/AlertWizard/steps/WizardCard.tsx
similarity index 100%
rename from frontend/src/scenes/hog-functions/AlertWizard/steps/WizardCard.tsx
rename to frontend/src/lib/components/Alerting/AlertWizard/steps/WizardCard.tsx
diff --git a/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx b/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx
index fd8398085b1a..df6eee3924ef 100644
--- a/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx
+++ b/frontend/src/scenes/health-alerts/HealthAlertsEntryPoint.tsx
@@ -3,14 +3,14 @@ import posthog from 'posthog-js'
import { LemonButton } from '@posthog/lemon-ui'
-import { AlertWizard } from 'scenes/hog-functions/AlertWizard/AlertWizard'
+import { AlertWizard } from 'lib/components/Alerting/AlertWizard/AlertWizard'
import {
AlertCreationView,
AlertWizardLogicProps,
alertWizardLogic,
applyKindFilter,
decorateAlertName,
-} from 'scenes/hog-functions/AlertWizard/alertWizardLogic'
+} from 'lib/components/Alerting/AlertWizard/alertWizardLogic'
import { HogFunctionList } from 'scenes/hog-functions/list/HogFunctionsList'
import { HogFunctionTemplateList } from 'scenes/hog-functions/list/HogFunctionTemplateList'
import { getFiltersFromSubTemplateId } from 'scenes/hog-functions/list/LinkedHogFunctions'
diff --git a/frontend/src/scenes/health-alerts/healthAlertsWizardConfig.ts b/frontend/src/scenes/health-alerts/healthAlertsWizardConfig.ts
index 411f33eccf6b..13f838275bc8 100644
--- a/frontend/src/scenes/health-alerts/healthAlertsWizardConfig.ts
+++ b/frontend/src/scenes/health-alerts/healthAlertsWizardConfig.ts
@@ -1,4 +1,4 @@
-import { WizardDestination, WizardTrigger } from 'scenes/hog-functions/AlertWizard/alertWizardLogic'
+import { WizardDestination, WizardTrigger } from 'lib/components/Alerting/AlertWizard/alertWizardLogic'
import { HogFunctionSubTemplateIdType } from '~/types'
diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/ErrorTrackingAlerting.tsx b/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/ErrorTrackingAlerting.tsx
index 625be28c2e5d..6b26cbb0470b 100644
--- a/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/ErrorTrackingAlerting.tsx
+++ b/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/ErrorTrackingAlerting.tsx
@@ -3,12 +3,12 @@ import posthog from 'posthog-js'
import { LemonButton } from '@posthog/lemon-ui'
-import { AlertWizard } from 'scenes/hog-functions/AlertWizard/AlertWizard'
+import { AlertWizard } from 'lib/components/Alerting/AlertWizard/AlertWizard'
import {
AlertCreationView,
AlertWizardLogicProps,
alertWizardLogic,
-} from 'scenes/hog-functions/AlertWizard/alertWizardLogic'
+} from 'lib/components/Alerting/AlertWizard/alertWizardLogic'
import { HogFunctionList } from 'scenes/hog-functions/list/HogFunctionsList'
import { HogFunctionTemplateList } from 'scenes/hog-functions/list/HogFunctionTemplateList'
import { getFiltersFromSubTemplateId } from 'scenes/hog-functions/list/LinkedHogFunctions'
diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/alertWizardConfig.ts b/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/alertWizardConfig.ts
index e0b5ed277102..eff6231ac069 100644
--- a/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/alertWizardConfig.ts
+++ b/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/alerting/alertWizardConfig.ts
@@ -1,4 +1,4 @@
-import { WizardDestination, WizardTrigger } from 'scenes/hog-functions/AlertWizard/alertWizardLogic'
+import { WizardDestination, WizardTrigger } from 'lib/components/Alerting/AlertWizard/alertWizardLogic'
import { HogFunctionSubTemplateIdType } from '~/types'
diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/AlertsRecommendationCard.tsx b/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/AlertsRecommendationCard.tsx
index 775817eecfc8..763e2e697fb4 100644
--- a/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/AlertsRecommendationCard.tsx
+++ b/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/AlertsRecommendationCard.tsx
@@ -4,12 +4,12 @@ import posthog from 'posthog-js'
import { LemonButton, LemonModal } from '@posthog/lemon-ui'
-import { AlertWizard } from 'scenes/hog-functions/AlertWizard/AlertWizard'
+import { AlertWizard } from 'lib/components/Alerting/AlertWizard/AlertWizard'
import {
AlertCreationView,
AlertWizardLogicProps,
alertWizardLogic,
-} from 'scenes/hog-functions/AlertWizard/alertWizardLogic'
+} from 'lib/components/Alerting/AlertWizard/alertWizardLogic'
import { HogFunctionSubTemplateIdType } from '~/types'