fix(slack): render clarify prompts as block kit buttons - #55671
fix(slack): render clarify prompts as block kit buttons#55671Christopher-Schulze wants to merge 1 commit into
Conversation
4d1f239 to
f6ea5ae
Compare
Related to the Slack clarify Block Kit cluster, not a duplicate:
This PR (#55671) and #51547 both add a |
|
Closing to avoid adding another competing implementation in the Slack clarify Block Kit cluster. I missed the linked sibling PRs in the issue comments during dedupe; thanks for flagging #28885 and #51547. Before closing, I pushed the Slack action-id uniqueness fix to this branch so the diff remains available if useful: choice buttons now use per-button action IDs such as I will not keep this PR open against the existing current-path implementation in #51547. |
What does this PR do?
Slack now renders gateway
clarifyprompts as a single Block Kit prompt with choice buttons instead of inheriting the generic numbered-text fallback. That keeps the user-facing Slack message to the question, choices, and buttons, so the clarify tool result JSON is not exposed as a second raw text payload under the interactive UI.The callback path mirrors the existing gateway clarify contract used by other rich platforms: numeric choices resolve via
resolve_gateway_clarify, "Other" switches the pending prompt into text-capture mode withmark_awaiting_text, and expired prompts update as expired instead of showing a false selection.Related Issue
Fixes #52374
Type of Change
Changes Made
send_clarifyBlock Kit rendering inplugins/platforms/slack/adapter.py.tests/gateway/test_slack_approval_buttons.pyfor safe Slack fallback text, choice resolution, and text-capture mode.How to Test
uv run pytest tests/gateway/test_slack_approval_buttons.py::TestSlackClarifyButtons -quv run pytest tests/gateway/test_slack_approval_buttons.py -quv run pytest tests/gateway/test_slack.py -q./scripts/check.shLocal proof: the new regression tests assert that the Slack API payload contains
blocksand a safe fallbacktextofHermes needs your input: ..., not raw clarify JSON, and that button callbacks resolve through the gateway clarify primitive.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passI did not run the full local
pytest tests/ -qsuite; I ran the scoped Slack tests above plus the repository contributor gate (./scripts/check.sh), and the full suite should run in CI.Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Relevant local checks passed:
uv run pytest tests/gateway/test_slack_approval_buttons.py::TestSlackClarifyButtons -q— 3 passeduv run pytest tests/gateway/test_slack_approval_buttons.py -q— 29 passeduv run pytest tests/gateway/test_slack.py -q— 209 passed./scripts/check.sh— all blocking gates passed