Skip to content

Conversation

@ddcc4
Copy link
Collaborator

@ddcc4 ddcc4 commented Oct 23, 2025

Overview

Part 6 to fix tiprack definition lookups in PD.

So I had started props-drilling to pass InvariantContext.labwareEntities down to all the functions that need to look up the labware definition for a HydratedFormData.tipRack URI. (Recall that the problem is that we're trying to look up the tiprack definition in PipetteEntity.tiprackLabwareDef, but the PipetteEntity won't have the tiprack definition if the user removed the tiprack from the pipette).

Then I realized that it'd be much easier to just put the tiprack definition directly into HydratedFormData when we're hydrating the form. Then anyone who's using the HydratedFormData would have the tiprack definition without needing to do any extra work.

There are good precedents for this: we already put the Entities for .aspirate_labware, .dispense_labware, and .pipette into HydratedFormData. So it's reasonable to put the Entity for .tipRack into the HydratedFormData as well.

So this PR changes HydratedMoveLiquidFormData/HydratedMixFormData.tipRack from a URI string to a LabwareEntity.

To keep this PR small and manageable, I just left TODOs for the other functions that we can simplify later now that the tiprack definition is available in HydratedFormData.

Test Plan and Hands on Testing

Updated unit tests.
Ran tests locally.
Will run tests in CI.

Risk assessment

Medium.

@ddcc4 ddcc4 requested a review from jerader October 23, 2025 23:14
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 69.23077% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.00%. Comparing base (4415bdf) to head (daade2f).

Files with missing lines Patch % Lines
protocol-designer/src/steplist/fieldLevel/index.ts 36.36% 7 Missing ⚠️
protocol-designer/src/steplist/formLevel/errors.ts 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##           chore_release-pd-8.6.1   #19904   +/-   ##
=======================================================
  Coverage                   58.00%   58.00%           
=======================================================
  Files                        3413     3413           
  Lines                      283910   283920   +10     
  Branches                    39369    39365    -4     
=======================================================
+ Hits                       164671   164679    +8     
- Misses                     118966   118968    +2     
  Partials                      273      273           
Flag Coverage Δ
protocol-designer 18.84% <69.23%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
protocol-designer/src/form-types.ts 71.42% <ø> (ø)
...steplist/formLevel/stepFormToArgs/mixFormToArgs.ts 99.02% <100.00%> (ø)
...t/formLevel/stepFormToArgs/moveLiquidFormToArgs.ts 75.80% <100.00%> (+0.97%) ⬆️
...ormLevel/stepFormToArgs/test/mixFormToArgs.test.ts 90.86% <100.00%> (ø)
...l/stepFormToArgs/test/moveLiquidFormToArgs.test.ts 90.66% <100.00%> (ø)
...rmLevel/stepFormToArgs/test/stepFormToArgs.test.ts 97.04% <100.00%> (ø)
...igner/src/steplist/formLevel/test/warnings.test.ts 91.16% <100.00%> (+0.07%) ⬆️
...tocol-designer/src/steplist/formLevel/warnings.tsx 68.88% <100.00%> (ø)
protocol-designer/src/steplist/formLevel/errors.ts 43.44% <50.00%> (ø)
protocol-designer/src/steplist/fieldLevel/index.ts 49.90% <36.36%> (-0.28%) ⬇️
🚀 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.

@ddcc4 ddcc4 marked this pull request as draft October 24, 2025 03:18
@ddcc4
Copy link
Collaborator Author

ddcc4 commented Oct 24, 2025

Don't look at this. It's not quite correct :(

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.

2 participants