Make the frontend resilient to old workflow run output formats (#10522)
- Create zod schemas for everything related to a workflow run - Update the types to be inferred from the zod schemas - Improper workflow run outputs will render a blank screen; we could show an error in the future https://github.com/user-attachments/assets/8e666c3e-82b0-4ab5-8804-2f70130ea257
This commit is contained in:
committed by
GitHub
parent
5a39903d42
commit
8bd9bc9d31
@ -1,4 +1,4 @@
|
||||
import { useWorkflowRun } from '@/workflow/hooks/useWorkflowRun';
|
||||
import { useWorkflowRunUnsafe } from '@/workflow/hooks/useWorkflowRunUnsafe';
|
||||
import styled from '@emotion/styled';
|
||||
import { isDefined } from 'twenty-shared';
|
||||
import { CodeEditor } from 'twenty-ui';
|
||||
@ -12,7 +12,8 @@ export const WorkflowRunOutputVisualizer = ({
|
||||
}: {
|
||||
workflowRunId: string;
|
||||
}) => {
|
||||
const workflowRun = useWorkflowRun({ workflowRunId });
|
||||
const workflowRun = useWorkflowRunUnsafe({ workflowRunId });
|
||||
|
||||
if (!isDefined(workflowRun)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user