feat(child-workflows): nested execution snapshots#3059
Merged
icecrasher321 merged 7 commits intostagingfrom Jan 29, 2026
Merged
feat(child-workflows): nested execution snapshots#3059icecrasher321 merged 7 commits intostagingfrom
icecrasher321 merged 7 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR enables child workflow previews in execution logs to use their own execution snapshots instead of the current live state. The implementation creates workflow snapshots during child workflow execution, stores snapshot IDs in trace spans, fetches them via the API, and uses them when drilling down in the UI. Key changes:
Impact: Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant WH as WorkflowHandler
participant SS as SnapshotService
participant EX as Executor
participant BE as BlockExecutor
participant DB as Database
participant API as API Route
participant UI as UI Components
Note over WH,SS: Child Workflow Execution
WH->>SS: createSnapshotWithDeduplication(workflowId, childWorkflowState)
SS->>DB: Check for existing snapshot by hash
alt Snapshot exists
SS-->>WH: Return existing snapshot
else New snapshot
SS->>DB: Insert new snapshot
SS-->>WH: Return new snapshot
end
Note over WH: Store childWorkflowSnapshotId
WH->>EX: Execute child workflow
EX->>BE: Execute blocks
alt Success
BE-->>WH: Execution result
WH-->>WH: Map result with childWorkflowSnapshotId
else Error
BE-->>WH: ChildWorkflowError
WH-->>WH: Propagate childWorkflowSnapshotId in error
end
Note over WH: Build trace spans with childWorkflowSnapshotId
Note over DB,UI: Execution Logs & Viewing
DB->>DB: Store execution log with trace spans
UI->>API: GET /api/logs/execution/[executionId]
API->>DB: Fetch execution log
API->>API: Recursively collect childWorkflowSnapshotIds from trace spans
API->>DB: Fetch child workflow snapshots (batch query)
API-->>UI: Return execution data + childWorkflowSnapshots map
UI->>UI: Pass childWorkflowSnapshots to Preview component
UI->>UI: Use snapshot state when drilling down into child workflows
|
Collaborator
Author
|
@cursor review |
Collaborator
Author
|
@cursor review |
...pp/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx
Show resolved
Hide resolved
Collaborator
Author
|
@cursor review |
Collaborator
Author
|
@cursor review |
...rkspace/[workspaceId]/logs/components/dashboard/components/workflows-list/workflows-list.tsx
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Child workflow previews in the logs should be based on their own execution snapshots.
Type of Change
Testing
Tested manually
Checklist