feat(web): expose public ts property on ChatStream#1880
Open
srtaalej wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1880 +/- ##
==========================================
- Coverage 84.13% 84.13% -0.01%
==========================================
Files 117 117
Lines 13337 13343 +6
==========================================
+ Hits 11221 11226 +5
- Misses 2116 2117 +1 ☔ View full report in Codecov by Sentry. |
WilliamBergamin
requested changes
May 28, 2026
Contributor
WilliamBergamin
left a comment
There was a problem hiding this comment.
Awesome work 💯 this look good
Could we mirror the unit test to cover the async implementation, once added I think we are good to merge 🙏
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.
Summary
tsproperty toChatStreamandAsyncChatStream, enabling users to callchat.updateas a fallback when the server closes a stream due to undocumented timeouts.Resolves #1859
Background
When Slack's server-side timeout kills a stream, both
chat.appendStreamandchat.stopStreamreturnmessage_not_in_streaming_state. The message still exists but is stuck as a broken pill in the UI. The only recovery path ischat.update(ts=...), buttswas previously a private attribute (_stream_ts).Changes
slack_sdk/web/chat_stream.py: Addedtsproperty (read-only, returnsOptional[str])slack_sdk/web/async_chat_stream.py: Same (auto-generated via codegen)tests/slack_sdk/web/test_chat_stream.py: Added test verifyingtsisNonebefore flush and set aftercode snippet
Test plan
tsisNonebefore first flush and set after