feat(dashboard): enable webhooks from the Webhooks page (salvage #43999)#44021
Merged
Conversation
Contributor
🔎 Lint report:
|
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
Salvage of #43999 by @shannonsands — the dashboard Webhooks page can now enable its own receiver in one click instead of sending users to the Channels page.
POST /api/webhooks/enableendpoint: flipsplatforms.webhook.enabledvia the existing_write_platform_enabledhelper and kicks a deduped gateway restart (_spawn_gateway_restart— reuses any in-flight restart, never spawns a second).PUT /api/messaging/platforms/webhooktoggle path is intentionally left restart-free (bulk channel edits shouldn't each trigger a restart); the dedicated endpoint exists to bundle enable + restart for the one-click UX.Validation
tests/hermes_cli/test_dashboard_admin_endpoints.pyon current maineslint src/pages/WebhooksPage.tsx src/lib/api.tsnpm run build --workspace web_write_platform_enabled("webhook", True)→_is_webhook_enabled()platforms.webhook.enabledtest_webhooks_enable_post_gated)Cherry-picked with @shannonsands's authorship preserved; merge via rebase. Closes #43999.
Infographic