Show all branch evaluations in conditional block timeline (#SKY-7495) by celalzamanoglu · Pull Request #4577 · Skyvern-AI/skyvern · GitHub
Skip to content

Show all branch evaluations in conditional block timeline (#SKY-7495) - #4577

Merged
celalzamanoglu merged 1 commit into
mainfrom
celal/sky-7495-conditional-block-frontend
Jan 29, 2026
Merged

celalzamanoglu merged 1 commit into
mainfrom
celal/sky-7495-conditional-block-frontend

Conversation

@celalzamanoglu

@celalzamanoglu celalzamanoglu commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor
## Summary - [SKY-7495](https://linear.app/skyvern/issue/SKY-7495/show-prompt-and-evaluation-path-for-conditional-block)

Enhanced the workflow run timeline to display detailed evaluation information for all branches in conditional blocks. Users can now see which conditions were evaluated, how template variables were rendered with actual values, the true/false result of each evaluation, and which branch ultimately matched and executed.

Depends on: Backend PR #8400 (must be deployed first)

Problem

Previously, the conditional block timeline only showed the final executed branch without revealing the evaluation process. Users couldn't see:

  • Which other branches were evaluated before finding a match
  • How Jinja2 template expressions were rendered with actual runtime values
  • The boolean result of each condition evaluation
  • Why a particular branch was chosen over others

This lack of transparency made it difficult to debug conditional logic and understand workflow execution paths.

What Changed

  • Added type definitions in workflowRunTypes.ts:

  • BranchEvaluation type with fields for branch metadata, expressions, results, and matching status

  • ConditionalBlockOutput type to structure the evaluations array in block output

  • hasEvaluations() type guard function for safe evaluation access

  • Enhanced conditional block rendering in WorkflowRunTimelineBlockItem.tsx:

  • Displays all branch evaluations in order with individual cards per branch

  • Shows both original expression and rendered expression (with variable substitution)

  • Color-codes evaluation results: green for True, red for False

  • Highlights matched branch with green border and background

  • Distinguishes default branches with special label

  • Shows next block label for the matched branch

  • Maintains backward compatibility with old workflow runs via fallback to legacy display format

Screenshots

image

Test plan

  • Run a workflow with conditional block having multiple branches
  • Verify all branches are displayed in the timeline
  • Verify original expression shows Jinja2 template syntax
  • Verify rendered expression shows actual values substituted
  • Verify each branch shows True/False evaluation result
  • Verify matched branch has green border/background highlighting
  • Test with old workflow run to verify backward compatibility fallback
  • Test with various conditional block scenarios: Jinja2 templates, prompt-based conditions, default branch execution

🤖 Generated with Claude Code


Important

Enhanced workflow run timeline to display detailed branch evaluations in conditional blocks, including expressions and results.

  • Behavior:
    • Enhanced WorkflowRunTimelineBlockItem to display all branch evaluations in conditional blocks.
    • Shows original and rendered expressions, evaluation results, and highlights matched branches.
    • Maintains backward compatibility with old workflow runs.
  • Types:
    • Added BranchEvaluation and ConditionalBlockOutput types in workflowRunTypes.ts.
    • Added hasEvaluations() type guard function.
  • Rendering:
    • Updated WorkflowRunTimelineBlockItem.tsx to render branch evaluations with color-coded results and labels for matched branches.

This description was created by Ellipsis for 7076bde. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • New Features
    • Enhanced conditional block visualization with detailed branch evaluation display
    • Added visual indicators showing condition results (True/False) and matched branches
    • Improved styling to distinguish default branches from matched evaluations
    • Added navigation indicators for block transitions within conditional logic

✏️ Tip: You can customize this high-level summary in your review settings.

@ellipsis-dev ellipsis-dev 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.

Important

Looks good to me! 👍

Reviewed everything up to 3e36372 in 28 seconds. Click for details.
  • Reviewed 170 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_qFe9AkpaOBSidz6w

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@coderabbitai

coderabbitai Bot commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor

…src/'

## Summary - [SKY-7495](https://linear.app/skyvern/issue/SKY-7495/show-prompt-and-evaluation-path-for-conditional-block)

Enhanced the workflow run timeline to display detailed evaluation information for all branches in conditional blocks. Users can now see which conditions were evaluated, how template variables were rendered with actual values, the true/false result of each evaluation, and which branch ultimately matched and executed.

**Depends on**: Backend PR #8400 (must be deployed first)

## Problem

Previously, the conditional block timeline only showed the final executed branch without revealing the evaluation process. Users couldn't see:
- Which other branches were evaluated before finding a match
- How Jinja2 template expressions were rendered with actual runtime values
- The boolean result of each condition evaluation
- Why a particular branch was chosen over others

This lack of transparency made it difficult to debug conditional logic and understand workflow execution paths.

## What Changed

- **Added type definitions** in `workflowRunTypes.ts`:
  - `BranchEvaluation` type with fields for branch metadata, expressions, results, and matching status
  - `ConditionalBlockOutput` type to structure the evaluations array in block output
  - `hasEvaluations()` type guard function for safe evaluation access

- **Enhanced conditional block rendering** in `WorkflowRunTimelineBlockItem.tsx`:
  - Displays all branch evaluations in order with individual cards per branch
  - Shows both original expression and rendered expression (with variable substitution)
  - Color-codes evaluation results: green for True, red for False
  - Highlights matched branch with green border and background
  - Distinguishes default branches with special label
  - Shows next block label for the matched branch
  - Maintains backward compatibility with old workflow runs via fallback to legacy display format

## Screenshots
<img width="1512" height="1256" alt="image" src="https://github.com/user-attachments/assets/8b69e13c-8d89-4bd4-828a-2b3aba4cdf4c" />

## Test plan

- [x] Run a workflow with conditional block having multiple branches
- [x] Verify all branches are displayed in the timeline
- [x] Verify original expression shows Jinja2 template syntax
- [x] Verify rendered expression shows actual values substituted
- [x] Verify each branch shows True/False evaluation result
- [x] Verify matched branch has green border/background highlighting
- [x] Test with old workflow run to verify backward compatibility fallback
- [x] Test with various conditional block scenarios: Jinja2 templates, prompt-based conditions, default branch execution

🤖 Generated with [Claude Code](https://claude.ai/code)
@celalzamanoglu
celalzamanoglu force-pushed the celal/sky-7495-conditional-block-frontend branch from 3e36372 to 7076bde Compare January 29, 2026 10:00

@ellipsis-dev ellipsis-dev 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.

Important

Looks good to me! 👍

Reviewed 7076bde in 28 seconds. Click for details.
  • Reviewed 172 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_ykI7rudIk25T3nmP

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@celalzamanoglu
celalzamanoglu merged commit 3694faf into main Jan 29, 2026
8 checks passed
@celalzamanoglu
celalzamanoglu deleted the celal/sky-7495-conditional-block-frontend branch January 29, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant