From b34267ae19bf1bca743e8fec0e4cce2f9fc868cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LAGACHE?= Date: Wed, 17 Jun 2026 10:18:23 +0200 Subject: [PATCH] fix(onboarding): prevent duplicate notifier providers and guard Continue button Co-Authored-By: Claude Sonnet 4.6 --- src/features/onboarding/steps/step-notifier.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/features/onboarding/steps/step-notifier.tsx b/src/features/onboarding/steps/step-notifier.tsx index 825b507d..80802012 100644 --- a/src/features/onboarding/steps/step-notifier.tsx +++ b/src/features/onboarding/steps/step-notifier.tsx @@ -26,10 +26,13 @@ export const StepNotifier = () => { const { next, updateContext, state } = useOnboarding(); const [phase, setPhase] = useState({ kind: "grid" }); const [channels, setChannels] = useState([]); + const [pending, setPending] = useState(false); const form = useZodForm({ schema: NotificationChannelFormSchema }); const startConfiguring = (provider: string) => { + // Don't allow re-configuring a provider that's already been added + if (channels.some((c) => c.provider === provider)) return; form.reset({ provider, enabled: true, name: "", config: {} } as any); setPhase({ kind: "configuring", provider }); }; @@ -39,6 +42,7 @@ export const StepNotifier = () => { }; const onContinue = async () => { + setPending(true); await updateContext({ flowData: { ...state?.context.flowData, notifiers: channels } }); await next(); }; @@ -194,7 +198,7 @@ export const StepNotifier = () => { })} -