Skip to content
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

fix(app): quick transfer uses C2 for aspirate and dispense if labware is the same #16087

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

smb2268
Copy link
Contributor

@smb2268 smb2268 commented Aug 21, 2024

fix RQA-3073

Overview

If you choose to load two of the same labware in C2 and D2 for quick transfer, both labware were getting loaded in the protocol but the labware in C2 was being used for both aspiration and dispense. This is because of the way I was grabbing the labware entities in generateQuickTransferArgs. This PR fixes that discrepancy by grabbing the entity by labware location as opposed to labwareUri which will match for identical labware

Test Plan and Hands on Testing

Go through QT and select two of the same labware for source and destination (do not choose the "source labware" option for destination)
Create a transfer, and examine the file logged in dev tools. The ID used for the loadLabware command for slot D2 will now match the ID used for the dispense command

Changelog

  1. Corrected copy for "source labware" option on the destination labware selection screen
  2. Changed the way we get the sourceLabwareEntity and destLabwareEntity in generateQuickTransferArgs to first grab the labware id that corresponds to the correct location from the robot state

Review requests

Look over code, I've tested this out

Risk assessment

Low

@smb2268 smb2268 requested review from vegano1 and brenthagen August 21, 2024 20:17
@smb2268 smb2268 self-assigned this Aug 21, 2024
@smb2268 smb2268 requested a review from a team as a code owner August 21, 2024 20:17
@smb2268 smb2268 force-pushed the app_qt-two-same-labware branch from 49d22ec to 080c7bb Compare August 21, 2024 21:02
@smb2268 smb2268 requested a review from jerader August 21, 2024 21:13
Comment on lines 312 to 313
const destinationLabwareId = Object.keys(robotState.labware).find(
key => robotState.labware[key].slot === 'D2'
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit

Suggested change
const destinationLabwareId = Object.keys(robotState.labware).find(
key => robotState.labware[key].slot === 'D2'
const destinationLabwareId = Object.keys(robotState.labware).find(
labwareId => robotState.labware[labwareId].slot === 'D2'

entity.labwareDefURI === getLabwareDefURI(quickTransferState.source)

const sourceLabwareId = Object.keys(robotState.labware).find(
key => robotState.labware[key].slot === 'C2'
Copy link
Collaborator

Choose a reason for hiding this comment

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

same 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.

logic makes sense to me, left some comments to make it more clear for people who don't immediately know the shape of robotState.

@smb2268 smb2268 merged commit 3f01d7c into chore_release-8.0.0 Aug 22, 2024
20 checks passed
@smb2268 smb2268 deleted the app_qt-two-same-labware branch August 22, 2024 14:46
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