Improve workflow run loop/conditional timeline UX follow-up (#SKY-7367) (#4782)

Co-authored-by: Suchintan Singh <suchintan@skyvern.com>
This commit is contained in:
Suchintan
2026-02-18 09:35:25 -05:00
committed by GitHub
parent 1dff9ac921
commit 4db25ec04f
7 changed files with 554 additions and 276 deletions

View File

@@ -4440,11 +4440,15 @@ class AgentDB(BaseAlchemyDB):
workflow_run_block.task_id = task_id
if failure_reason:
workflow_run_block.failure_reason = failure_reason
if loop_values:
# Use `is not None` instead of truthiness checks so that falsy
# values like current_index=0, empty loop_values=[], or
# current_value="" are correctly persisted. Without this,
# the first loop iteration (index 0) loses its metadata.
if loop_values is not None:
workflow_run_block.loop_values = loop_values
if current_value:
if current_value is not None:
workflow_run_block.current_value = current_value
if current_index:
if current_index is not None:
workflow_run_block.current_index = current_index
if recipients:
workflow_run_block.recipients = recipients