Skip to content

feat(logs): added sub-workflow logs, updated trace spans UI, fix scroll behavior in workflow registry sidebar #1037

Merged
waleedlatif1 merged 6 commits intostagingfrom
improvement/logs
Aug 20, 2025
Merged

feat(logs): added sub-workflow logs, updated trace spans UI, fix scroll behavior in workflow registry sidebar #1037
waleedlatif1 merged 6 commits intostagingfrom
improvement/logs

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

added sub-workflow logs, updated trace spans UI, fix scroll behavior in workflow registry sidebar

Type of Change

  • New feature

Testing

Tested manually.

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

Workflow-in-workflow-in-workflow:
Screenshot 2025-08-19 at 4 19 12 PM

@vercel
Copy link

vercel bot commented Aug 19, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Aug 20, 2025 0:45am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 20, 2025 0:45am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR introduces sub-workflow logging capabilities, allowing nested workflow executions to propagate their trace spans to parent workflows for better observability. The implementation adds three key components:

  1. Sub-workflow Log Integration: A new integrateChildWorkflowLogs method in the executor index that processes child workflow trace spans and integrates them into the parent workflow's execution context. This method includes proper type checking to ensure it only processes workflow-type blocks and validates the structure of child trace spans.

  2. Comprehensive Child Workflow Logging: The WorkflowBlockHandler now captures, transforms, and integrates child workflow logs through three new private methods: captureChildWorkflowLogs(), transformSpanForChildWorkflow(), and cleanChildSpanName(). The implementation recursively processes trace spans from nested workflows, adding metadata to identify them as child workflow spans and cleaning up naming conventions for better readability.

  3. Improved Sidebar UX: The workflow registry sidebar now implements intelligent scroll behavior that distinguishes between newly created workflows (created within 5 seconds) and existing ones. New workflows scroll to the top for visibility, while existing workflow navigation uses minimal scrolling with visibility checks to preserve user context.

The changes support complex workflow compositions where workflows can execute other workflows recursively, as demonstrated by the "workflow-in-workflow-in-workflow" screenshot. The trace span transformation ensures proper hierarchical structure is maintained while providing clear visual distinction between parent and child workflow execution logs.

Confidence score: 4/5

  • This PR introduces significant new functionality with proper error handling and type safety, making it relatively safe to merge
  • Score reflects well-structured implementation with comprehensive logging integration, though the feature adds complexity to execution flow
  • Pay close attention to the sidebar scroll behavior changes and workflow handler modifications as they affect core user experience and execution logic

3 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs August 20, 2025 00:40 Inactive
@waleedlatif1 waleedlatif1 merged commit 7beb4a1 into staging Aug 20, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/logs branch August 20, 2025 00:57
Sg312 pushed a commit that referenced this pull request Aug 20, 2025
…ll behavior in workflow registry sidebar (#1037)

* added sub-workflow logs

* indent input/output in trace spans display

* better color scheme for workflow logs

* scroll behavior in sidebar updated

* cleanup

* fixed failing tests
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…ll behavior in workflow registry sidebar (simstudioai#1037)

* added sub-workflow logs

* indent input/output in trace spans display

* better color scheme for workflow logs

* scroll behavior in sidebar updated

* cleanup

* fixed failing tests
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