Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Jan 13, 2026

Summary

This PR adds the task_display_mode option to the start of chat streams.

Testing

Use the following to start a stream with either a "plan" or "timeline" task display mode:

streamer = client.chat_stream(
    channel="C0123456789",
    recipient_team_id="T0123456789",
    recipient_user_id="U0123456789",
    thread_ts="17000000000.00000",
    task_display_mode="plan",
)

Category

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

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 13, 2026 23:27
@zimeg zimeg self-assigned this Jan 13, 2026
@zimeg zimeg added enhancement M-T: A feature request for new functionality web-client Version: 3x labels Jan 13, 2026
@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feat-ai-apps-thinking-steps@b031148). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                      Coverage Diff                       @@
##             feat-ai-apps-thinking-steps    #1820   +/-   ##
==============================================================
  Coverage                               ?   83.96%           
==============================================================
  Files                                  ?      116           
  Lines                                  ?    13212           
  Branches                               ?        0           
==============================================================
  Hits                                   ?    11094           
  Misses                                 ?     2118           
  Partials                               ?        0           

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

@zimeg zimeg marked this pull request as ready for review January 14, 2026 20:09
@zimeg zimeg requested a review from a team as a code owner January 14, 2026 20:09
streaming to channels.
recipient_user_id: The encoded ID of the user to receive the streaming text. Required when streaming to channels.
task_display_mode: Specifies how tasks are displayed in the message. A "timeline" displays individual tasks
interleaved with text and "plan" displays all tasks together.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 lgtm

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Looking good 💯 left one commend one comment on enums and error message from the backend

recipient_team_id: Optional[str] = None,
recipient_user_id: Optional[str] = None,
chunks: Optional[Sequence[Union[Dict, Chunk]]] = None,
task_display_mode: Optional[str] = None, # timeline, plan
Copy link
Contributor

Choose a reason for hiding this comment

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

(take it or leave it) we could potentially use enums here, but if it does not fall in line with existing patterns we shouldn't do it

Edit: actually maybe it would be worth having the web API return a proper error message with the possible options if an invalid value is passed

Copy link
Member

Choose a reason for hiding this comment

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

Agree, I think it's good to expect the API return an error message with the the available options when an invalid option value is passed.

The display modes are aiming to support what's common in LLM UIs, so I imagine there will be more in the future that Slack will want to support. It would be nice for developers to have access to the new modes without upgrading the SDK version (I'm assuming an enum would require an SDK upgrade to support the new options?)

Copy link
Member Author

Choose a reason for hiding this comment

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

@WilliamBergamin @mwbrooks Oh dang, the tradeoffs are fascinating! 😳

I think I agree letting the API error for invalid values might be best for ongoing maintenance and I hope for now this comment is quick enough to jump to for fast reference. I'll update some notes to avoid using enums in adjacent changes too 📚

Prior art for me was found just above:

parse: Optional[str] = None, # none, full

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

✅ Thanks for adding the task_display_mode to the chat_startStream and chat_stream helper methods!

🧪 Local testing works for both task_display_mode="plan" and task_display_mode="timeline".

🧠 Small aside, but seeing the same code displayed in both plan and timeline has helped me better understand the UX differences between these two. I wonder if it would help other developers as well (e.g. in our documentation)? .cc @lukegalbraithrussell

Base automatically changed from zimeg-feat-ai-apps-chunks-streamer to feat-ai-apps-thinking-steps January 16, 2026 23:25
Co-authored-by: Michael Brooks <[email protected]>
@zimeg
Copy link
Member Author

zimeg commented Jan 17, 2026

@srtaalej @WilliamBergamin @mwbrooks Fascinating discussion again! Let's hold off on enums for these upcoming versions but keep documentation current 📚 ✨

Small aside, but seeing the same code displayed in both plan and timeline has helped me better understand the UX differences between these two. I wonder if it would help other developers as well (e.g. in our documentation)?

We might have the kind Block Kit Builder to use for showing this quick in examples, but I'm hoping the sample "examples" repos can be useful too!

Let's merge this 🐞 🔍 👻

@zimeg zimeg merged commit b1dc199 into feat-ai-apps-thinking-steps Jan 17, 2026
15 checks passed
@zimeg zimeg deleted the zimeg-feat-ai-apps-task-display-mode branch January 17, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:minor Version: 3x web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants