Skip to content

Comments

feat: add loading messages to assistant threads set status#1523

Merged
zimeg merged 6 commits intomainfrom
zimeg-feat-client-loading-messages
Nov 3, 2025
Merged

feat: add loading messages to assistant threads set status#1523
zimeg merged 6 commits intomainfrom
zimeg-feat-client-loading-messages

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Oct 28, 2025

This PR adds loading_messages to the assistant.threads.setStatus method alongside the assistant helper:

List<String> messages = List.of(
    "Thinking about something...",
    "Writing about another..."
);
var response = slack.methods().assistantThreadsSetStatus(r -> r.token(token)
    .status("is waiting...")
    .channelId("D05GMFEEZ0Q")
    .threadTs("1761624263.716829")
    .loadingMessages(messages)
);

Category

  • bolt (Bolt for Java)
  • slack-api-client (Slack API Clients)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

@zimeg zimeg added this to the 1.46.0 milestone Oct 28, 2025
@zimeg zimeg self-assigned this Oct 28, 2025
@zimeg zimeg added enhancement M-T: A feature request for new functionality project:bolt project:slack-api-client project:slack-api-client area:examples issues related to example or sample code labels Oct 28, 2025
Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📬 A note on testing for the wonderful reviewers!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👾 note: This file has a complete sample app that might be useful in testing! Setup of events and scopes is required - IIRC:

  • messages.im
  • assistant_thread_started

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.87%. Comparing base (0a30aca) to head (9174203).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...m/slack/api/bolt/context/builtin/EventContext.java 71.42% 1 Missing and 1 partial ⚠️
...java/com/slack/api/methods/RequestFormBuilder.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1523      +/-   ##
============================================
- Coverage     72.91%   72.87%   -0.05%     
- Complexity     4402     4403       +1     
============================================
  Files           476      476              
  Lines         14036    14045       +9     
  Branches       1471     1472       +1     
============================================
  Hits          10235    10235              
- Misses         2930     2937       +7     
- Partials        871      873       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg zimeg added the docs M-T: Documentation work only label Oct 28, 2025
Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💌 Leaving another note with most recent findings!

* [`setTitle`](https://docs.slack.dev/tools/bolt-python/reference/#slack_bolt.SetTitle)
* [`setStatus`](https://docs.slack.dev/tools/bolt-python/reference/#slack_bolt.SetStatus)

- [`say`](<https://oss.sonatype.org/service/local/repositories/releases/archive/com/slack/api/bolt/sdkLatestVersion/bolt-sdkLatestVersion-javadoc.jar/!/com/slack/api/bolt/context/builtin/EventContext.html#say(com.slack.api.bolt.util.BuilderConfigurator)>)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zimeg
Copy link
Member Author

zimeg commented Oct 28, 2025

👁️‍🗨️ Following from kind findings in #1516 IIRC!

ctx.setStatus("is downloading the files...");
Thread.sleep(500L);
ctx.setStatus("is still checking the files...");
ctx.setStatus("is analyzing the files...", Arrays.asList("Reading bytes...", "Confirming hashes..."));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Praise 💯

.loadingMessages(loadingMessages)
);
} else {
throw new IllegalStateException("This utility is only available for Assistant feature enabled app!");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 💯

/**
* The list of messages to rotate through as a loading indicator.
*/
private List<String> loadingMessages;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean 💯

@zimeg zimeg modified the milestones: 1.46.0, 1.47.0 Nov 3, 2025
@zimeg
Copy link
Member Author

zimeg commented Nov 3, 2025

@WilliamBergamin Kind thanks for the review - I am looking forward to loading messages soon... 🤖

@zimeg zimeg enabled auto-merge (squash) November 3, 2025 23:38
@zimeg zimeg merged commit 5e677f0 into main Nov 3, 2025
5 checks passed
@zimeg zimeg deleted the zimeg-feat-client-loading-messages branch November 3, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:examples issues related to example or sample code docs M-T: Documentation work only enhancement M-T: A feature request for new functionality project:bolt project:slack-api-client project:slack-api-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants