Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

Hide child workflow span json from workflow block output.

Type of Change

  • Other: UX Improvement

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)

@vercel
Copy link

vercel bot commented Jan 27, 2026

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 27, 2026 2:38am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 27, 2026

Greptile Overview

Greptile Summary

Added a new filterOutputForDisplay method that filters out childTraceSpans from workflow block output before sending to the UI via onBlockComplete callback. The childTraceSpans data is still preserved in logs through filterOutputForLog, ensuring trace data remains available for debugging while hiding the raw JSON from end-user UI.

Key Changes:

  • Introduced filterOutputForDisplay method that wraps filterOutputForLog and additionally removes childTraceSpans for workflow block types
  • Updated both success and error paths in execute method to use filterOutputForDisplay instead of filterOutputForLog when calling onBlockComplete
  • Imported isWorkflowBlockType helper function to identify workflow blocks
  • Preserved existing behavior for block logs (still includes childTraceSpans in log output)

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is well-designed and surgically implements the stated goal. It introduces a clean separation between log output (which retains all data) and display output (which hides internal trace spans). The implementation correctly handles both success and error paths, uses proper TypeScript destructuring, and follows existing patterns in the codebase. No logical issues, edge cases, or security concerns identified.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/executor/execution/block-executor.ts Added filterOutputForDisplay method to hide childTraceSpans from workflow block UI output while preserving it in logs

Sequence Diagram

sequenceDiagram
    participant Executor as BlockExecutor
    participant Handler as BlockHandler
    participant Filter as filterOutputForDisplay
    participant Log as BlockLog
    participant UI as onBlockComplete

    Executor->>Handler: execute block (workflow type)
    Handler-->>Executor: return output with childTraceSpans
    
    Note over Executor: Success Path
    Executor->>Log: filterOutputForLog(block, output)
    Log-->>Executor: output (includes childTraceSpans)
    Note over Log: Logs retain childTraceSpans<br/>for debugging
    
    Executor->>Filter: filterOutputForDisplay(block, output)
    Filter->>Filter: filterOutputForLog(block, output)
    Filter->>Filter: isWorkflowBlockType?
    Filter->>Filter: remove childTraceSpans
    Filter-->>Executor: displayOutput (no childTraceSpans)
    
    Executor->>UI: onBlockComplete(displayOutput)
    Note over UI: UI receives clean output<br/>without raw JSON spans
Loading

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.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@icecrasher321 icecrasher321 merged commit 9ee5dfe into staging Jan 27, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/hide-childworkflowspan branch January 27, 2026 06:04
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.

2 participants