← Back to PRs

#22084: feat(slack): add modal lifecycle actions (open/push/update) and harden interaction routing [AI-assisted]

by Solvely-Colin open 2026-02-20 17:56 View on GitHub →
channel: slack agents size: L
## Summary Adds focused Slack modal lifecycle support to OpenClaw message actions: - `modal-open` -> `views.open` - `modal-push` -> `views.push` - `modal-update` -> `views.update` Also hardens validation, routing, and test coverage for modal interactions. ## Why This aligns with `VISION.md` priorities: - improve major channel support (Slack) - prioritize reliability/stability over broad new surface area This is one focused topic PR (no unrelated features), matching `CONTRIBUTING.md` + `VISION.md`. ## Scope ### Added - Slack action handlers for modal lifecycle APIs - plugin/action adapter mappings for modal actions - modal view input parsing/validation - modal action discovery + gating (`actions.modals`) - tool display entries for modal actions - routing/lifecycle test hardening for modal submission/close events ### Tests added/updated - modal API unit tests - modal view parser tests - Slack action E2E tests (including failure paths) - Slack interaction lifecycle routing tests - plugin action adapter tests - tool-display tests for modal action details ## Non-goals - no channel-agnostic component unification in this PR - no broad Block Kit schema expansion beyond modal lifecycle action path ## Testing Ran locally: - `pnpm vitest run --config vitest.e2e.config.ts src/agents/tools/slack-actions.e2e.test.ts` - `pnpm vitest run src/channels/plugins/actions/actions.test.ts src/slack/monitor/events/interactions.test.ts src/slack/actions.modal.test.ts src/slack/views-input.test.ts src/agents/tool-display.e2e.test.ts` - `pnpm tsgo` - `pnpm lint` Testing level: fully tested for this scope. ## AI assistance This PR is AI-assisted. I reviewed and validated all changed paths and tests before submission. <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds three Slack modal lifecycle actions (`modal-open`, `modal-push`, `modal-update`) with proper validation, gating, and routing. The implementation correctly maps these actions through the plugin adapter layer (`handleSlackMessageAction`), validates modal view inputs (enforcing `type: "modal"`), and surfaces them as gated actions via `actions.modals` config. Test coverage includes unit tests for the API wrappers, input validation, E2E tests for action handling (including error paths), and routing tests for modal submission/close events with `private_metadata` session routing. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The implementation is well-structured with comprehensive test coverage across all levels (unit, integration, E2E). All three modal actions follow existing patterns in the codebase, include proper validation (view type checking, required parameter validation), error handling (surfacing provider errors, hash conflicts), and gating via config. The tests cover both success and failure paths, including validation errors, provider errors, and disabled action scenarios. No security concerns identified. - No files require special attention <sub>Last reviewed commit: a427f4d</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs