Skip to content

feat: add Slack webhook as a contact type - #55

Merged
jasoncrawford merged 9 commits into
mainfrom
feature/sms-alerting
Feb 24, 2026
Merged

jasoncrawford merged 9 commits into
mainfrom
feature/sms-alerting

Conversation

@jasoncrawford

@jasoncrawford jasoncrawford commented Feb 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Contacts now support two types: email and Slack
  • Slack contacts store an incoming webhook URL — paste it from your Slack app setup
  • Incidents post to all Slack webhook contacts with @channel mention, alongside email alerts
  • Settings page has an email/Slack dropdown that toggles between email and webhook URL inputs
  • No new environment variables needed — everything is managed through the UI
  • Removes twilio dependency; Slack webhooks use plain fetch

Closes #53

Changes

  • Migration: adds type and webhook_url columns to contacts, makes email nullable
  • UI: AddContactForm client component with type selector
  • Notifications: sendIncidentSlack sends to webhook URLs with @channel + incident link
  • Check runner: partitions contacts by type, sends email and Slack alerts in parallel

Test plan

  • All 122 unit tests pass
  • Lint passes
  • Verify adding email contact still works on preview deploy
  • Verify adding Slack webhook contact with valid URL works
  • Verify invalid webhook URLs are rejected
  • Verify Slack alert arrives when an incident is created

🤖 Generated with Claude Code

Add Twilio-based SMS notifications alongside existing email alerts.
Contacts now have a type (email or sms) and alerts are dispatched
to the appropriate channel when incidents are opened.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Feb 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
site-status Ready Ready Preview, Comment Feb 24, 2026 5:53am

Request Review

@supabase

supabase Bot commented Feb 24, 2026 •

Copy link
Copy Markdown

Updates to Preview Branch (feature/sms-alerting) ↗︎

Deployments Status Updated
Database ✅ Tue, 24 Feb 2026 05:53:54 UTC
Services ✅ Tue, 24 Feb 2026 05:53:54 UTC
APIs ✅ Tue, 24 Feb 2026 05:53:54 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ✅ Tue, 24 Feb 2026 05:53:54 UTC
Migrations ✅ Tue, 24 Feb 2026 05:53:55 UTC
Seeding ✅ Tue, 24 Feb 2026 05:53:56 UTC
Edge Functions ✅ Tue, 24 Feb 2026 05:53:56 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

Replace SMS/Twilio approach with Slack incoming webhooks. When
SLACK_WEBHOOK_URL is set, incidents are posted to Slack alongside
email alerts. Optional SLACK_MENTION env var for @-mentions.

No database changes needed — Slack is a global notification channel
configured via environment variables, not per-contact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford jasoncrawford changed the title feat: add SMS alerting support for contacts feat: add Slack webhook notifications for incidents Feb 24, 2026
Contacts can now be email or Slack. Slack contacts store a webhook URL
and receive incident alerts via Slack with @channel mentions. No env
vars needed — webhook URLs are managed through the settings UI.

- Migration adds type and webhook_url columns to contacts
- Settings page has email/slack selector with conditional input
- Check runner partitions contacts by type, sends to both channels
- Removes twilio dependency; Slack uses plain fetch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford jasoncrawford changed the title feat: add Slack webhook notifications for incidents feat: add Slack webhook as a contact type Feb 24, 2026
Use "Site status alert: new incident" instead of @channel so
users can add it to Slack keyword notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Log Supabase errors on contact insert to diagnose staging failures.
E2e tests now verify both email and Slack contacts appear in the
list with correct type badges, and that both types can be removed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Branch DBs that applied the earlier SMS migration have a phone column
and type CHECK for 'sms'. This migration renames phone -> webhook_url
and updates the constraint to 'slack'. Idempotent for production.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only keep the clean slack contacts migration for production.
Branch DB can be reset to pick up the correct schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Slack contacts now require a label (e.g. "#alerts") that displays
in the contact list instead of generic "Slack webhook" text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After submitting a Slack contact, the select visually reset but
React state stayed as "slack", leaving the wrong inputs visible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit 9467439 into main Feb 24, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — beeaad72 Deployed Feb 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SMS alerting

1 participant