From bc5a7cae49865cbf0923b4bbd0dc3f0df664e013 Mon Sep 17 00:00:00 2001 From: singret <100959986+singret@users.noreply.github.com> Date: Mon, 25 May 2026 16:47:38 +0000 Subject: [PATCH] fix(slack): correct manifest scopes and bot_events for bidirectional sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three fixes to make Slack event delivery work correctly: - Remove invalid user OAuth scopes (openid/email/profile are for Slack Login / OpenID Connect, not bot apps; their presence breaks manifest import in many workspaces) - Add app_mentions:read scope and app_mention bot event so @regen mentions are delivered to the Socket Mode handler - Add reactions:read scope and reaction_added bot event so emoji reactions on the incident card (βœ… ack, πŸ”΄ resolve) trigger the existing reaction handler - Add users:read.email scope used by the JIT Slackβ†’Regen account linker The handler code for all three event types already exists in slack_event_handler.go β€” missing scopes were silently blocking delivery. Closes OPE-169 --- slack-app-manifest.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/slack-app-manifest.yaml b/slack-app-manifest.yaml index 77cf3e0..b07f4db 100644 --- a/slack-app-manifest.yaml +++ b/slack-app-manifest.yaml @@ -62,16 +62,18 @@ oauth_config: - chat:write # Post messages and status updates - chat:write.public # Post to public channels without joining - users:read # Resolve user display names for timeline + - users:read.email # Email lookup for Slack β†’ Regen account linking - im:write # Send DMs to on-call responders - user: - - openid # Slack SSO login - - email # Match Slack user to Regen account - - profile # Display name for login + - app_mentions:read # Required for app_mention events (@regen bot) + - reactions:read # Required for reaction_added events (βœ… ack, πŸ”΄ resolve) + user: [] # No user-delegated scopes β€” this is a pure bot app settings: event_subscriptions: bot_events: - message.channels # Sync channel messages β†’ incident timeline + - app_mention # @regen bot mentions β†’ AI answer in thread + - reaction_added # βœ… white_check_mark β†’ ack, πŸ”΄ red_circle β†’ resolve interactivity: is_enabled: true # Required for buttons and modals