improvement(slack-trigger): expose view, message, and state on interactivity payloads#5279
Conversation
…ctivity payloads The native Slack trigger flattened every interaction into scalar event.* fields and dropped the structured objects, so view_submission and block-rewrite workflows could not read view.state.values, view.private_metadata, or message.blocks. Pass the full Slack view and message objects through, plus the top-level block_actions state (state.values), and declare them in the trigger outputs so they surface in the editor. Additive and backwards compatible: existing flattened fields are unchanged and new fields default to null.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
The Slack trigger Reviewed by Cursor Bugbot for commit fe44223. Configure here. |
Greptile SummaryThis PR exposes more of Slack's interactivity payload to workflows. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "improvement(slack-trigger): expose view,..." | Re-trigger Greptile |
Summary
The native Slack trigger flattened every interaction into scalar
event.*fields and dropped the structured objects — so workflows on the trigger could not readview.state.values/view.private_metadata(modal submissions) ormessage.blocks(block-rewrite paths). This passes the full structured objects through and declares them in the trigger outputs.event.view— full Slack view object for modal interactions (view_submission/view_closed):state.values,private_metadata,id,callback_id,hash,blocks,title.event.message— full source message object for block_actions on a message (incl.blocks), so block-rewrite paths can edit it.event.state— top-level block_actionsstate.values(current input values of the surface read on a button click, without a modal submit).All three are declared in the trigger
outputs(typejson) so they surface in the editor output picker.nullwhen Slack does not send them (verified against the docs: no top-levelmessage/trigger_idonview_submission, noviewon a message-based block action).Context
Unblocks moving the Slack interactivity workflows off the generic webhook trigger and onto the native Slack trigger (the durable fix for the
trigger_id3s race). Without these fields the swap would have been a payload-contract rebuild; with them it is a clean rename.Type of Change
Testing
formatInput↔ triggeroutputskeys cross-checked: all 29 keys align in both directions.check:api-validationpassed.null;processTriggerFileOutputspasses the json fields through untouched.Checklist