From 6025a33817e9def2fb92c3e901ed76e963ac5689 Mon Sep 17 00:00:00 2001 From: Shreya Shankar Date: Fri, 13 Dec 2024 21:24:16 -0800 Subject: [PATCH] fix: bug when ops are not visible --- website/src/app/api/utils.ts | 3 ++- website/src/components/PipelineGui.tsx | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/website/src/app/api/utils.ts b/website/src/app/api/utils.ts index fdd57419..a1f8c11c 100644 --- a/website/src/app/api/utils.ts +++ b/website/src/app/api/utils.ts @@ -104,7 +104,6 @@ export function generatePipelineConfig( : processSchemaItem(item.subType as SchemaItem); return `list[${subType}]`; } else if (item.type === "dict") { - console.log(item); if (!item.subType) { throw new Error( `Dict/Object type must specify its structure for field: ${item.key}` @@ -234,6 +233,8 @@ export function generatePipelineConfig( const yamlString = yaml.dump(pipelineConfig); + console.log(yamlString); + return { yamlString, inputPath, diff --git a/website/src/components/PipelineGui.tsx b/website/src/components/PipelineGui.tsx index 8333203f..4e702334 100644 --- a/website/src/components/PipelineGui.tsx +++ b/website/src/components/PipelineGui.tsx @@ -551,10 +551,13 @@ const PipelineGUI: React.FC = () => { const onRunAll = useCallback( async (clear_intermediate: boolean) => { - const lastOpIndex = operations.length - 1; - if (lastOpIndex < 0) return; + // Find the last visible operation + const lastVisibleOpIndex = operations.findLastIndex( + (op) => op.visibility !== false + ); + if (lastVisibleOpIndex < 0) return; - const lastOperation = operations[lastOpIndex]; + const lastOperation = operations[lastVisibleOpIndex]; setOptimizerProgress(null); setIsLoadingOutputs(true); setNumOpRun((prevNum) => {