Repository navigation
Add the Connector Failure Alerts card to admin settings - #1019
Merged
Merged
Conversation
UI for the alert-webhook backend from HelpCode-ai#1006 (PR 1, merged): URL, payload type (JSON/Slack), threshold/window/cooldown, enabled toggle, save/test/ remove, and a rotate-secret option with a shown-once secret reveal, mirroring the existing SMTP card's conventions on the same page.
5 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
PR 2 (UI) for #1006, following up on the merged backend PR #976. Adds the Alerts card to
/settings/admin, same shape and conventions as the existing SMTP card right above it.Changes
lib/api.ts:adminSettings.getAlertWebhook/updateAlertWebhook/deleteAlertWebhook/testAlertWebhook, typed against the actual merged backend contract (note:GETreturns{ configured: false }when unset, or the config fields directly with no wrapper key when set — handled by checking forurlrather than aconfiguredflag).app/settings/admin/page.tsx: new "Connector Failure Alerts" card — URL, payload type (JSON/Slack), threshold/window/cooldown, enabled toggle, save/test/remove, a rotate-secret option, and a shown-once secret reveal using the existingcopyTextclipboard helper. Shows an https-required hint on Cloud viauseAuth().deploymentMode.Testing
This sandbox has no network access for Google Fonts, which breaks
next build/next devunder Turbopack (pre-existing onmain, confirmed by reproducing it on a clean checkout — unrelated to this change). Built and ran with--webpackinstead, which isn't the project's default dev command, so noting it explicitly:npx next build --webpacksucceeds, including/settings/adminand the TypeScript pass.Verified against a real local stack (Postgres via
docker compose, migrations applied, backend on :4000, frontend on :3000, webpack mode), logged in as a fresh self-hosted ADMIN, and exercised the full lifecycle on the real merged API:Error: Webhook responded with 405, confirming SSRF check → HMAC signing → outbound POST → response status all round-trip into the UI).Both clean.
Related Issues
Relates to #1006