diff --git a/web/src/pages/admin/autoscan/SourcesPanel.tsx b/web/src/pages/admin/autoscan/SourcesPanel.tsx index 094697d1..fe73eb7d 100644 --- a/web/src/pages/admin/autoscan/SourcesPanel.tsx +++ b/web/src/pages/admin/autoscan/SourcesPanel.tsx @@ -1323,9 +1323,15 @@ function AddSourceDialog({ // Generate the endpoint immediately and stay open: the operator still // needs the URL, and closing here is what previously left them to // hunt for a "Generate webhook URL" button on the row. + // + // On failure, stay open holding the created source rather than + // closing. The source exists and is enabled at this point, so + // dismissing the dialog would leave an enabled webhook source with no + // endpoint and no visible explanation. The instructions panel renders + // a retry when the URL is missing. createWebhook.mutate(created.id, { onSuccess: (withWebhook) => setCreatedWebhookSource(withWebhook), - onError: close, + onError: () => setCreatedWebhookSource(created), }); }, }, @@ -1365,10 +1371,37 @@ function AddSourceDialog({ {createdWebhookSource ? (
- + {createdWebhookSource.webhook_url ? ( + + ) : ( +
+

+ + Couldn't generate the webhook URL +

+

+ The source was created, but has no endpoint yet — it can't receive anything + until one exists. +

+ +
+ )}
) : available.isLoading ? (

Loading available sources…