diff --git a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts index 44679342b82..9c35e0cbf84 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts +++ b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts @@ -334,12 +334,13 @@ const buildMoveToAACommand = ( export const buildLoadPipetteCommand = ( pipetteName: PipetteModelSpecs['name'], - mount: PipetteData['mount'] + mount: PipetteData['mount'], + pipetteId?: string | null ): CreateCommand => { return { commandType: 'loadPipette', params: { - pipetteId: MANAGED_PIPETTE_ID, + pipetteId: pipetteId ?? MANAGED_PIPETTE_ID, mount, pipetteName, }, diff --git a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts index 33ea2a116fd..951b29c6266 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts +++ b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts @@ -117,10 +117,15 @@ function useRegisterPipetteFixitType({ instrumentModelSpecs, issuedCommandsType, chainRunCommands, + fixitCommandTypeUtils, }: UseRegisterPipetteFixitType): void { React.useEffect(() => { if (issuedCommandsType === 'fixit') { - const command = buildLoadPipetteCommand(instrumentModelSpecs.name, mount) + const command = buildLoadPipetteCommand( + instrumentModelSpecs.name, + mount, + fixitCommandTypeUtils?.pipetteId + ) void chainRunCommands([command], true) } }, []) diff --git a/app/src/organisms/DropTipWizardFlows/types.ts b/app/src/organisms/DropTipWizardFlows/types.ts index 15a9e25cc9e..4238d9ac8a0 100644 --- a/app/src/organisms/DropTipWizardFlows/types.ts +++ b/app/src/organisms/DropTipWizardFlows/types.ts @@ -36,6 +36,7 @@ export interface DropTipWizardRouteOverride { export interface FixitCommandTypeUtils { runId: string failedCommandId: string + pipetteId: string | null copyOverrides: CopyOverrides errorOverrides: ErrorOverrides buttonOverrides: ButtonOverrides diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx index 58999c0cabb..f79f0a7bc76 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx @@ -200,6 +200,7 @@ export function useDropTipFlowUtils({ subMapUtils, routeUpdateActions, recoveryMap, + failedPipetteInfo, }: RecoveryContentProps): FixitCommandTypeUtils { const { t } = useTranslation('error_recovery') const { @@ -301,9 +302,17 @@ export function useDropTipFlowUtils({ } } + const pipetteId = + failedCommand != null && + 'params' in failedCommand.byRunRecord && + 'pipetteId' in failedCommand.byRunRecord.params + ? failedCommand.byRunRecord.params.pipetteId + : null + return { runId, failedCommandId, + pipetteId, copyOverrides: buildCopyOverrides(), errorOverrides: buildErrorOverrides(), buttonOverrides: buildButtonOverrides(),