Skip to content

feat(protocol-designer, shared-data): add liquid classes form warnings to transfer and mix form #17765

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

Open
wants to merge 20 commits into
base: edge
Choose a base branch
from

Conversation

syao1226
Copy link
Collaborator

@syao1226 syao1226 commented Mar 14, 2025

re AUTH-1530

Overview

This PR adds new form warnings to display any incompatible pipette, tip rack, transfer volume, and/or pipette path with liquid classes in the PD transfer step. It also disables incompatible liquid class options.

The design specifies replacing <pipette/labware> with the source labware, destination labware, or pipette. Currently, I'm replacing labware with tip rack because we don’t have information about incompatible source and destination labware.

Design: https://www.figma.com/design/RcHb9UdygVtyXcvDcDmnTP/Feature%3A-Liquid-Classes?node-id=1833-28759&t=6C60uZBriQj1doAs-4

Test Plan and Hands on Testing

  1. Create or import a protocol with a pipette and tip rack that are incompatible with one or more liquid classes
  2. Add a transfer step
  3. Lower the transfer volume to be less than or equals to 10 µL
  4. Select a pipette path that's incompatible with one or more liquid classes (currently all paths are compatible)
  5. Verify that the warning messages align with the design and that the incompatible liquid class options are disabled when proceeding to the next page

Changelog

-Updated the LiquidClassesStepTools to handle disabling incompatible liquid classes options
-Updated the warnings file to add lowVolumeTransfer, incompatiblePipettePath, incompatibleAllPipetteLabware, and incompatibleSomePipetteLabware warnings.
-Used getFlexNameConversion to get pipette load names
-Added getDisableLiquidClasses to determines which liquid classes should be disabled based on the pipette model, tip rack, volume, and dispense path
-Added getIncompatibleLiquidClasses returns a list of liquid class names that are incompatible based on a given predicate
-Added tests

Review requests

Risk assessment

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 82.99595% with 42 lines in your changes missing coverage. Please review.

Project coverage is 57.96%. Comparing base (26345e1) to head (1e5ac61).
Report is 7 commits behind head on edge.

Files with missing lines Patch % Lines
...tocol-designer/src/steplist/formLevel/warnings.tsx 77.52% 20 Missing ⚠️
shared-data/js/helpers/index.ts 69.64% 17 Missing ⚠️
...igner/src/steplist/formLevel/test/warnings.test.ts 95.52% 3 Missing ⚠️
...epTools/MoveLiquidTools/LiquidClassesStepTools.tsx 92.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #17765      +/-   ##
==========================================
- Coverage   61.91%   57.96%   -3.95%     
==========================================
  Files        2949     3091     +142     
  Lines      227527   244563   +17036     
  Branches    19185    22771    +3586     
==========================================
+ Hits       140882   141773     +891     
- Misses      86473   102599   +16126     
- Partials      172      191      +19     
Flag Coverage Δ
components ?
protocol-designer 18.86% <90.30%> (+0.08%) ⬆️
step-generation 4.43% <1.32%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
...rotocolSteps/StepForm/StepTools/MixTools/index.tsx 19.75% <100.00%> (-77.17%) ⬇️
...Steps/StepForm/StepTools/MoveLiquidTools/index.tsx 76.92% <100.00%> (-7.86%) ⬇️
protocol-designer/src/steplist/formLevel/index.ts 48.38% <100.00%> (-7.17%) ⬇️
shared-data/js/constants.ts 100.00% <100.00%> (ø)
...epTools/MoveLiquidTools/LiquidClassesStepTools.tsx 88.54% <92.00%> (-11.46%) ⬇️
...igner/src/steplist/formLevel/test/warnings.test.ts 99.17% <95.52%> (-0.83%) ⬇️
shared-data/js/helpers/index.ts 56.49% <69.64%> (-0.43%) ⬇️
...tocol-designer/src/steplist/formLevel/warnings.tsx 80.14% <77.52%> (-15.62%) ⬇️

... and 549 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.

@syao1226 syao1226 requested review from ncdiehl11 and koji March 19, 2025 15:01
@syao1226 syao1226 marked this pull request as ready for review March 19, 2025 15:01
@syao1226 syao1226 requested review from a team as code owners March 19, 2025 15:01
@syao1226 syao1226 changed the title feat(protocol-designer): add liquid classes form warnings feat(protocol-designer, shared-data): add liquid classes form warnings Mar 19, 2025
@syao1226 syao1226 requested review from koji and ncdiehl11 March 21, 2025 14:50
@ncdiehl11
Copy link
Collaborator

At first glance, I notice I am getting a Disposal volume is below recommended minimum (5 uL) error for single transfers! I think we need some logic to only show this error if the path is multi-dispense

Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

looks good! left a few nits

@syao1226 syao1226 changed the title feat(protocol-designer, shared-data): add liquid classes form warnings feat(protocol-designer, shared-data): add liquid classes form warnings to transfer form Mar 31, 2025
@syao1226 syao1226 changed the title feat(protocol-designer, shared-data): add liquid classes form warnings to transfer form feat(protocol-designer, shared-data): add liquid classes form warnings to transfer and mix form Mar 31, 2025
@syao1226
Copy link
Collaborator Author

@ncdiehl11 Hey Nick, I updated warnings.tsx and other relevant files to include the same liquid classes form warnings in the Mix step form, except for the path warning. No major changes.

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.

4 participants