Skip to content

feat(streaming): support nested workflow outputs - #7346

Merged
TheodoreSpeaks merged 6 commits into
stagingfrom
feat/streamable-subworkflow
Sep 1, 2026
Merged

feat(streaming): support nested workflow outputs#7346
TheodoreSpeaks merged 6 commits into
stagingfrom
feat/streamable-subworkflow

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • Stream selected Agent outputs through nested Workflow blocks in deployed chat and API execution, with invocation-scoped selectors and completion events.
  • Preserve Slack tool and thinking lifecycle events when answer text comes from a transformed structured-response stream.
  • Keep current-workflow outputs visible in the output selector and add an Outputs drilldown for child Workflow blocks.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • bun run lint
  • bun run lint:check
  • bun run type-check
  • bun run check:audits (40/40)
  • 7 focused Vitest files covering 137 tests
  • Agent stream docs and skills generators report no changes

Reviewers should focus on nested selector scoping across execution boundaries, transformed Slack streams combining byte-stream answer text with agent-event tool lifecycle events, and the output-selector drilldown behavior.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Not included; the selector uses the existing Combobox drilldown interaction and is covered by component regression tests.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 1, 2026 9:14am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds invocation-scoped nested-workflow output selection and streaming across chat, API, CLI, Slack, executor, and workflow-authoring surfaces.

  • Resolves public selectors into root- or child-workflow-scoped output identities.
  • Preserves transformed answer streams alongside agent tool and thinking events.
  • Adds nested output-selector drilldown behavior and focused regression coverage.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx Adds nested workflow drilldown and a deterministic remount key that resolves the previously reported stale-path crash.
apps/sim/lib/workflows/streaming/streaming.test.ts Expands transformed-stream lifecycle coverage; no blocking behavior issue was identified.
apps/sim/lib/workflows/streaming/resolve-output-selectors.ts Resolves public root and child-workflow selectors into execution-scoped internal output identities.
apps/sim/executor/handlers/workflow/workflow-handler.ts Propagates selected child-workflow outputs and scopes their stream and completion events.
apps/sim/lib/webhooks/slack-execution-stream.ts Combines transformed byte-stream answers with agent-event lifecycle updates for Slack.
apps/sim/lib/workflows/streaming/nested-output-options.ts Builds nested workflow output options and menu paths for selector consumers.

Sequence Diagram

sequenceDiagram
  participant Client
  participant Selector as Output selector
  participant Root as Root workflow
  participant Child as Child workflow
  participant Stream as Streaming response
  Client->>Selector: Select childWorkflow.block.path
  Selector->>Root: Resolve scoped selector
  Root->>Child: Execute selected child workflow
  Child-->>Root: Stream scoped block events
  Root-->>Stream: Forward selected output and completion
  Stream-->>Client: Answer, tool, and thinking events
Loading

Reviews (5): Last reviewed commit: "fix(cli): align streaming selector help ..." | Re-trigger Greptile

Comment thread apps/sim/lib/workflows/streaming/streaming.test.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 20 files

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Re-trigger cubic

Comment thread apps/sim/app/api/chat/[identifier]/route.ts Outdated
Comment thread apps/sim/lib/workflows/executor/execute-service.ts Outdated
Comment thread apps/sim/lib/workflows/streaming/output-selector.ts Outdated
Comment thread apps/sim/lib/workflows/streaming/output-selector.ts Outdated
Comment thread apps/sim/executor/handlers/workflow/workflow-handler.ts Outdated
Comment thread apps/sim/hooks/queries/chats.ts Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks
TheodoreSpeaks force-pushed the feat/streamable-subworkflow branch from dead9d3 to 628f800 Compare September 1, 2026 07:44
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks
TheodoreSpeaks merged commit 4941c73 into staging Sep 1, 2026
26 checks passed
Sg312 added a commit that referenced this pull request Sep 1, 2026
…ector resolution

Rebasing onto origin/staging carried staging's lib/copilot work into our
renamed lib/mothership files via rename detection; this finishes what the
replay left incomplete:

- Complete the #7151 port: cancel_workflow_run handler + registration on
  the mothership executor (types, tests, and catalog entry had already
  rename-followed in).
- pickRunBlockOutputs awaits the now-async resolveOutputIds (#7346 made
  selector resolution child-workflow-aware) and re-imports isValidUuid.
- Slack execution stream + tool-call-lifecycle import getToolDisplayTitle
  from the mothership tool-display module (#7296 semantics kept).
- Resolve leftover conflict markers from the first replay's failed batch
  checkout (browser-tool hardening #7311, YAML bounds #7319 kept).
- Drop the obsolete lib/mothership/tools/server/blocks scan root: the
  block-metadata tool died in the dead-code sweep; blocks reads flow
  through the already-guarded v2 blocks routes.
- Regenerate OpenAPI, CLI API, and CLI docs from the merged contracts.

Claude-Session: https://claude.ai/code/session_01CgaxNAaeD3taGdghbXn17w
@waleedlatif1
waleedlatif1 deleted the feat/streamable-subworkflow branch September 1, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant