Skip to content

feat(slack): add inline button support for exec approvals#2124

Closed
taciturnaxolotl wants to merge 6 commits intoopenclaw:mainfrom
taciturnaxolotl:main
Closed

feat(slack): add inline button support for exec approvals#2124
taciturnaxolotl wants to merge 6 commits intoopenclaw:mainfrom
taciturnaxolotl:main

Conversation

@taciturnaxolotl
Copy link
Copy Markdown

Fixes #2101

Summary

Adds inline Block Kit buttons for exec approval requests in Slack DMs, mirroring the existing Discord implementation.

Changes

  • Add SlackExecApprovalConfig type and Zod schema
  • Create SlackExecApprovalHandler that:
    • Listens to gateway events for approval requests
    • Sends Block Kit messages with Allow once / Always allow / Deny buttons
    • Updates messages when resolved or expired
    • Uses Slack's <!date^...> for localized expiry times
  • Skip text forwarder when Slack buttons are enabled (no duplicates)
  • Register action handlers in Slack monitor

Config

channels:
  slack:
    execApprovals:
      enabled: true
      approvers: ["U12345678"]
      agentFilter: ["main"]     # optional
      sessionFilter: ["slack"]  # optional
image

Implements openclaw#2101: Adds Block Kit buttons for exec approval requests in Slack DMs,
mirroring the existing Discord implementation.

Changes:
- Add SlackExecApprovalConfig type to config/types.slack.ts
- Add Zod schema validation for execApprovals in config
- Create SlackExecApprovalHandler class that:
  - Listens to gateway events for approval requests/resolutions
  - Sends Block Kit messages with Allow once/Always allow/Deny buttons
  - Updates messages when resolved or expired
  - Wires button clicks through to gateway approval resolution
- Register action handler in Slack monitor provider
- Add comprehensive tests for value parsing and handler filtering

Config example:
```yaml
channels:
  slack:
    execApprovals:
      enabled: true
      approvers: ["U12345678"]
      agentFilter: ["main"]  # optional
      sessionFilter: ["agent:main"]  # optional
```
Slack requires unique action_id per button in a block. Changed from
single shared ID to per-action IDs (allow_once, allow_always, deny)
and use regex matching in the action handler.
- Skip text forwarder for Slack when execApprovals buttons are enabled
- Use <!date^timestamp^{time}|fallback> for localized expiry time
@taciturnaxolotl
Copy link
Copy Markdown
Author

One thing I do have to say is how shockingly good this workflow is. I've tried most of the coding agents recently, and nothing has quite compared to just dispatching and collaborating on a project with my own personalized assistant

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation channel: slack Channel integration: slack labels Jan 26, 2026
@clawdinator
Copy link
Copy Markdown
Contributor

clawdinator bot commented Feb 1, 2026

closing thumbs up

CLAWDINATOR FIELD REPORT // PR Closure

I am CLAWDINATOR — cybernetic crustacean, maintainer triage bot for OpenClaw. I was sent from the future to keep this repo shipping clean code.

TARGET ACQUIRED. I have reviewed your PR. Your effort is br00tal.

Reality check: OpenClaw is in feature freeze while we stabilize the system. That means any new feature PRs are getting cleared out, no matter how shiny. This one falls into that bucket, so I’m closing it to keep the queue from exploding.

Think this belongs in the release after freeze? Come with me if you want to ship. Report to #pr-thunderdome-dangerzone on Discord — READ THE TOPIC or risk immediate termination. Bring the maintainers a clear briefing (impact, testing, why it survives the freeze).

I’ll be back. Stay br00tal.

🤖 This is an automated message from CLAWDINATOR, the OpenClaw maintainer bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: slack approval buttons

1 participant