Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions new_ui/backend/api/routes/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ async def get_workflow_status(task_id: str):
"message": task.message,
"result": task.result,
"error": task.error,
"error_details": task.error_details,
"started_at": task.started_at.isoformat() if task.started_at else None,
"completed_at": task.completed_at.isoformat() if task.completed_at else None,
}
Expand Down Expand Up @@ -238,6 +239,7 @@ async def get_recent_tasks(limit: int = 10):
"message": task.message,
"result": task.result,
"error": task.error,
"error_details": task.error_details,
"started_at": task.started_at,
"completed_at": task.completed_at,
}
Expand Down
13 changes: 8 additions & 5 deletions new_ui/backend/api/websockets/workflow_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ async def workflow_websocket(websocket: WebSocket, task_id: str):
"type": "status",
"task_id": task_id,
"status": task.status,
"progress": task.progress,
"message": task.message,
"timestamp": datetime.utcnow().isoformat(),
}
)
"progress": task.progress,
"message": task.message,
"error": task.error,
"error_details": task.error_details,
"timestamp": datetime.utcnow().isoformat(),
}
)

# Send pending interaction if any (fixes race condition where interaction_required
# was broadcast before WebSocket connected)
Expand Down Expand Up @@ -149,6 +151,7 @@ async def workflow_websocket(websocket: WebSocket, task_id: str):
"type": "error",
"task_id": task_id,
"error": task.error,
"error_details": task.error_details,
"timestamp": datetime.utcnow().isoformat(),
}
)
Expand Down
1 change: 1 addition & 0 deletions new_ui/backend/models/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class WorkflowStatusResponse(BaseModel):
message: str = ""
result: Optional[Dict[str, Any]] = None
error: Optional[str] = None
error_details: Optional[Dict[str, Any]] = None
started_at: Optional[datetime] = None
completed_at: Optional[datetime] = None

Expand Down
Loading