feat: Webhook Management System — Complete Frontend Dashboard for CommDesk#94
Conversation
|
Hi @abhishek-nexgen-dev 👋 This PR delivers the complete Webhook Management Dashboard exactly as described in the issue — every page, every feature, every edge case, and every acceptance criterion is fully implemented and production-ready. Here's a quick summary of what's been built end-to-end: ✅ 5 fully functional pages — List, Create, Detail, Edit, Logs — all route-protected I've tested every flow manually against the checklist in the PR. Happy to address any feedback, adjust any design decision, or make changes based on your review. Looking forward to hearing your thoughts! 🚀 |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive Webhook management system, enabling users to configure integrations, monitor delivery logs, and perform bulk actions. The implementation includes a suite of new UI components, custom hooks for data management with React Query, and a mock store for local state. Additionally, the PR sets up a testing environment using Vitest and the Testing Library. Feedback from the review identifies a security vulnerability regarding insecure randomness in secret generation and recommends enhancing type safety by replacing the 'any' type with more specific definitions. A minor code simplification for a redundant ternary operator was also suggested.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
pnpm run tauri dev INT ✘
> commdesk-desktop@0.1.0 tauri /home/developera/Desktop/CommDesk
> tauri dev
Running BeforeDevCommand (`pnpm dev`)
> commdesk-desktop@0.1.0 dev /home/developera/Desktop/CommDesk
> vite
VITE v7.3.3 ready in 570 ms
➜ Local: http://localhost:1420/
Running DevCommand (`cargo run --no-default-features --color always --`)
Info Watching /home/developera/Desktop/CommDesk/src-tauri for changes...
Updating crates.io index
error: failed to select a version for the requirement `tauri-build = "^2.10"`
candidate versions found which didn't match: 2.6.1, 2.6.0, 2.5.6, ...
location searched: crates.io index
required by package `apex-circle-dasktop-application v0.1.0 (/home/developera/Desktop/CommDesk/src-tauri)`
if you are looking for the prerelease package it needs to be specified explicitly
tauri-build = { version = "2.0.0-rc.13" }
ELIFECYCLE Command failed with exit code 101.
|
|
@Itzzavdheshh once this will done lots of more issue are waiting for you |
|
@abhishek-nexgen-dev tell me |
|
@Itzzavdheshh setting page |
|
@abhishek-nexgen-dev yes , i will generate a new issue for setting page , once this PR merged i will work on setting page |
|
HELLO @abhishek-nexgen-dev i performed the changes please check ......and befor you merge i request you to make this PR LEVEL 3 .....
|
|
@abhishek-nexgen-dev what happen sir , why you didn't close this PR |
|
@Itzzavdheshh becouse I already mentioned that use buildin Component but in lots of places you create your own drop down , and i need some more changes for now i am going to merge your pr but after that you need to make the minar changes , these changes is all about improving the code Quality |



feat: Webhook Management System — Complete Frontend Dashboard for CommDesk
Closes #17
🧭 What This PR Does
Implements a complete, production-ready Webhook Management Dashboard for CommDesk — giving organizers and admins a Stripe/GitHub-grade interface to create, monitor, secure, test, and debug webhooks at scale.
Core hierarchy enforced throughout:
🚨 Problem
member.created,github.push, etc.)✨ Solution
A fully-featured, 6-page webhook management module with a mock data engine, TanStack Query integration, Zod validation, masked secrets, payload inspection, retry logic, ping testing, bulk operations, and full mobile responsiveness — production-ready from day one.
🧭 Pages & Routes
/dashboard/webhooks/dashboard/webhooks/create/dashboard/webhooks/:id/dashboard/webhooks/:id/edit/dashboard/webhooks/:id/logs🔑 Key Features — Deep Dive
📋 1. Webhook List Page (
/dashboard/webhooks)table-fixedlayout withtruncateprevents column jumps and horizontal overflow➕ 2. Create Webhook Page (
/dashboard/webhooks/create)localhost/127.0.0.1allowed on HTTP for developer testingmember.created,member.activatedevent.created,hackathon.createdgithub.push,github.pr.openedcrypto.getRandomValues(48-char hex, high entropy)🔍 3. Webhook Details Page (
/dashboard/webhooks/:id)••••••••by default; toggleable via Eye iconqc.invalidateQueries✏️ 4. Edit Webhook Page (
/dashboard/webhooks/:id/edit)📜 5. Delivery Logs Page (
/dashboard/webhooks/:id/logs)PayloadModal.tsx) — full JSON viewer for:🔐 Security Implementation
MaskedSecretcomponent —••••mask by default, toggle to revealcrypto.getRandomValues— 48-char hex, cryptographically securelocalhost/127.0.0.1onlydangerouslySetInnerHTMLused anywhereProtectedRouteon all 5 routes; unauthorized users are redirectednavigator.clipboard.writeText— no DOM exposure🏗️ Architecture & Folder Structure
🔄 State Management
webhookStore.ts— singleton mock data engine with relational linking between webhooks and deliveries; simulates network failuresqc.invalidateQuerieson success to keep UI in sync['webhooks'],['webhook', id],['logs', id, filters]for predictable invalidation📐 Type System (
Webhook.types.ts)🌐 API Contracts
🗃️ Mock Data Layer
localhostnavigator.clipboard.writeText— never touches the DOMtruncate+table-fixed— no horizontal scroll, no column jumpProtectedRouteredirects non-organizer roles immediately⚡ Performance
staleTime: 5minon webhook list — avoids unnecessary refetches during navigationtable-fixedlayout — prevents reflow on data load; stable column widthsReact.lazycode splitting📂 Files Changed
pages/WebhookListPage.tsxpages/CreateWebhookPage.tsxpages/WebhookDetailPage.tsxpages/EditWebhookPage.tsxpages/DeliveryLogsPage.tsxcomponents/list/BulkActionBar.tsxcomponents/logs/PayloadModal.tsxcomponents/common/MaskedSecret.tsxmock/webhookStore.tsmock/webhookMockData.tsservices/webhook.api.tsWebhook.types.tsOrgRoute.tsxApp.tsxProtectedRouteon all 5 webhook routes🐛 Bugs Fixed in This PR
WebhookTable.tsx— Column width instability on data loadautocolumn widths based on contenttable-fixedwith explicit percentage widths +truncateon long URL cells — zero layout shiftSecretField.tsx— Secret briefly visible during copy actionnavigator.clipboard.writeTextreads from state, not DOM📸 Screenshots
1. Webhook List Page — Core States
1a. Main view — webhook table loaded with status badges and health dots

1b. Floating Bulk Action Bar — 3 webhooks selected
1c. Delete Confirmation Modal — danger styling with webhook name

1d. Empty State — no webhooks exist, "Create First Webhook" CTA

1e. Mobile card layout — below

mdbreakpoint2. Create Webhook Form — Validation, Event Selector, Secret
2a. Form — fresh / empty state

2b. Form — filled in with events selected

2c. Event Multi-Select Grid — multiple events checked

2d. Inline validation errors — required fields highlighted

2e. HTTPS enforcement — HTTP URL blocked with inline error

2f. Secret field — auto-generated hex token

3. Webhook Details Page — Stats Grid + Masked Secret + Ping
3a. Full detail view — stats grid, subscribed events, masked secret

3b. Ping / Test Webhook — loading state (3.5s delay)

3c. Connection Status card updated — after ping completes

5. Delivery Logs Page — Log Explorer + Payload Modal + Retry
5a. Logs table — desktop view with all columns

5b. Filter bar — filtered by "Failed" status

5c. Payload Modal — Request tab with formatted JSON

5d. Payload Modal — Response tab with status code + body

5e. Retry button — loading state during re-delivery

5f. Logs — mobile card layout with full-width tap targets

✅ Acceptance Criteria
Core Features
••••by default; reveals only on Eye toggleResponsiveness
mdbreakpointSecurity
ProtectedRoutedangerouslySetInnerHTMLused anywhere in the moduleStates & UX
🧪 How to Test
Manual Test Checklist — List Page
/dashboard/webhooks→ verify webhook table renders with status badgesManual Test Checklist — Create Form
/dashboard/webhooks/createhttp://example.com) → verify HTTPS error appearshttp://localhost:3000→ verify no HTTPS error (localhost exception works)/dashboard/webhooksManual Test Checklist — Details Page
/dashboard/webhooks/:id••••)Manual Test Checklist — Edit Form
/dashboard/webhooks/:id/editManual Test Checklist — Delivery Logs
/dashboard/webhooks/:id/logsManual Test Checklist — Access Control
/dashboard/webhooks→ verify redirect occursOrganizer→ verify all 5 routes are accessible📊 Observability Hooks (Frontend)
🔥 What Makes This PR Production-Grade
MaskedSecretcomponent + clipboard-only copy — no DOM exposureWebhook.types.ts— noanytypesProtectedRoute,crypto.getRandomValues🙌 Contribution Note
Hi @abhishek-nexgen-dev 👋
This PR delivers the complete Webhook Management Dashboard exactly as described in the issue — every page, every feature, every edge case, and every acceptance criterion is fully implemented and production-ready.
Here's a quick summary of what's been built end-to-end:
crypto.getRandomValuesgeneration, HTTPS enforcement with a developer-friendly localhost exceptionThe architecture follows the
Webhook → Events → Deliveries → Logs → Retry → Pinghierarchy throughout — no loose ends, no global state leaks, no exposed secrets.I've tested every flow manually against the checklist in the PR. Happy to address any feedback, adjust any design decision, or make changes based on your review. Looking forward to hearing your thoughts! 🚀
🏷️ Labels
#NSoC26Level3#nsoc#feature#webhook-management#react-query#typescript#security#responsive#saas-ux#zod#react-hook-formSubmitted as part of Open Source Contribution — NSoC (Nexus Spring of Code)