feat(streaming): stream custom block outputs in chat and Slack - #7576
feat(streaming): stream custom block outputs in chat and Slack#7576TheodoreSpeaks wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cubic-dev-ai review this PR |
@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete. |
Greptile SummaryThis PR enables publisher-selected custom-block text outputs to stream through deployed chat and Slack while preserving output references and keeping child workflow metadata private.
Confidence Score: 5/5The PR appears safe to merge; no actionable new defects remain, and the previously reported provider-cancellation issue was manually resolved after the source-cancellation fix. Required stream-delivery failures now abort the provider pump without aborting the workflow signal, while the original delivery error still fails the block. The previous finding was manually resolved after TheodoreSpeaks added this behavior and its regression coverage.
|
| Filename | Overview |
|---|---|
| apps/sim/executor/handlers/workflow/workflow-handler.ts | Validates and projects selected custom-block text streams while filtering private child events and metadata. |
| apps/sim/executor/execution/block-executor.ts | Aborts the provider pump when required stream delivery fails and preserves the original delivery error. |
| apps/sim/lib/webhooks/slack-execution-stream.ts | Tracks custom-block field streams by invocation and settles Slack tasks on block completion, failure, or cancellation. |
| apps/sim/lib/workflows/streaming/custom-block-output.ts | Defines validation and selection behavior for publisher-authorized live custom-block outputs. |
| apps/sim/lib/workflows/streaming/streaming.ts | Adds field-scoped stream identity and compatibility handling for clients that do not negotiate retractions. |
| apps/sim/app/(interfaces)/chat/hooks/use-chat-streaming.ts | Keys streamed text and retractions by stream identity so sibling fields and repeated invocations remain independent. |
Sequence Diagram
sequenceDiagram
participant Source as Source workflow
participant Custom as Custom block boundary
participant Consumer as Consumer workflow
participant Client as Chat or Slack
Source->>Custom: Selected answer text stream
Custom->>Custom: Filter private thinking, tools, and metadata
Custom->>Consumer: Public field stream with streamId
Consumer->>Client: Stream selected output
alt Chat with scoped-output-v1
Client->>Client: Apply field-scoped chunks and retractions
else Slack
Client->>Client: Stream settled final-turn text
Custom-->>Client: Settle when custom block completes
end
alt Delivery fails
Consumer-->>Source: Cancel provider pump
Consumer-->>Client: Report delivery failure
end
Reviews (2): Last reviewed commit: "fix(streaming): cancel generation when s..." | Re-trigger Greptile
|
@cubic-dev-ai review this PR |
@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete. |
Summary
Type of Change
Testing
Targeted streaming tests, including provider cancellation, workspace type checks, full lint, all 46 repository audits, docs manifest, and migration safety checks passed. Drizzle reports no SQL changes. Live Slack delivery was not exercised.
Checklist