fix(slack): truncate section text when updating approval messages - #62053
Closed
b32n wants to merge 1 commit into
Closed
fix(slack): truncate section text when updating approval messages#62053b32n wants to merge 1 commit into
b32n wants to merge 1 commit into
Conversation
Slack chat.update fails with invalid_blocks when rebuilding approval or slash-confirm messages after a button click if the original section text exceeds the 3000-character Block Kit limit. send_exec_approval already budgets content on send; mirror that on update via _fit_slack_section_text. Co-authored-by: Cursor <cursoragent@cursor.com>
1 task
Collaborator
Duplicate of #53701 (earliest-open canonical) — same code-site and mechanism: clamp the echoed |
Author
|
Closing this PR as it's a duplicate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #62054
What
Slack
chat.updatefails withinvalid_blockswhen updating approval or slash-confirm messages after a button click — the section block text exceeds Slack's 3000-character limit.Why
send_exec_approvalandsend_slash_confirmbudget content on send, but_handle_approval_actionand_handle_slash_confirm_actioncopyoriginal_textverbatim when rebuilding blocks after a button click.Fix
Add
_fit_slack_section_text()to clamp section mrkdwn to 3000 chars beforechat.update.How to test
Manual repro (production symptom):
execute_codescript.Previously:
invalid_blocks/must be less than 3001 characters [json-pointer:/blocks/0/text/text]— approval still resolved but UI did not update.Platforms tested