-
Notifications
You must be signed in to change notification settings - Fork 542
Add webhook testing functionality to dashboard #7173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add webhook testing functionality to dashboard #7173
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughA new webhook testing feature is added to the WebhooksTable component. This includes a custom React hook, useTestWebhook, that manages the state and execution of webhook endpoint tests. The WebhooksTable UI now provides a "Test" button for each webhook, enabling users to trigger and observe the status of webhook tests asynchronously. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WebhooksTable
participant useTestWebhook
participant API
User->>WebhooksTable: Clicks "Test" button
WebhooksTable->>useTestWebhook: testWebhookEndpoint(url, type, id)
useTestWebhook->>API: testWebhook(url, type, clientId)
API-->>useTestWebhook: Returns success or error
useTestWebhook-->>WebhooksTable: Updates isTestingMap and testResults
WebhooksTable-->>User: Updates UI (spinner, toast notification)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7173 +/- ##
=======================================
Coverage 55.66% 55.66%
=======================================
Files 904 904
Lines 58400 58400
Branches 4116 4116
=======================================
Hits 32510 32510
Misses 25784 25784
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
a63703d
to
a1b14b4
Compare
a4f8fe1
to
8136982
Compare
a1b14b4
to
f3355d5
Compare
8136982
to
ed3f377
Compare
ed3f377
to
30491a5
Compare
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the webhook functionality by exporting the `testWebhook` function, integrating a testing feature in the `WebhooksTable`, and adding a custom hook `useTestWebhook` to manage webhook testing states and results. ### Detailed summary - Changed `testWebhook` from a local function to an exported function. - Added `PlayIcon` import to `WebhooksTable.tsx`. - Integrated `useTestWebhook` hook in `WebhooksTable` for testing webhooks. - Implemented `handleTestWebhook` function to test webhooks and handle results. - Updated the action buttons in the `WebhooksTable` to include a test button with loading state. - Created `useTestWebhook` hook to manage testing states and results, including error handling and toast notifications. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to test webhooks directly from the webhooks table with a "Test" button, providing immediate feedback and status indicators during testing. - **User Interface** - Enhanced the actions column in the webhooks table for improved layout and usability, including real-time spinner icons and error notifications during webhook testing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
148c493
to
b1e702d
Compare
ce3008e
to
adf9cc1
Compare
b1e702d
to
9058e67
Compare
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the webhook testing functionality in the dashboard application by exporting the `testWebhook` function, adding a testing feature in the `WebhooksTable`, and creating a custom hook `useTestWebhook` to manage the testing state and results. ### Detailed summary - Changed `testWebhook` from a local function to an exported function in `webhooks.ts`. - Imported `PlayIcon` in `WebhooksTable.tsx` and added it to the UI. - Implemented `handleTestWebhook` function to test webhooks and display results. - Created `useTestWebhook` hook to manage testing state and results. - Added error handling and success notifications for webhook testing. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to test webhooks directly from the webhooks table with a "Test" button, providing immediate feedback and status indicators during testing. - **User Interface** - Enhanced the actions column in the webhooks table for improved layout and usability, including real-time spinner icons and error notifications during webhook testing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
adf9cc1
to
dcb412f
Compare
9058e67
to
c420099
Compare
PR-Codex overview
This PR enhances the webhook testing functionality in the dashboard by exporting the
testWebhook
function, integrating it into theWebhooksTable
component, and creating a custom hookuseTestWebhook
for managing testing states and results.Detailed summary
testWebhook
function to be exported fromwebhooks.ts
.PlayIcon
import inWebhooksTable.tsx
.useTestWebhook
hook inWebhooksTable.tsx
to manage testing state.handleTestWebhook
function for testing webhooks.WebhooksTable.tsx
to include a test button.useTestWebhook
hook inuseTestWebhook.ts
to handle webhook testing logic and results.Summary by CodeRabbit