Skip to content

Commit 37b2315

Browse files
committed
fix(project-creation): Recreate when an integration alert is configured
The back-nav reuse check compared platform, name, team, and alert-frequency fields but not the messaging-integration notification selection, so adding an integration alert on return and creating could take the reuse shortcut and skip createNotificationAction, silently dropping the rule. The selection is not persisted across nav, so the baseline is always no integration. Treat a configured integration notification as a change that defeats reuse, forcing a fresh project so the rule is created. Persisting the selection and comparing it precisely is tracked in VDY-124. (Addresses Cursor Bugbot.)
1 parent 87d3982 commit 37b2315

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

static/app/views/onboarding/components/useScmProjectDetails.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,13 @@ export function useScmProjectDetails({
288288
alertRuleConfig.alertSetting === savedAlert?.alertSetting &&
289289
alertRuleConfig.interval === savedAlert?.interval &&
290290
alertRuleConfig.metric === savedAlert?.metric &&
291-
alertRuleConfig.threshold === savedAlert?.threshold;
291+
alertRuleConfig.threshold === savedAlert?.threshold &&
292+
// A configured messaging-integration notification would create a rule the
293+
// reused project lacks: the selection isn't persisted across nav, so the
294+
// baseline is always "no integration". Treat it as a change so the reuse
295+
// shortcut can't silently drop the notification rule. Persisting the
296+
// selection (and comparing it precisely) is tracked as follow-up work.
297+
!notificationProps.actions.includes(MultipleCheckboxOptions.INTEGRATION);
292298

293299
const submit = useCallback(async () => {
294300
if (!selectedPlatform || !canSubmit || isCompletingRef.current) {

0 commit comments

Comments
 (0)