Skip to content

Add optional assistant.threads.setStatus params - #470

Merged
VictorHLi404 merged 2 commits into
masterfrom
victor/assistant-set-status-loading-messages
Aug 12, 2026
Merged

Add optional assistant.threads.setStatus params#470
VictorHLi404 merged 2 commits into
masterfrom
victor/assistant-set-status-loading-messages

Conversation

@VictorHLi404

Copy link
Copy Markdown
Contributor

Why

Slack's assistant.threads.setStatus supports four optional arguments that SetThreadStatusParams didn't expose, so callers had no way to drive the animated loading indicator or override the status message's icon/username.

What

Adds all four optional arguments for full parity with the API:

Field Type Purpose
loading_messages List<String> messages rotated through as a loading indicator
icon_emoji Optional<String> override the status icon with an emoji
icon_url Optional<String> override the status icon with an image URL
username Optional<String> override the displayed bot name
  • loading_messages carries a guard for Slack's documented maximum of 10 so we fail fast rather than letting Slack reject the request.
  • Unused optionals are omitted entirely from the request (NON_ABSENT for the optionals, NON_EMPTY for the list) rather than sending null/[].
  • Adds SetThreadStatusParamsValidationTest covering the empty, at-limit, and over-limit cases.

🤖 Generated with Claude Code

Slack's assistant.threads.setStatus supports four optional arguments we
weren't exposing (loading_messages, icon_emoji, icon_url, username), so
callers had no way to drive the animated loading indicator or override
the status message's icon/username. This adds all four to
SetThreadStatusParams for full parity with the API.

loading_messages carries a guard for Slack's documented maximum of 10 so
we fail fast rather than letting Slack reject the request. Serialization
is set up so unused optionals are omitted entirely (NON_ABSENT for the
optionals, NON_EMPTY for the list) rather than sending null/[] values.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VictorHLi404 VictorHLi404 assigned opaliukh and unassigned opaliukh Aug 11, 2026
@VictorHLi404
VictorHLi404 requested a review from opaliukh August 11, 2026 17:10
- Rename @Value.Check method to checkLoadingMessagesWithinLimit to match
  the check* prefix convention used throughout this repo
- Add checkIconNotBothPresent guard since Slack treats icon_emoji and
  icon_url as mutually exclusive; fail fast rather than waiting for an
  API rejection
- Add smoke test for the three Optional fields (icon_emoji, icon_url,
  username) and a test covering the mutually-exclusive icon guard

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VictorHLi404
VictorHLi404 merged commit 23c0b75 into master Aug 12, 2026
2 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.

2 participants