Skip to content

feat(protocol-designer): implement OT-2 logic for liquid classes #18657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2025

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Jun 17, 2025

Overview

This PR wires up OT-2 default values when creating a new moveLiquid step, including aspirate/dispense submerge/retract speeds and default disposal volumes for multiDispense path transfers. I also refactor the logic for stepping through the moveLiquid step form in attempt to share logic as much as possible for Flex and OT-2 protocol moveLiquid step creation. Lastly, I wire up aspirate/dispense submerge/retract speeds required, as well as remove liquid class compatibility warnings for OT-2.

Test Plan and Hands on Testing

  • import an OT-2 protocol with a transfer step, open, and verify that submerge/aspirate speeds are populated
  • create a new transfer step, and verify that submerge/retract speeds are populated
  • change any advanced settings, go back, continue, and verify that your updated advanced settings are not reset to default
  • verify that there is no warning for incompatible liquid class
  • remove a submerge or retract speed, try to save, and verify that error populates

Changelog

  • return proper fields for getNoLiquidClassValuesMoveLiquid dependent on robot type
  • create and wire up aspirate/dispense retract/submerge speeds
  • remove incompatible liquid class warning for OT-2
  • update logic for tabbing through moveLiquid form

Review requests

see test plan

Risk assessment

low

This PR wires up OT-2 default values when creating a new moveLiquid step, including aspirate/dispense submerge/retract speeds and default disposal volumes for multiDispense path transfers. I also refactor the logic for stepping through the moveLiquid step form in attempt to share logic as much as possible for Flex and OT-2 protocol moveLiquid step creation. Lastly, I wire up aspirate/dispense submerge/retract speeds required, as well as remove liquid class compatibility warnings for OT-2.
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

Attention: Patch coverage is 30.82192% with 101 lines in your changes missing coverage. Please review.

Project coverage is 25.96%. Comparing base (cb2cae8) to head (1a712eb).
Report is 7 commits behind head on chore_release-pd-8.5.0.

Files with missing lines Patch % Lines
protocol-designer/src/steplist/formLevel/errors.ts 50.68% 36 Missing ⚠️
...esigner/ProtocolSteps/StepForm/StepFormToolbox.tsx 0.00% 30 Missing ⚠️
...r/src/steplist/formLevel/handleFormChange/utils.ts 0.00% 29 Missing ⚠️
...StepForm/StepTools/MixTools/SecondStepMixTools.tsx 0.00% 2 Missing ⚠️
...ols/MoveLiquidTools/SecondStepsMoveLiquidTools.tsx 0.00% 2 Missing ⚠️
...tocol-designer/src/steplist/formLevel/warnings.tsx 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                    Coverage Diff                     @@
##           chore_release-pd-8.5.0   #18657      +/-   ##
==========================================================
+ Coverage                   25.89%   25.96%   +0.07%     
==========================================================
  Files                        3256     3256              
  Lines                      281299   281661     +362     
  Branches                    28540    28726     +186     
==========================================================
+ Hits                        72833    73144     +311     
- Misses                     208439   208490      +51     
  Partials                       27       27              
Flag Coverage Δ
protocol-designer 19.26% <30.82%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...Steps/StepForm/StepTools/MoveLiquidTools/index.tsx 66.66% <100.00%> (-0.43%) ⬇️
protocol-designer/src/steplist/formLevel/index.ts 48.46% <100.00%> (+0.71%) ⬆️
...StepForm/StepTools/MixTools/SecondStepMixTools.tsx 0.76% <0.00%> (-0.01%) ⬇️
...ols/MoveLiquidTools/SecondStepsMoveLiquidTools.tsx 0.52% <0.00%> (-0.01%) ⬇️
...tocol-designer/src/steplist/formLevel/warnings.tsx 82.22% <50.00%> (-0.46%) ⬇️
...r/src/steplist/formLevel/handleFormChange/utils.ts 16.11% <0.00%> (-0.38%) ⬇️
...esigner/ProtocolSteps/StepForm/StepFormToolbox.tsx 4.43% <0.00%> (-0.09%) ⬇️
protocol-designer/src/steplist/formLevel/errors.ts 42.38% <50.68%> (+0.42%) ⬆️

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ncdiehl11 ncdiehl11 self-assigned this Jun 17, 2025
@ncdiehl11 ncdiehl11 requested review from koji and jerader June 17, 2025 18:42
@ncdiehl11 ncdiehl11 marked this pull request as ready for review June 17, 2025 18:42
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner June 17, 2025 18:42
@ncdiehl11 ncdiehl11 removed the request for review from a team June 17, 2025 18:42
@@ -377,21 +376,33 @@ export function StepFormToolbox(props: StepFormToolboxProps): JSX.Element {
}
}

// For consistency and correct error rendering, we actually want the OT-2 mix/moveLiquid steps to contain 3 pages,
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmmm i don't love this, but its okay for now. maybe we can revisit when we do the error refactoring post-8.5

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree, but the alternative of special-casing the OT-2 move liquid form all over the place was even uglier sadly (I tried it)

@@ -165,22 +165,22 @@
"aspirate_mix_times": null,
"aspirate_mix_volume": null,
"aspirate_mmFromBottom": null,
"aspirate_position_reference": null,
"aspirate_position_reference": "well-bottom",
Copy link
Collaborator

@jerader jerader Jun 17, 2025

Choose a reason for hiding this comment

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

so the reason why all these values changed is because the ot-2 has different default fields?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this corrects a previous error. the position references should be non-null

if (
// for OT-2, call continue logic after step 1 (pipette, tiprack, volume, etc.) rather than step 2 (liquid class selection)
toolboxStep === (robotType === FLEX_ROBOT_TYPE ? 1 : 0) &&
numStepFormPages > 2
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe const LIQUID_CLASS_SELECTION_STEP ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry, what do you mean here?

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

lgtm!

@ncdiehl11 ncdiehl11 merged commit b19784c into chore_release-pd-8.5.0 Jun 17, 2025
30 of 34 checks passed
@ncdiehl11 ncdiehl11 deleted the pd_liquid-class-ot2 branch June 17, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants