Add Slack webhook notifications for flag and value changes#74
Merged
Conversation
added 28 commits
June 12, 2026 19:24
Implements save_notification_channel, delete_notification_channel, set_project_notification_channels, and extends delete_project to clean up ProjectNotificationChannel links on project deletion.
Adds /settings route with a full CRUD table for managing Slack notification channels, plus a gear button in the sidebar that navigates to it.
…tions - Changelog entry under [Unreleased] - Give BaseUserSession a safe user=None default so dispatch guards never hit AttributeError on user-less sessions (and to satisfy mypy) - Annotate notifications loaders with SAConnection; name the HTTP error threshold constant; mark save_flag C901 like save_value - Ignore DTZ001 in tests (naive datetimes mirror stored timestamps)
kindermax
force-pushed
the
slack-webhooks
branch
from
June 23, 2026 16:43
df8a1fc to
5059ca5
Compare
kindermax
force-pushed
the
slack-webhooks
branch
from
June 24, 2026 07:31
a95acb8 to
202ff4e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Slack webhook notifications: when someone changes a feature flag or a value, the server pushes a formatted message to the Slack channels configured for that project. Notification channels (name + webhook URL) are managed globally in the UI (Grafana-style) and selected per-project.
Spec:
docs/superpowers/specs/2026-06-12-slack-notifications-design.mdPlan:
docs/superpowers/plans/2026-06-12-slack-notifications.mdWhat's included
notification_channel(name, type enumSLACK_WEBHOOK, webhook_url) +project_notification_channelM2M; alembic migrationf3a9c41e88d2.delete_projectcleans up M2M links.NotificationsService(featureflags/services/notifications.py): pure Slack legacy-attachment renderers (green/red/grey bar, backticked names, conditions, all operators) + best-effort async dispatch viahttpx. Fire-and-forget; never blocks the mutation; failures logged and counted in Prometheus countersslack_notifications_total/slack_notification_errors_total(labelled bychannel).notificationChannelsquery (root + per-project),saveNotificationChannel/deleteNotificationChannel/setProjectNotificationChannelsmutations with validation; dispatch hooks wired into all six flag/value mutation handlers (save/reset/delete × flag/value). Delete handlers capture name + project before the row is removed.#/settings) with CRUD; per-project multi-select in project settings.Testing
lets test).npm run build).ruffclean on changed files;mypynet-reduced.Notes
webhook_urlis readable by any authenticated user, consistent with the app's existing flat trust model (no role system); it is never written to logs.