Skip to content

fix: truncate persona option text to 75 chars for Slack views.open limit#42

Merged
Sarath1018 merged 1 commit intofeature/darwinfrom
sarath/personas
May 7, 2026
Merged

fix: truncate persona option text to 75 chars for Slack views.open limit#42
Sarath1018 merged 1 commit intofeature/darwinfrom
sarath/personas

Conversation

@Sarath1018
Copy link
Copy Markdown
Collaborator

Problem

The /personas slash command in the Slack bot was failing with:

Error sending select menu: The request to the Slack API failed. (url: https://www.slack.com/api/views.open)
'error': 'invalid_arguments'
'[ERROR] must be less than 76 characters [json-pointer:/view/blocks/0/element/options/27/text/text]'
One or more personas had a combined name • description string exceeding Slack's 75-character limit for plain_text option labels in static_select modals.

Fix

Truncate the option label f"{persona.name} • {persona.description}" to 75 characters before passing it to views.open.

Root Cause

Slack's Block Kit enforces a hard 75-character limit on plain_text option text in static_select elements. Persona option 27 (0-indexed) was exceeding this limit, causing the entire modal to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Sarath1018 Sarath1018 merged commit e14885f into feature/darwin May 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants