Skip to content

feat(slack): support blocks in plugin edit action#18278

Closed
Solvely-Colin wants to merge 1 commit into
openclaw:mainfrom
Solvely-Colin:codex/slack-plugin-edit-blocks
Closed

feat(slack): support blocks in plugin edit action#18278
Solvely-Colin wants to merge 1 commit into
openclaw:mainfrom
Solvely-Colin:codex/slack-plugin-edit-blocks

Conversation

@Solvely-Colin

@Solvely-Colin Solvely-Colin commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Why

Plugin-level Slack edit actions should have the same Block Kit capability as tool-level editMessage.

Dependency

What This PR Adds

  • In /Users/solvely/Projects/OpenClaw/src/plugin-sdk/slack-message-actions.ts:

    • edit now accepts optional blocks (JSON string or array)
    • validates at least one of message or blocks is present
    • forwards normalized payload to editMessage
  • In /Users/solvely/Projects/OpenClaw/src/channels/plugins/actions/actions.test.ts:

    • adds Slack adapter tests for:
      • edit with blocks JSON
      • edit with blocks array
      • reject edit when both message and blocks are missing

Behavior

  • Existing text-only edits still work.
  • Plugin callers can now update messages with Block Kit blocks.

Validation

  • pnpm test src/channels/plugins/actions/actions.test.ts
  • pnpm check

Reviewer Focus

  • src/plugin-sdk/slack-message-actions.ts
  • src/channels/plugins/actions/actions.test.ts

Greptile Summary

This PR makes two changes to src/slack/monitor/events/interactions.ts:

  • Fixes viewClosed method binding: The previous code extracted viewClosed from ctx.app into a standalone variable, which loses the this context when invoked. The fix keeps a reference to the cast object (appWithViewClosed) and calls the method on it directly (appWithViewClosed.viewClosed(...)), preserving binding — consistent with how ctx.app.action() and ctx.app.view() are already called.
  • Inlines InteractionSelectionFields type: Removes the shared InteractionSelectionFields type and duplicates its fields directly into InteractionSummary and ModalInputSummary. Also reorders import statements (type imports first). This is a purely structural refactor with no behavioral change.

Both changes are low-risk. The binding fix addresses a real bug where Slack Bolt's internal this context could be lost during viewClosed handler registration.

Confidence Score: 5/5

  • This PR is safe to merge — it fixes a method binding bug and performs a low-risk type refactor.
  • The viewClosed binding fix is a clear correctness improvement that aligns with existing patterns in the same file. The type inlining is mechanically correct — all fields from the removed InteractionSelectionFields are present in both destination types. No logic changes, no new runtime behavior beyond the binding fix.
  • No files require special attention.

Last reviewed commit: 4949782

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack agents Agent runtime and tooling size: XL labels Feb 16, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread src/slack/monitor/events/interactions.ts
@Solvely-Colin
Solvely-Colin force-pushed the codex/slack-plugin-edit-blocks branch from 6a3ed2c to eaf2ee6 Compare February 16, 2026 23:03
@steipete steipete closed this Feb 16, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed agents Agent runtime and tooling size: XL labels Feb 16, 2026
@steipete steipete reopened this Feb 17, 2026
@Solvely-Colin
Solvely-Colin force-pushed the codex/slack-plugin-edit-blocks branch from eaf2ee6 to 4949782 Compare February 17, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants