diff --git a/api/src/opentrons/protocol_engine/state/commands.py b/api/src/opentrons/protocol_engine/state/commands.py index 5dc33fbd85d..bb14d4ad33d 100644 --- a/api/src/opentrons/protocol_engine/state/commands.py +++ b/api/src/opentrons/protocol_engine/state/commands.py @@ -5,7 +5,7 @@ import enum from dataclasses import dataclass from datetime import datetime -from typing import Dict, List, Optional, Union +from typing import Dict, List, Optional, Union, Tuple from typing_extensions import assert_never from opentrons_shared_data.errors import EnumeratedError, ErrorCodes, PythonException @@ -21,6 +21,12 @@ from opentrons.protocol_engine.commands.unsafe.unsafe_ungrip_labware import ( UnsafeUngripLabwareCommandType, ) +from opentrons.protocol_engine.commands.unsafe.unsafe_stacker_close_latch import ( + UnsafeFlexStackerCloseLatchCommandType, +) +from opentrons.protocol_engine.commands.unsafe.unsafe_stacker_open_latch import ( + UnsafeFlexStackerOpenLatchCommandType, +) from opentrons.protocol_engine.error_recovery_policy import ( ErrorRecoveryPolicy, ErrorRecoveryType, @@ -1137,8 +1143,16 @@ def _may_run_with_door_open( # is probably a mistake in the caller's logic. assert fixit_command.intent == CommandIntent.FIXIT - # This type annotation is to make sure the string constant stays in sync and isn't typo'd. - required_command_type: UnsafeUngripLabwareCommandType = "unsafe/ungripLabware" + # These type annotations are to make sure the string constants stay in sync and aren't typo'd. + allowed_command_types: Tuple[ + UnsafeUngripLabwareCommandType, + UnsafeFlexStackerCloseLatchCommandType, + UnsafeFlexStackerOpenLatchCommandType, + ] = ( + "unsafe/ungripLabware", + "unsafe/flexStacker/closeLatch", + "unsafe/flexStacker/openLatch", + ) # todo(mm, 2024-10-04): Instead of allowlisting command types, maybe we should # add a `mayRunWithDoorOpen: bool` field to command requests. - return fixit_command.commandType == required_command_type + return fixit_command.commandType in allowed_command_types diff --git a/app/src/atoms/SoftwareKeyboard/index.css b/app/src/atoms/SoftwareKeyboard/index.css index ffd9be42427..f96b419916a 100644 --- a/app/src/atoms/SoftwareKeyboard/index.css +++ b/app/src/atoms/SoftwareKeyboard/index.css @@ -7,8 +7,14 @@ padding: 5px; border-radius: 5px; background-color: #ececec; - font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, - Helvetica, Arial, Lucida Grande, sans-serif; + font-family: + HelveticaNeue-Light, + Helvetica Neue Light, + Helvetica Neue, + Helvetica, + Arial, + Lucida Grande, + sans-serif; touch-action: manipulation; -webkit-user-select: none; -moz-user-select: none; diff --git a/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx b/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx index d025aa98bdd..f7a80f4e8b0 100644 --- a/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx @@ -322,7 +322,7 @@ export function ErrorRecoveryContent(props: RecoveryContentProps): JSX.Element { case RECOVERY_MAP.ROBOT_PICKING_UP_TIPS.ROUTE: case RECOVERY_MAP.ROBOT_SKIPPING_STEP.ROUTE: case RECOVERY_MAP.ROBOT_RELEASING_LABWARE.ROUTE: - case RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE: + case RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE: return buildRecoveryInProgress() case RECOVERY_MAP.ROBOT_DOOR_OPEN.ROUTE: return buildManuallyRouteToDoorOpen() diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx index 28f538ec634..5b2df1fd1d6 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx @@ -64,7 +64,7 @@ export function RecoveryDoorOpen({ case RECOVERY_MAP.STACKER_STALLED_SKIP.ROUTE: case RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.ROUTE: case RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.ROUTE: - case RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE: + case RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE: return t('stacker_door_open_robot_home') default: return t('close_the_robot_door') @@ -80,7 +80,7 @@ export function RecoveryDoorOpen({ case RECOVERY_MAP.STACKER_STALLED_SKIP.ROUTE: case RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.ROUTE: case RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.ROUTE: - case RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE: + case RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE: return t('close_robot_and_stacker_door') default: return t('robot_door_is_open') @@ -96,7 +96,7 @@ export function RecoveryDoorOpen({ case RECOVERY_MAP.STACKER_STALLED_SKIP.ROUTE: case RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.ROUTE: case RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.ROUTE: - case RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE: + case RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE: return t('continue') default: return t('resume') diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx index cfd2f51fa47..ced1e3fef1a 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx @@ -32,7 +32,7 @@ export function RecoveryInProgress({ ROBOT_PICKING_UP_TIPS, ROBOT_SKIPPING_STEP, ROBOT_RELEASING_LABWARE, - ROBOT_RELEASING_LABWARE_LATCH, + STACKER_RELEASING_LABWARE_LATCH, } = RECOVERY_MAP const { t } = useTranslation('error_recovery') const { route } = recoveryMap @@ -68,7 +68,7 @@ export function RecoveryInProgress({ return t('gripper_releasing_labware') } } - case ROBOT_RELEASING_LABWARE_LATCH.ROUTE: { + case STACKER_RELEASING_LABWARE_LATCH.ROUTE: { if (releaseCountdown > 0) { return t('latch_will_release_in_s', { seconds: releaseCountdown, @@ -189,7 +189,7 @@ export function useReleaseLabware({ let intervalId: NodeJS.Timeout | null = null switch (recoveryMap.route) { case RECOVERY_MAP.ROBOT_RELEASING_LABWARE.ROUTE: - case RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE: + case RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE: intervalId = setInterval(() => { setCountdown(prevCountdown => { const updatedCountdown = prevCountdown - 1 @@ -200,21 +200,12 @@ export function useReleaseLabware({ } if ( recoveryMap.route === - RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE + RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE ) { void releaseLabwareLatch().then(() => { - if (isDoorOpen) { - return handleMotionRouting(false).then(() => { - proceedToDoorStep() - }) - } - - return handleMotionRouting(true) - .then(() => homeExceptPlungers()) - .then(() => handleMotionRouting(false)) - .then(() => { - proceedToValidNextStep() - }) + return handleMotionRouting(false).then(() => { + proceedToValidNextStep() + }) }) } else { void releaseGripperJaws().then(() => { diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx index 9cd1cf0fa1a..37c8061652d 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx @@ -33,6 +33,7 @@ import { BANNER_TEXT_CONTAINER_STYLE, BANNER_TEXT_CONTENT_STYLE, RECOVERY_MAP, + STACKER_ERROR_KINDS, } from './constants' import { useErrorName } from './hooks' import { RecoveryInterventionModal, StepInfo } from './shared' @@ -94,6 +95,8 @@ export function RecoverySplash(props: RecoverySplashProps): JSX.Element | null { const { proceedToRouteAndStep, handleMotionRouting } = routeUpdateActions const { reportErrorEvent } = analytics + const isStackerError = STACKER_ERROR_KINDS.includes(errorKind) + const buildTitleHeadingDesktop = (): JSX.Element => { return ( @@ -148,8 +151,16 @@ export function RecoverySplash(props: RecoverySplashProps): JSX.Element | null { ) }) .then(() => handleMotionRouting(true)) - .then(() => recoveryCommands.homePipetteZAxes()) - .finally(() => handleMotionRouting(false)) + .then(() => { + if (isStackerError) { + return recoveryCommands.homeExceptPlungers() + } else { + return recoveryCommands.homePipetteZAxes() + } + }) + .finally(() => { + void handleMotionRouting(false) + }) } handleConditionalClick(onClick) } diff --git a/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryDoorOpen.test.tsx b/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryDoorOpen.test.tsx index 0b74746b026..9e1a01aeba2 100644 --- a/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryDoorOpen.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryDoorOpen.test.tsx @@ -76,7 +76,7 @@ describe('RecoveryDoorOpen', () => { RECOVERY_MAP.STACKER_STALLED_SKIP.ROUTE, RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.ROUTE, RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.ROUTE, - RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE, + RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE, ] // Routes that should return the door open text. diff --git a/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryInProgress.test.tsx b/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryInProgress.test.tsx index e5f7793511a..7257303561a 100644 --- a/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryInProgress.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/__tests__/RecoveryInProgress.test.tsx @@ -29,7 +29,7 @@ describe('RecoveryInProgress', () => { ROBOT_PICKING_UP_TIPS, ROBOT_SKIPPING_STEP, ROBOT_RELEASING_LABWARE, - ROBOT_RELEASING_LABWARE_LATCH, + STACKER_RELEASING_LABWARE_LATCH, } = RECOVERY_MAP let props: ComponentProps @@ -137,12 +137,12 @@ describe('RecoveryInProgress', () => { screen.getByText('Gripper will release labware in 3 seconds') }) - it(`renders appropriate copy when the route is ${ROBOT_RELEASING_LABWARE_LATCH.ROUTE}`, () => { + it(`renders appropriate copy when the route is ${STACKER_RELEASING_LABWARE_LATCH.ROUTE}`, () => { props = { ...props, recoveryMap: { - route: ROBOT_RELEASING_LABWARE_LATCH.ROUTE, - step: ROBOT_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH, + route: STACKER_RELEASING_LABWARE_LATCH.ROUTE, + step: STACKER_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH, }, } render(props) @@ -181,8 +181,8 @@ describe('RecoveryInProgress', () => { props = { ...props, recoveryMap: { - route: ROBOT_RELEASING_LABWARE_LATCH.ROUTE, - step: ROBOT_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH, + route: STACKER_RELEASING_LABWARE_LATCH.ROUTE, + step: STACKER_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH, }, } render(props) @@ -266,12 +266,12 @@ describe('useReleaseLabware', () => { }, { recoveryOption: RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.ROUTE, - currentRoute: RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE, + currentRoute: RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE, nextStep: RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.STEPS.REENGAGE_LATCH, }, { recoveryOption: RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.ROUTE, - currentRoute: RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE, + currentRoute: RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE, nextStep: RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.STEPS.REENGAGE_LATCH, }, ])( @@ -312,11 +312,11 @@ describe('useReleaseLabware', () => { break default: expect(releaseGripperJaws).toHaveBeenCalledTimes(1) + expect(handleMotionRouting).toHaveBeenNthCalledWith(1, true) + expect(homeExceptPlungers).toHaveBeenCalledTimes(1) + expect(handleMotionRouting).toHaveBeenNthCalledWith(2, false) break } - expect(handleMotionRouting).toHaveBeenNthCalledWith(1, true) - expect(homeExceptPlungers).toHaveBeenCalledTimes(1) - expect(handleMotionRouting).toHaveBeenNthCalledWith(2, false) expect(proceedToRouteAndStep).toHaveBeenCalledWith( recoveryOption, nextStep diff --git a/app/src/organisms/ErrorRecoveryFlows/constants.ts b/app/src/organisms/ErrorRecoveryFlows/constants.ts index 2deafe45692..281a04f6ed2 100644 --- a/app/src/organisms/ErrorRecoveryFlows/constants.ts +++ b/app/src/organisms/ErrorRecoveryFlows/constants.ts @@ -118,8 +118,8 @@ export const RECOVERY_MAP = { RELEASING_LABWARE: 'releasing-labware', }, }, - ROBOT_RELEASING_LABWARE_LATCH: { - ROUTE: 'robot-releasing-labware-latch', + STACKER_RELEASING_LABWARE_LATCH: { + ROUTE: 'stacker-releasing-labware-latch', STEPS: { RELEASING_LABWARE_LATCH: 'releasing-labware-latch', }, @@ -327,7 +327,7 @@ const { ROBOT_CANCELING, ROBOT_PICKING_UP_TIPS, ROBOT_RELEASING_LABWARE, - ROBOT_RELEASING_LABWARE_LATCH, + STACKER_RELEASING_LABWARE_LATCH, ROBOT_RESUMING, ROBOT_IN_MOTION, ROBOT_RETRYING_STEP, @@ -381,8 +381,8 @@ export const STEP_ORDER: StepOrder = { [ROBOT_RELEASING_LABWARE.ROUTE]: [ ROBOT_RELEASING_LABWARE.STEPS.RELEASING_LABWARE, ], - [ROBOT_RELEASING_LABWARE_LATCH.ROUTE]: [ - ROBOT_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH, + [STACKER_RELEASING_LABWARE_LATCH.ROUTE]: [ + STACKER_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH, ], [ROBOT_RESUMING.ROUTE]: [ROBOT_RESUMING.STEPS.RESUMING], [ROBOT_RETRYING_STEP.ROUTE]: [ROBOT_RETRYING_STEP.STEPS.RETRYING], @@ -541,9 +541,9 @@ export const RECOVERY_MAP_METADATA: RecoveryRouteStepMetadata = { [ROBOT_RELEASING_LABWARE.ROUTE]: { [ROBOT_RELEASING_LABWARE.STEPS.RELEASING_LABWARE]: { allowDoorOpen: false }, }, - [ROBOT_RELEASING_LABWARE_LATCH.ROUTE]: { - [ROBOT_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH]: { - allowDoorOpen: false, + [STACKER_RELEASING_LABWARE_LATCH.ROUTE]: { + [STACKER_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH]: { + allowDoorOpen: true, }, }, [ROBOT_RESUMING.ROUTE]: { @@ -717,7 +717,7 @@ export const RECOVERY_MAP_METADATA: RecoveryRouteStepMetadata = { allowDoorOpen: true, }, [STACKER_SHUTTLE_EMPTY_RETRY.STEPS.PREPARE_TRACK_FOR_HOMING]: { - allowDoorOpen: true, + allowDoorOpen: false, }, [STACKER_SHUTTLE_EMPTY_RETRY.STEPS.CONFIRM_LABWARE_IN_LATCH]: { allowDoorOpen: true, @@ -809,9 +809,12 @@ export const GRIPPER_MOVE_STEPS: RouteStep[] = [ RECOVERY_MAP.MANUAL_REPLACE_AND_RETRY.STEPS.MANUAL_REPLACE, ] -export const REENGAGE_LATCH_ROUTES: RouteStep[] = [ +export const STACKER_LATCH_STEPS: RouteStep[] = [ + RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.STEPS.RELEASE_FROM_LATCH, RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_SKIP.STEPS.REENGAGE_LATCH, + RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.STEPS.RELEASE_FROM_LATCH, RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.STEPS.REENGAGE_LATCH, + STACKER_RELEASING_LABWARE_LATCH.STEPS.RELEASING_LABWARE_LATCH, ] export const INVALID = 'INVALID' as const diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/__tests__/useRecoveryToasts.test.tsx b/app/src/organisms/ErrorRecoveryFlows/hooks/__tests__/useRecoveryToasts.test.tsx index dea05f3e8af..c3952227aab 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/__tests__/useRecoveryToasts.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/__tests__/useRecoveryToasts.test.tsx @@ -338,7 +338,7 @@ describe('handleRecoveryOptionAction', () => { RECOVERY_MAP.ROBOT_DOOR_OPEN.ROUTE, RECOVERY_MAP.ROBOT_DOOR_OPEN_SPECIAL.ROUTE, RECOVERY_MAP.OPTION_SELECTION.ROUTE, - RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE, + RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE, ] it.each(NEXT_STEP_ROUTES)('should return nextStepReturnVal for %s', route => { diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts index 5872717dbcd..097d93f5bd0 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts @@ -6,6 +6,7 @@ import { GRIPPER_MOVE_STEPS, INVALID, RECOVERY_MAP, + STACKER_LATCH_STEPS, STEP_ORDER, } from '../constants' @@ -109,10 +110,14 @@ export function useRouteUpdateActions( ) // If the door is permitted on the current step, but the robot is about to move, we need to manually redirect users - // to the door modal unless the step is specifically a gripper jaw release step. + // to the door modal unless the step is specifically a gripper jaw/stacker latch release step. const checkDoorStatus = useCallback((): Promise => { return new Promise((resolve, reject) => { - if (isDoorOpen && !GRIPPER_MOVE_STEPS.includes(currentStep)) { + if ( + isDoorOpen && + !GRIPPER_MOVE_STEPS.includes(currentStep) && + !STACKER_LATCH_STEPS.includes(currentStep) + ) { stashedMapRef.current = { route: currentRoute, step: currentStep } setRecoveryMap({ diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/ReleaseLabware.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/ReleaseLabware.tsx index 9ffdd5c47f4..88c52d78100 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/ReleaseLabware.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/ReleaseLabware.tsx @@ -43,7 +43,7 @@ export function ReleaseLabware({ case STACKER_SHUTTLE_EMPTY_SKIP.ROUTE: void handleMotionRouting( true, - RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE + RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE ) break default: diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/StackerReengageLatch.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/StackerReengageLatch.tsx index a9b9b6f8b34..b5a6ac2bc45 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/StackerReengageLatch.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/StackerReengageLatch.tsx @@ -3,7 +3,6 @@ import { useTranslation } from 'react-i18next' import ReengageLatch from '/app/assets/images/flex_stacker_reengage_latch.png' import { DescriptionContent, TwoColumn } from '/app/molecules/InterventionModal' -import { RECOVERY_MAP } from '../constants' import { RecoverySingleColumnContentWrapper } from './RecoveryContentWrapper' import { RecoveryFooterButtons } from './RecoveryFooterButtons' @@ -13,19 +12,12 @@ export function StackerReengageLatch(props: RecoveryContentProps): JSX.Element { const { t } = useTranslation('error_recovery') const { routeUpdateActions, recoveryCommands } = props - const { - proceedNextStep, - goBackPrevStep, - handleMotionRouting, - } = routeUpdateActions + const { proceedNextStep, goBackPrevStep } = routeUpdateActions const { closeLabwareLatch } = recoveryCommands - const { ROBOT_IN_MOTION } = RECOVERY_MAP const primaryOnClick = (): void => { - void handleMotionRouting(true, ROBOT_IN_MOTION.ROUTE).then(() => { - void closeLabwareLatch().then(() => { - void proceedNextStep() - }) + void closeLabwareLatch().then(() => { + void proceedNextStep() }) } diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ReleaseLabware.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ReleaseLabware.test.tsx index e3b650a0f67..45c192ea3fe 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ReleaseLabware.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ReleaseLabware.test.tsx @@ -107,14 +107,14 @@ describe('ReleaseLabware', () => { screen.getByText('The labware will be released from its current height.') }) - it(`clicking the primary button routes to ${RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE}`, () => { + it(`clicking the primary button routes to ${RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE}`, () => { render(props) clickButtonLabeled('Release') expect(mockHandleMotionRouting).toHaveBeenCalledWith( true, - RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE + RECOVERY_MAP.STACKER_RELEASING_LABWARE_LATCH.ROUTE ) }) diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StackerReengageLatch.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StackerReengageLatch.test.tsx index fb6bfdc89b0..af1b12d5446 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StackerReengageLatch.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StackerReengageLatch.test.tsx @@ -50,11 +50,6 @@ describe('Render StackerReengageLatch', () => { render(props) clickButtonLabeled('Re-engage latch') - expect(mockHandleMotionRouting).toHaveBeenCalledWith( - true, - RECOVERY_MAP.ROBOT_IN_MOTION.ROUTE - ) - await waitFor(() => { expect(mockCloseLabwareLatch).toHaveBeenCalled() }) diff --git a/app/src/organisms/ErrorRecoveryFlows/types.ts b/app/src/organisms/ErrorRecoveryFlows/types.ts index b267f1ee0ff..28cdd9057b0 100644 --- a/app/src/organisms/ErrorRecoveryFlows/types.ts +++ b/app/src/organisms/ErrorRecoveryFlows/types.ts @@ -49,7 +49,7 @@ export type RobotMovingRoute = | typeof RECOVERY_MAP['ROBOT_PICKING_UP_TIPS']['ROUTE'] | typeof RECOVERY_MAP['ROBOT_SKIPPING_STEP']['ROUTE'] | typeof RECOVERY_MAP['ROBOT_RELEASING_LABWARE']['ROUTE'] - | typeof RECOVERY_MAP['ROBOT_RELEASING_LABWARE_LATCH']['ROUTE'] + | typeof RECOVERY_MAP['STACKER_RELEASING_LABWARE_LATCH']['ROUTE'] type OriginalRouteKey = keyof RecoveryMap type StepsForRoute = RecoveryMap[{