Skip to content

feat(slack): add remove reaction tool#3414

Merged
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/slack-remove-reaction
Mar 4, 2026
Merged

feat(slack): add remove reaction tool#3414
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/slack-remove-reaction

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Add slack_remove_reaction tool using Slack's reactions.remove API
  • Add unreact operation to Slack block, sharing subBlocks with add reaction
  • Add internal API route /api/tools/slack/remove-reaction
  • Regenerate docs

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 4, 2026 11:25pm

Request Review

@cursor
Copy link

cursor bot commented Mar 4, 2026

PR Summary

Medium Risk
Introduces a new server API route that proxies to Slack’s reactions.remove, plus new tool wiring; risk is moderate due to external API/error handling and token usage, but it mirrors the existing add-reaction flow.

Overview
Adds a new Slack tool, slack_remove_reaction, backed by a new internal endpoint /api/tools/slack/remove-reaction that validates input and calls Slack’s reactions.remove API.

Updates the Slack block to support a new unreact operation (sharing the same timestamp/name inputs as add-reaction), registers the tool in the tools registry/exports/types, and regenerates docs to reflect the new remove-reaction tool and updated Slack descriptions (plus minor generated icon/meta formatting changes).

Written by Cursor Bugbot for commit f5da9bc. Configure here.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 4, 2026

Greptile Summary

This PR cleanly adds a slack_remove_reaction tool that mirrors the proven slack_add_reaction implementation. The implementation covers the full stack: a new internal API route (/api/tools/slack/remove-reaction), a new tool config (slackRemoveReactionTool), updated type definitions, and documentation updates.

Key changes:

  • apps/sim/app/api/tools/slack/remove-reaction/route.ts correctly proxies requests to Slack's reactions.remove API with proper auth, validation, and error handling.
  • apps/sim/tools/slack/remove_reaction.ts follows established patterns, reusing REACTION_METADATA_OUTPUT_PROPERTIES from types.ts.
  • Type definitions (SlackRemoveReactionParams and SlackRemoveReactionResponse) are consistent with their add-reaction counterparts.
  • apps/sim/blocks/blocks/slack.ts cleanly adds the unreact operation and shares UI fields via array conditions.
  • The reactions:write OAuth scope already covers both adding and removing reactions.

Safe to merge — the implementation is a well-structured addition with no logic errors or security concerns.

Confidence Score: 5/5

  • Safe to merge — implementation is well-structured, follows established patterns, and has no logic errors or security concerns.
  • The PR introduces a new feature that closely mirrors the proven add-reaction implementation with no deviations in architecture or approach. All five modified files (types, tool config, API route, block integration, and documentation) are internally consistent and follow project conventions. Auth handling is correct, error handling is appropriate, and the feature integrates cleanly with existing Slack infrastructure.
  • No files require special attention.

Sequence Diagram

sequenceDiagram
    participant U as User/LLM
    participant B as Slack Block (slack.ts)
    participant T as slackRemoveReactionTool
    participant R as /api/tools/slack/remove-reaction
    participant S as Slack API (reactions.remove)

    U->>B: operation = "unreact", channel, reactionTimestamp, emojiName
    B->>T: resolve tool → slack_remove_reaction<br/>params: { accessToken|botToken, channel, timestamp, name }
    T->>R: POST { accessToken, channel, timestamp, name }
    R->>R: checkInternalAuth()
    R->>R: ZodSchema.parse(body)
    R->>S: POST reactions.remove { channel, timestamp, name }
    S-->>R: { ok: true } or { ok: false, error: "..." }
    alt Success
        R-->>T: { success: true, output: { content, metadata } }
        T-->>B: { content: "Successfully removed :name: reaction", metadata }
    else Failure
        R-->>T: { success: false, error: "..." }
        T-->>B: { success: false, output: { content: error, metadata: empty } }
    end
    B-->>U: result
Loading

Last reviewed commit: f5da9bc

@waleedlatif1 waleedlatif1 merged commit 127994f into staging Mar 4, 2026
11 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/slack-remove-reaction branch March 4, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant