fix: remove icon_url from url source block element and plan_id from plan block and update chat stream variable by zimeg · Pull Request #1822 · slackapi/python-slack-sdk · GitHub
Skip to content

fix: remove icon_url from url source block element and plan_id from plan block and update chat stream variable#1822

Merged
zimeg merged 4 commits into
feat-ai-apps-thinking-stepsfrom
zimeg-fix-chunks-update
Jan 29, 2026
Merged

fix: remove icon_url from url source block element and plan_id from plan block and update chat stream variable#1822
zimeg merged 4 commits into
feat-ai-apps-thinking-stepsfrom
zimeg-fix-chunks-update

Conversation

@zimeg

@zimeg zimeg commented Jan 22, 2026

Copy link
Copy Markdown
Member

Summary

This PR removes the icon_url from the url source block element to match the expected API and also updates an internal chat_stream variable for maintenance ongoing.

The plan_id is also removed from the plan block.

Testing

Build these changes and stream a message with this app:

$ slack create slack-samples/bolt-python-assistant-template --branch feat-ai-apps-thinking-steps

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.models (UI component builders)
  • /docs (Documents)
  • tests/integration_tests (Automated tests for this library)

Notes

No update was made for an append without either "chunks" or "markdown_text" following discussion of #1809. With logging set to "debug" we might find an alright hint that the buffer is unchanged:

...
DEBUG:slack_sdk.web.base_client:ChatStream appended to buffer: {"buffer_length": 0, "buffer_size": 256, "channel": "D0A86GYHLG5", "recipient_team_id": "T02A074M3U3", "recipient_user_id": "U04051AF9NJ", "thread_ts": "1769060200.942659"}
DEBUG:slack_sdk.web.base_client:ChatStream appended to buffer: {"buffer_length": 0, "buffer_size": 256, "channel": "D0A86GYHLG5", "recipient_team_id": "T02A074M3U3", "recipient_user_id": "U04051AF9NJ", "thread_ts": "1769060200.942659"}
DEBUG:slack_sdk.web.base_client:ChatStream appended to buffer: {"buffer_length": 0, "buffer_size": 256, "channel": "D0A86GYHLG5", "recipient_team_id": "T02A074M3U3", "recipient_user_id": "U04051AF9NJ", "thread_ts": "1769060200.942659"}
...

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@zimeg zimeg requested review from mwbrooks and srtaalej January 22, 2026 05:48
@zimeg zimeg self-assigned this Jan 22, 2026
@zimeg zimeg requested a review from a team as a code owner January 22, 2026 05:48
@zimeg zimeg added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch web-client Version: 3x labels Jan 22, 2026
@codecov

codecov Bot commented Jan 22, 2026

Copy link
Copy Markdown

@zimeg zimeg changed the title fix: remove icon_url from url source block element and update chat stream variable fix: remove icon_url from url source block element and plan_id from plan block and update chat stream variable Jan 24, 2026

@srtaalej srtaalej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🎆

async def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, **kwargs) -> AsyncSlackResponse:
"""Flush the internal buffer with chunks by making appropriate API calls."""
flushings: List[Union[Dict, Chunk]] = []
chunks_to_flush: List[Union[Dict, Chunk]] = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💯

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a much better name choice and it adds clarity around what will be flushed.

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

✅ Great work! A nice clean removal of icon_url and plan_id. The refactor to chunks_to_flush also makes the code more readable.

📝 Just a note for our future selves - icon_url and plan_id are internal properties that aren't available on the public API yet. So, there are no breaking changes.

🧪 Test coverage looks great and this has no impact on our sample app. 🚀

async def _flush_buffer(self, chunks: Optional[Sequence[Union[Dict, Chunk]]] = None, **kwargs) -> AsyncSlackResponse:
"""Flush the internal buffer with chunks by making appropriate API calls."""
flushings: List[Union[Dict, Chunk]] = []
chunks_to_flush: List[Union[Dict, Chunk]] = []

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a much better name choice and it adds clarity around what will be flushed.

@zimeg

zimeg commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

@zimeg zimeg merged commit 83bc1e8 into feat-ai-apps-thinking-steps Jan 29, 2026
16 checks passed
@zimeg zimeg deleted the zimeg-fix-chunks-update branch January 29, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Version: 3x web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants