From b2b08bd35cf990a8466ac6510195c511bf09d03c Mon Sep 17 00:00:00 2001 From: TerrifiedBug Date: Tue, 28 Apr 2026 13:02:18 +0100 Subject: [PATCH] chore(ui): move Outbound Webhooks back to Settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Outbound Webhooks fire on lifecycle events (deploys, version changes, fleet activity, backup failures) — not alert rule evaluations. Hosting them under Alerts > Channels conflated two different concepts: - NotificationChannel: per-environment alert routing (alert rule fires → channel delivers) - OutboundWebhook: team-scoped event firehose (no rule needed) Move OutboundWebhooksSection to /settings/webhooks (its original home, which has been a redirect since the consolidation in #176). Settings already hosts comparable integration-style configs (auth, SCIM, audit shipping, telemetry, backup), making it the natural place for outbound event subscriptions. Also surfaces the section as a card on the Settings overview so it's discoverable; the command palette entry already pointed at the new URL. Alerts > Channels now contains only Notification Channels. --- src/app/(dashboard)/alerts/page.tsx | 14 +++----------- .../settings/_components/settings-overview.tsx | 8 ++++++++ .../_components/outbound-webhooks-section.tsx | 0 src/app/(dashboard)/settings/webhooks/page.tsx | 9 +++------ 4 files changed, 14 insertions(+), 17 deletions(-) rename src/app/(dashboard)/{alerts => settings/webhooks}/_components/outbound-webhooks-section.tsx (100%) diff --git a/src/app/(dashboard)/alerts/page.tsx b/src/app/(dashboard)/alerts/page.tsx index e4e59700..d6629aba 100644 --- a/src/app/(dashboard)/alerts/page.tsx +++ b/src/app/(dashboard)/alerts/page.tsx @@ -20,7 +20,6 @@ import { PageHeader } from "@/components/page-header"; import { Skeleton } from "@/components/ui/skeleton"; import { AlertRulesSection } from "./_components/alert-rules-section"; import { NotificationChannelsSection } from "./_components/notification-channels-section"; -import { OutboundWebhooksSection } from "./_components/outbound-webhooks-section"; import { AlertHistorySection } from "./_components/alert-history-section"; import { AnomalyHistorySection } from "./_components/anomaly-history-section"; import { CorrelatedAlertHistory } from "./_components/correlated-alert-history"; @@ -130,16 +129,9 @@ export default function AlertsPage() { {/* ── Channels Tab ──────────────────────────────────── */} -
- - {/* Team-scoped subscription firehose for events outside the - AlertRule → channel routing model. Lives here (rather than - under global settings) so all webhook configuration is in - one place. */} - -
+
{/* ── History Tab ───────────────────────────────────── */} diff --git a/src/app/(dashboard)/settings/_components/settings-overview.tsx b/src/app/(dashboard)/settings/_components/settings-overview.tsx index 85699ed5..62013eca 100644 --- a/src/app/(dashboard)/settings/_components/settings-overview.tsx +++ b/src/app/(dashboard)/settings/_components/settings-overview.tsx @@ -19,6 +19,7 @@ import { Upload, Activity, Send, + Webhook, } from "lucide-react"; import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; @@ -124,6 +125,13 @@ const CATEGORIES: SettingsCategory[] = [ icon: Upload, requiredSuperAdmin: true, }, + { + title: "Outbound Webhooks", + description: "Forward events (deploys, version changes, fleet activity) to external systems via HMAC-signed POSTs.", + href: "/settings/webhooks", + icon: Webhook, + requiredSuperAdmin: false, + }, ]; export function SettingsOverview() { diff --git a/src/app/(dashboard)/alerts/_components/outbound-webhooks-section.tsx b/src/app/(dashboard)/settings/webhooks/_components/outbound-webhooks-section.tsx similarity index 100% rename from src/app/(dashboard)/alerts/_components/outbound-webhooks-section.tsx rename to src/app/(dashboard)/settings/webhooks/_components/outbound-webhooks-section.tsx diff --git a/src/app/(dashboard)/settings/webhooks/page.tsx b/src/app/(dashboard)/settings/webhooks/page.tsx index a6ac338c..c5fefe6d 100644 --- a/src/app/(dashboard)/settings/webhooks/page.tsx +++ b/src/app/(dashboard)/settings/webhooks/page.tsx @@ -1,8 +1,5 @@ -import { redirect } from "next/navigation"; +import { OutboundWebhooksSection } from "./_components/outbound-webhooks-section"; -// Outbound webhook configuration moved to Alerts > Channels so all webhook -// surfaces live next to alert rules + notification channels. Anyone who has -// the old /settings/webhooks URL bookmarked lands in the new location. -export default function WebhooksRedirectPage() { - redirect("/alerts?tab=channels"); +export default function WebhooksPage() { + return ; }