fix(slack): keep components with streamed responses - #829
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
b39b5a7 to
2f064d2
Compare
|
The latest updates on your projects. Learn more about Unkey Deploy
|
Streamed Slack answers currently post tables and feedback controls as a separate reply. Finalize the existing stream with
chat.stopStream.blocksso those controls stay attached to the answer they describe, and feedback refers to the answer's message timestamp. Clients without streaming keep the existing text-and-components fallback.Serialize progress updates, coalesce superseded pending updates, and finish them before resolving the thinking card or closing the stream. Check cancellation before starting the model and before sending queued text or final blocks. If Slack rejects the component blocks, finish the valid prose without them; cancellation still closes the stream without adding new prose.
Validation: 67 Slack tests pass, including combined answer/table/feedback, non-stream fallback, delayed progress on success/error/cancellation, coalescing, cancellation during stream startup, and cancellation during rejected-block recovery. The new behavioral regressions failed before their fixes. Root lint and all 33 typecheck tasks pass. The pre-push repository test suite passed all 29 tasks (28 cached). Independent review found one cancellation edge, now covered by a regression and fixed.
Scope: response rendering and delivery ordering only. No schema, dependency, Slack scope, manifest, or installation changes. Based directly on current staging with no PR dependency. Related Slack lifecycle drafts #819, #820, and #822 change other files; #819's cancellation behavior should be verified together with this response path before landing. API timeout configuration and message-edit handling are separate slices.
Slack's documented final-message blocks behavior: https://docs.slack.dev/reference/methods/chat.stopStream/
Summary by cubic
Streamed Slack answers now keep tables and feedback controls attached to the answer itself instead of posting them as a separate reply. Progress updates are serialized and coalesced, and cancellation is honored at key points.
chat.stopStream.blocks.chat.postMessage.Written for commit 140a21e. Summary will update on new commits.