Conversation
Adds Maple as a new webhook-based integration that posts alert events into a Hazel channel as rich embeds, following the same pattern as the existing Railway and OpenStatus integrations. - Bot registry: register "maple" as a WebhookProvider with maple.dev branding so the per-org bot identity gets the right name and avatar - Domain: MaplePayload schema mirroring Maple's existing buildPayload output (eventType, rule, observed, linkUrl, chatUrl, …) plus a new executeMaple endpoint at /webhooks/incoming/:webhookId/:token/maple - Backend handler: token validation, Maple bot identity resolution, embed-only message creation, outbox event, lastUsedAt update - @hazel/integrations/maple module: payload types, severity-aware colors, and a buildMapleEmbed that renders trigger / resolve / renotify / test events with badge, fields, and deep link - channelWebhook.create RPC: extend integrationProvider literal with "maple" so the org-scoped bot reuse path works - Web: marketplace card, integration content + setup modal, and the per-channel section component (mirrors openstatus) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hazel-app | 39bc1f5 | Commit Preview URL Branch Preview URL |
Apr 26 2026, 11:40 AM |
|
Claude finished @Makisuo's task —— View job PR Review: Maple Alerts IntegrationI've completed a thorough review of this Maple alerts integration PR. Overall, this is high-quality code that follows excellent patterns and closely mirrors the existing OpenStatus/Railway integrations. Here's my detailed analysis: Todo List:
✅ Strengths & Best PracticesBackend Implementation
Frontend Implementation
Integration Package
|
Summary
buildPayload()JSON unchanged on a new/mapleroute, so there's no parallel payload schema between the two systems.Changes
Integrations package (
@hazel/integrations)common/bot-configs.ts— registermapleinWebhookProviderwith themaple.devBrandfetch icon.src/maple/module:payloads.ts(TS interfaces matching Maple's webhook payload),colors.ts(severity → color/badge mapping for trigger / resolve / renotify / test),embed-builder.ts(buildMapleEmbed), plusindex.ts/browser.tsexports.package.json— wire./mapleand./maple/browserexports.Domain
http/incoming-webhooks.ts— newMaplePayloadEffect Schema and anexecuteMapleendpoint atPOST /webhooks/incoming/:webhookId/:token/maple.rpc/channel-webhooks.ts— extend theintegrationProviderliteral onchannelWebhook.createto accept"maple"so the org-scoped integration-bot reuse path applies.Backend
routes/incoming-webhooks.http.ts—executeMaplehandler: token validation (timing-safe),IntegrationBotService.getOrCreateWebhookBotUser(\"maple\", ...), embed-only message + outbox event +lastUsedAtupdate. Identical shape toexecuteRailway.Web
lib/integrations/__data.ts— Maple marketplace card (developer-tools, webhook connection type).components/embeds/use-embed-theme.ts— registermapleas anEmbedProvider.routes/.../integrations/$integrationId.tsx— recognize\"maple\"as a webhook integration and route to the new content component.components/integrations/maple-integration-content.tsx,configure-maple-modal.tsx,channel-settings/maple-section.tsx. Setup UX shows the generated…/mapleURL with a copy button and instructions to paste it as a Hazel destination in Maple → Alerts → Destinations.Reviewer notes
channel_webhookstable; bot identity is the shared per-orgintegration-bot-mapleuser viaIntegrationBotService.\"hazel\"destination type that POSTs to/maple) is in a separate PR on the maple repo.timingSafeEqual). HMAC verification ofx-maple-signatureis not implemented yet — left as a follow-up since the URL token itself is already an authenticated bearer credential. Maple sends the header when a signing secret is configured; Hazel currently ignores it.dedupeKey, so a retried delivery from Maple will produce a duplicate channel message. Acceptable for now; can be added later via a uniqueness index keyed ondedupeKey.Test plan
bun run typecheckpasses (verified locally — 18/18 packages)./{org}/settings/integrations/maple→ confirm the marketplace card renders with the Maple icon.…/maplewebhook URL.trigger(red/amber) andresolve(green) embeds render correctly.🤖 Generated with Claude Code