Preferably, with Juhani's sidequest active, meaning that Xor has approached you but you haven't yet confronted him at the Ebon Hawk. And this should definitely be pre-Leviathan, though if it can be just before the Leviathan (for example, right at the third Star Map), that would be great.