From 9303444135dd94eaf3ae48308bb98702a67a07c9 Mon Sep 17 00:00:00 2001 From: Vincent Grobler Date: Mon, 11 May 2026 17:07:28 +0100 Subject: [PATCH] feat: bidirectional Linear messaging channel - Migration 081: add 'linear' to messaging_channels platform, create linear_issue_mappings table with RLS - Edge Function channel-linear: inbound webhook handler with configurable triggers (create, state_change, label), HMAC signature verification, duplicate detection, priority mapping - Edge Function linear-webhook-register: creates Linear webhook via GraphQL API and fetches team workflow states - Task runner: replyLinear() posts comment on issue + optional state change to configured done state - Frontend: Linear channel config form with API key, team ID, trigger modes, trigger states/labels, and done state fields - ChannelPlatform type extended with 'linear' --- .../settings/MessagingChannelsSettings.tsx | 41 +- src/db/messagingChannels.ts | 2 +- supabase/functions/channel-linear/index.ts | 361 ++++++++++++++++++ .../linear-webhook-register/index.ts | 158 ++++++++ supabase/migrations/081_linear_channel.sql | 74 ++++ task-runner/src/webhookDispatcher.ts | 120 +++++- 6 files changed, 749 insertions(+), 7 deletions(-) create mode 100644 supabase/functions/channel-linear/index.ts create mode 100644 supabase/functions/linear-webhook-register/index.ts create mode 100644 supabase/migrations/081_linear_channel.sql diff --git a/src/components/settings/MessagingChannelsSettings.tsx b/src/components/settings/MessagingChannelsSettings.tsx index 41fe25b4..988373a8 100644 --- a/src/components/settings/MessagingChannelsSettings.tsx +++ b/src/components/settings/MessagingChannelsSettings.tsx @@ -5,7 +5,7 @@ import { useState } from 'react' import { Send, MessageSquare, Hash, Mail, Plus, Trash2, Power, PowerOff, Loader2, ChevronDown, ChevronUp, ExternalLink, ArrowDownLeft, ArrowUpRight, - Copy, Check, Link2, Columns3, + Copy, Check, Link2, Columns3, Layers, } from 'lucide-react' import { useWorkspace } from '@/hooks/useWorkspace' import { @@ -97,6 +97,22 @@ const PLATFORM_META: Record

Messaging Channels

- Send messages from Telegram, Discord, Slack, Email, or Trello to trigger your agents. + Send messages from Telegram, Discord, Slack, Email, Trello, or Linear to trigger your agents.