Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(workflows): omit diagnostics from failed snapshots
JPPhotof4b60136d917
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.browser.test.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.browser.test.tsxindex 4fdf956083..393dd2d8b3 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.browser.test.tsx@@ -519,7 +519,7 @@ describe('InvocationFlowNode output preview', () => {expect(exportedText).toContain('N’importe quelle sortie');});- it('includes a failed node reason in the export even though its outcome icon is hidden', async () => {+ it('marks a failed node in the export without including its backend diagnostic', async () => {const execution = createExecutionPort(callNodeId);execution.set({error: 'Child node failed',@@ -537,6 +537,7 @@ describe('InvocationFlowNode output preview', () => {});await render(adapter, 1, true, callFlowNodes);+ await page.screenshot({ path: '../../../../../artifacts/workflow-export-failed-label.png' });const flowElement = host.querySelector<HTMLElement>('.react-flow')!;await exportWorkflowAsPng({bounds: { x: 20, y: 20, width: 300, height: 260 },@@ -548,7 +549,9 @@ describe('InvocationFlowNode output preview', () => {expect(capturedClone?.querySelector('[data-node-status-indicator="true"]')?.getAttribute('style')).toContain('display: none');- expect(capturedClone?.textContent).toContain('Failed: Child workflow error: Child node failed');+ expect(capturedClone?.textContent).toContain('Failed');+ expect(capturedClone?.textContent).not.toContain('Child node failed');+ expect(capturedClone?.textContent).not.toContain('Child workflow error');});it('keeps the visible collapsed node unchanged while an expanded offscreen snapshot is rasterizing', async () => {diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsxindex 2df670f8ed..4b8a1a899d 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/editor/InvocationFlowNode.tsx@@ -391,11 +391,11 @@ const NodeUpdateIcon = ({};const NodeInfoTooltipContent = ({- executionError = null,+ isFailed = false,node,template,}: {- executionError?: string | null;+ isFailed?: boolean;node: WorkflowInvocationNode;template: InvocationNodeTemplateView['template'];}) => {@@ -413,12 +413,7 @@ const NodeInfoTooltipContent = ({{updateStatusText ? <Text color="fg.warning">{updateStatusText}</Text> : null}<Text color="fg.subtle">{t('nodes.nodeClassification', { classification: template.classification })}</Text><Text color="fg.subtle">{t('nodes.nodeCategory', { category: template.category })}</Text>- {executionError !== null ? (- <Text color="fg.error">- {t('nodes.executionFailed')}- {executionError ? `: ${executionError}` : null}- </Text>- ) : null}+ {isFailed ? <Text color="fg.error">{t('nodes.executionFailed')}</Text> : null}{template.description ? <Text fontStyle="italic">{template.description}</Text> : null}{node.data.notes ? <Text>{node.data.notes}</Text> : null}</Stack>@@ -1057,13 +1052,7 @@ const ExpandedInvocationNode = ({ data, selected }: NodeProps<InvocationFlowNode</Flex>{isWorkflowImageExport ? (<Box data-workflow-export-content="true" maxW="full" px={WORKFLOW_NODE_DENSITY.rowPaddingX} py="1">- <NodeInfoTooltipContent- executionError={- execution?.status === 'failed' ? (getNodeExecutionError(node, execution.error, t) ?? '') : null- }- node={node}- template={template}- />+ <NodeInfoTooltipContent isFailed={execution?.status === 'failed'} node={node} template={template} /></Box>) : null}<NodeProgressStrip execution={execution} />