Skip to content

feat: add chat stream helpers#1595

Closed
Cr1stal wants to merge 2 commits into
slackapi:mainfrom
Cr1stal:feature/pr-1545-local-rescue
Closed

feat: add chat stream helpers#1595
Cr1stal wants to merge 2 commits into
slackapi:mainfrom
Cr1stal:feature/pr-1545-local-rescue

Conversation

@Cr1stal
Copy link
Copy Markdown

@Cr1stal Cr1stal commented Jun 1, 2026

Adds a structured helper API for the Slack chat stream methods.

This is a cleaned-up follow-up to #1545 with a smaller review surface:

  • Adds ChatStream and AsyncChatStream facades for chat.startStream, chat.appendStream, and chat.stopStream.
  • Separates stream buffering, lifecycle validation, protocol calls, and async queueing into focused package-private helpers.
  • Keeps the sync helper caller-confined while the async helper serializes work and protects mutable stream state.
  • Adds local sync and async coverage for buffering, lifecycle failures, stop semantics, serialization, recovery, and async ordering.

User/developer impact: callers can work with Slack chat streams through a small stateful helper instead of manually coordinating method calls and stream timestamps.

Validation:

./mvnw -pl slack-api-client test -Dtest=test_locally.api.methods.ChatStreamTest,test_locally.api.methods.AsyncChatStreamTest

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

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

@Cr1stal Cr1stal marked this pull request as ready for review June 1, 2026 14:00
@Cr1stal Cr1stal requested a review from a team as a code owner June 1, 2026 14:00
@WilliamBergamin
Copy link
Copy Markdown
Contributor

Closing since this is a duplicate of #1545

@Cr1stal
Copy link
Copy Markdown
Author

Cr1stal commented Jun 1, 2026

@WilliamBergamin Thanks, that makes sense.

I opened this PR only because I could not push the cleaned-up/squashed version directly to slackapi:ale-chat-stream-helper. Let's keep #1545 as the canonical PR.

For reference, the cleaned branch is here:
https://github.com/Cr1stal/java-slack-sdk/tree/feature/pr-1545-local-rescue

It keeps the same intent but reduces the branch to two commits:

  • Add chat stream helpers
  • Add chat stream helper tests

If #1545 should remain the canonical PR, could someone with push access either update ale-chat-stream-helper from that branch or let me know the preferred way to transfer the cleaned diff there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants