Skip to content

fix(protocol-designer): allow moving labware on top of adapters #18541

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 4 commits into
base: chore_release-pd-8.5.0
Choose a base branch
from

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Jun 5, 2025

closes RQA-4247

Overview

This PR fixes a bug where you couldn't move a labware onto an adapter and also removes the checkbox for adding a TC lid to a labware on an adapter in the select labware modal

Test Plan and Hands on Testing

Upload the attached protocol and try to move the tough plate to the adapter on the temperature module and see that it moves correctly.

Also, if you try to add the 96-well aluminum block on a temperature module with a 96 well plate during deck setup, you shouldn't see the checkbox option to add the TC lid when the stacking capabilities FF is turned off.

untitled (100).json

Changelog

  • fix logic for showing stacking capabilities and for moving labware on to adapters

Risk assessment

low

@jerader jerader requested review from a team as code owners June 5, 2025 19:34
@jerader jerader requested review from TamarZanzouri, ncdiehl11 and koji and removed request for a team and TamarZanzouri June 5, 2025 19:34
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 12.82051% with 34 lines in your changes missing coverage. Please review.

Project coverage is 23.69%. Comparing base (e445014) to head (995457a).
Report is 33 commits behind head on chore_release-pd-8.5.0.

Files with missing lines Patch % Lines
.../components/organisms/SelectLabwareModal/index.tsx 10.00% 27 Missing ⚠️
...igner/src/top-selectors/labware-locations/index.ts 0.00% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                    Coverage Diff                     @@
##           chore_release-pd-8.5.0   #18541      +/-   ##
==========================================================
- Coverage                   23.91%   23.69%   -0.23%     
==========================================================
  Files                        3228     3228              
  Lines                      278220   278251      +31     
  Branches                    27384    27552     +168     
==========================================================
- Hits                        66530    65923     -607     
- Misses                     211663   212301     +638     
  Partials                       27       27              
Flag Coverage Δ
protocol-designer 19.34% <12.82%> (-0.17%) ⬇️

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

Files with missing lines Coverage Δ
...ents/src/molecules/CustomizeExpandButton/index.tsx 65.42% <100.00%> (+0.32%) ⬆️
...igner/src/top-selectors/labware-locations/index.ts 14.74% <0.00%> (-5.52%) ⬇️
.../components/organisms/SelectLabwareModal/index.tsx 65.33% <10.00%> (-2.79%) ⬇️

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

@@ -223,7 +233,7 @@ export const getUnoccupiedLabwareLocationOptions: Selector<
const unoccupiedModuleOptions = Object.entries(modules).reduce<Option[]>(
(acc, [modId, modOnDeck]) => {
const moduleHasLabware = Object.entries(labware).some(
([_, lwOnDeck]) => lwOnDeck.stack[0] === modId
([_, lwOnDeck]) => lwOnDeck.stack[lwOnDeck.stack.length - 2] === modId
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is this logic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the module id in the stack will be the 2nd item in the stack array from the end of the array. So if the stack includes the module id, then we know the module has labware.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I see. I worry slightly about hardcoding in that index as our stacking capabilities theoretically expand. For example— what if you have a lid on top of a labware on top of an adapter on top of a module?

While it might be overkill for now, I recommend a utility for like getModuleInStack that returns the module ID of a stack if one exists.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The module id will always be in the same index of the array though: ['labwareId', 'adapterId', 'moduleId', 'slotId'] But i agree, if the module is on an adapter some day, this would break. is it ok if i fix this in edge though for TC lid stuff?

@jerader jerader requested a review from ncdiehl11 June 10, 2025 13:18
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