Skip to content

Feature: Zarr Conversion - #858

Merged
BrianWhitneyAI merged 8 commits into
mainfrom
zarr-conversion-pipeline-params
Jul 7, 2026
Merged

Feature: Zarr Conversion#858
BrianWhitneyAI merged 8 commits into
mainfrom
zarr-conversion-pipeline-params

Conversation

@BrianWhitneyAI

@BrianWhitneyAI BrianWhitneyAI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds in zarr-conversion to the pipelines option. In order to accomodate some of the new params, we have to update the pipeline-param display and typing logic.

Try it out on https://staging.bff.allencell.org/ select a CZI or ND2, -> process files -> conversion ->submit

🤖 Generated with Claude Code

Support string and select (dropdown) pipeline parameters in addition to
numbers, and add the zarr-conversion pipeline mock data. Render the
appropriate control per parameter type, validate string params against an
optional regex pattern, and URL-encode file paths before submitting since
FSS curls them directly. Restore environment-based load balancer URL
selection (removing the temporary staging pin).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
validation: { min: 0 },
},
],
"zarr-conversion": [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mock data to be dropped when discovery is live

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an anticipated date for that?

@BrianWhitneyAI BrianWhitneyAI changed the title Add string & select parameter types for compute pipelines Feature: Zarr Conversion Jun 30, 2026
@BrianWhitneyAI
BrianWhitneyAI marked this pull request as ready for review July 2, 2026 17:13
selectedKey={
optionalSelectorKey ?? undefined
}
// null (not undefined) so the dropdown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit verbose of a comment IMO - the type is defined elsewhere for this variable so perhaps it would belong there

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<BaseComboBox
label=""
selectedKey={
value !== null && value !== undefined && value !== ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I feel like using isNil and isEmpty from lodash are handy for making things like this more readable - just an opinion though

Suggested change
value !== null && value !== undefined && value !== ""
(!isNil(value) && !isEmpty(value)) ? String(value) : null

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return (
<TextField
type="text"
value={value !== null && value !== undefined ? String(value) : ""}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here for isNil usage but (again) just an opinion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

className={styles.textField}
/>
);
case "number":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the default would also catch the file_paths type?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No file paths are already filtered out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think an explicit catch of file_paths here would be good to avoid relying on an upstream type guard

const body: Record<string, unknown> = { files: file_paths };
const files = Array.isArray(file_paths)
? file_paths.map((p) => PipelineService.encodeFilePath(p))
: file_paths;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do they not need to be encoded when not in an array?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const files = Array.isArray(file_paths)
? file_paths.map((p) => PipelineService.encodeFilePath(p))
: file_paths;
const body: Record<string, unknown> = { files };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the type narrow down from unknown? I assume the values that get added below must be of some constrained typing like string | number | boolean etc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved away from the unknown typing in 0d86855

validation: { min: 0 },
},
],
"zarr-conversion": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an anticipated date for that?

interface Props {
className?: string;
selectedKey?: string;
selectedKey?: string | null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should undefined be removed in favor of null?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null is the clear value so I think having both undefined and null here is ok/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also still need undefined because it's currently an optional param, so if it were removed ExistingAnnotationPathway and MetadataDetails would need to be refactored slightly

@BrianWhitneyAI

Copy link
Copy Markdown
Contributor Author

Is there an anticipated date for that?

3 of the 4 parts of it are out for review now

- Use lodash isNil/isEmpty in PipelineParameterInput (isEmpty only for
  select case, since it treats numbers as empty)
- Narrow encodeFilePath to string -> string and only encode string entries
- Trim verbose selectedKey comment in ComputePipelineModal

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@aswallace aswallace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on Sean's comments, otherwise lgtm

interface Props {
className?: string;
selectedKey?: string;
selectedKey?: string | null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also still need undefined because it's currently an optional param, so if it were removed ExistingAnnotationPathway and MetadataDetails would need to be refactored slightly

BrianWhitneyAI and others added 2 commits July 2, 2026 16:18
Form-state values only ever come from text/select inputs, so type them
as string. validateParam/onBlur take string | undefined to still flag
untouched required fields. Defaults are String()-ified on load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Hoist filePaths to its own string[] field on ComputeTaskRequest,
  removing the Array.isArray/typeof guards in submitComputeTask
- Type parameters as Record<string, string> (all form values are
  strings), collapsing the null/undefined guard in the submit loop
- Drop redundant `default !== undefined` checks (default is never undefined)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BrianWhitneyAI
BrianWhitneyAI merged commit a873e96 into main Jul 7, 2026
11 checks passed
@BrianWhitneyAI
BrianWhitneyAI deleted the zarr-conversion-pipeline-params branch July 7, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants