From df91f0b44f9ab4cc6f91f4495d13d2de9dee5093 Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Fri, 6 Mar 2026 15:14:40 +0000 Subject: [PATCH 1/3] Don't convert `"auto"` value to `null` --- .../workflows/sweepPipeline/SubmissionFormCOR.tsx | 6 ++---- frontend/src/contexts/LoaderContext.tsx | 11 +++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx b/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx index b7c3726..5896ad5 100644 --- a/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx +++ b/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx @@ -130,8 +130,7 @@ const SubmissionFormCOR = (props: { typeof updatedLoaderParams.rotation_angles === "string" || !updatedLoaderParams.rotation_angles || !updatedLoaderParams.rotation_angles.data_path || - updatedLoaderParams.rotation_angles.data_path.trim() === "" || - updatedLoaderParams.rotation_angles.data_path === "auto" + updatedLoaderParams.rotation_angles.data_path.trim() === "" ) { updatedLoaderParams.rotation_angles = { data_path: null }; } @@ -149,8 +148,7 @@ const SubmissionFormCOR = (props: { delete updatedLoaderParams.image_key_path; } else if ( !updatedLoaderParams.image_key_path || - updatedLoaderParams.image_key_path.trim() === "" || - updatedLoaderParams.image_key_path === "auto" + updatedLoaderParams.image_key_path.trim() === "" ) { updatedLoaderParams.image_key_path = null; } diff --git a/frontend/src/contexts/LoaderContext.tsx b/frontend/src/contexts/LoaderContext.tsx index 0d6975c..342d63c 100644 --- a/frontend/src/contexts/LoaderContext.tsx +++ b/frontend/src/contexts/LoaderContext.tsx @@ -165,17 +165,13 @@ export const LoaderProvider: React.FC<{ children: ReactNode }> = ({ // Add this function to validate the loader context const isContextValid = (): boolean => { - // Replace 'auto' with null for validation const hasDataPath = - parameters.data_path !== null && - parameters.data_path.trim() !== "" && - parameters.data_path !== "auto"; + parameters.data_path !== null && parameters.data_path.trim() !== ""; const hasRotationAnglesPath = typeof parameters.rotation_angles === "object" && parameters.rotation_angles?.data_path && - parameters.rotation_angles.data_path.trim() !== "" && - parameters.rotation_angles.data_path !== "auto"; + parameters.rotation_angles.data_path.trim() !== ""; const hasUserDefinedAngles = typeof parameters.rotation_angles === "object" && @@ -189,8 +185,7 @@ export const LoaderProvider: React.FC<{ children: ReactNode }> = ({ const hasImageKeyPath = parameters.image_key_path !== undefined && parameters.image_key_path !== null && - parameters.image_key_path.trim() !== "" && - parameters.image_key_path !== "auto"; + parameters.image_key_path.trim() !== ""; const hasDarks = parameters.darks !== undefined && From 55a9128cf7ef106cf6279c0256143a1aa7dba63e Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Fri, 6 Mar 2026 16:43:03 +0000 Subject: [PATCH 2/3] Remove incorrect warning that empty fields will have default values passed The warning implies that if any input fields are empty, then job submission will still work via using default values wherever a value was omitted. However, job submission doesn't work in this case; instead, validation fails and error messages are shown which inform which parameter(s) failed validation. Default values being inserted may be added in the future so this warning box could be brought back. However, in the app's current state, this warning is confusing due to it saying something will happen when it won't, so it is being removed for now. --- .../workflows/sweepPipeline/SubmissionFormCOR.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx b/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx index 5896ad5..1e40170 100644 --- a/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx +++ b/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx @@ -285,13 +285,6 @@ const SubmissionFormCOR = (props: { /> )} - {!isContextValid() && ( - - Some Loader fields are empty. They will be auto-filled with default - values during submission. - - )} - Parameter Sweep Configuration From 59f270244c409f4bd44b4f6c165e44a19740e80b Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Fri, 6 Mar 2026 16:44:26 +0000 Subject: [PATCH 3/3] Clear validation errors from previous submission attempt --- .../components/workflows/sweepPipeline/SubmissionFormCOR.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx b/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx index 1e40170..ac516ae 100644 --- a/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx +++ b/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx @@ -218,6 +218,10 @@ const SubmissionFormCOR = (props: { return; // Stop submission } + if (errorMessages.length > 0) { + setErrorMessages([]); + } + // Build final submission payload (config as string) const finalParams = { ...validationObject,