fix(webhooks): repair the test button and rework the subscription UI - #16
Merged
Merged
Conversation
- the test call prefixed api/v1/ to a fetch already based on the API path and hit /events/api/api/v1/..., which answered "unknown api endpoint" - label each topic section "Webhooks pour l'évènement « title »" and add English messages - keep the delete and save buttons side by side - give the call history a heading, a titled refresh button and a message when the webhook has never been called Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
owner.js is only imported from lib-vuetify's owner-avatar.vue, reached through the linked lib-vuetify-events package. Vite's dependency scan does not crawl .vue files inside node_modules, so owner.js was served raw and its import chain reached the CommonJS ajv-formats: /events/dev failed to load and the e2e warmup timed out. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The subscribe-webhooks embed page showed one list per topic. It now shows every subscription of the given topics in a single list, each form starting with a topic selector (hidden when only one topic is proposed, and keeping a topic that is not proposed selectable). GET /api/webhook-subscriptions accepts a comma-separated list of topic keys to support it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…iption form The list only loads subscriptions whose topic is among the proposed ones, so a subscription with a topic outside them never reaches the form. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Every write changing a webhook's status (creation, coalesced reset, worker pick-up and outcome, retry, cancel) emits the webhook on a channel scoped to its subscription: <ownerType>:<ownerId>:webhook-subscriptions/<id>/webhooks, that only an admin of the owning account can subscribe to. The call history of the embed page listens to it instead of requiring a manual refresh, and catches up from the API after a reconnection. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Saving an existing webhook subscription posted the listed document with created, updated, owner and visibility, and the API answered 400. The form now keeps and posts only the properties accepted by the POST route and compares them to the saved subscription to enable the save button, so the refreshed "updated" date after a save is no longer a change. The new subscription form receives a stable object, an inline literal was recreated on every render and could reset the chosen topic. Add e2e tests for the webhooks page: creation with topic selection, single topic, edition, deletion and live test call progress. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Repair the webhook "Test" button and rework the webhook subscription embed page:
api/v1/...path, it now hitswebhook-subscriptions/:id/_testGET /api/webhook-subscriptionsaccepts a comma-separatedtopiclist<ownerType>:<ownerId>:webhook-subscriptions/<id>/webhooks, readable only by an admin of the owning account; the history updates live and the manual refresh button is gone@data-fair/lib-vue/owner.jsfor the /events/dev pageHeads-up:
api/src/server.ts: any channel whose third segment starts withwebhook-subscriptions/requires the active account to be the owner with the admin role — worth a look since it gates who sees webhook payloads.keyvalues get one merged list.