Skip to content

Commit

Permalink
fix(app): fix choose robot slideout for usb (#13897)
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin authored Nov 1, 2023
1 parent 85369e7 commit 9ff5a6a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/src/organisms/ChooseRobotToRunProtocolSlideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
} from '@opentrons/components'

import { getRobotUpdateDisplayInfo } from '../../redux/robot-update'
import { OPENTRONS_USB } from '../../redux/discovery'
import { appShellRequestor } from '../../redux/shell/remote'
import { useTrackCreateProtocolRunEvent } from '../Devices/hooks'
import { ApplyHistoricOffsets } from '../ApplyHistoricOffsets'
import { useOffsetCandidatesForAnalysis } from '../ApplyHistoricOffsets/hooks/useOffsetCandidatesForAnalysis'
Expand Down Expand Up @@ -82,7 +84,13 @@ export function ChooseRobotToRunProtocolSlideoutComponent(
})
},
},
selectedRobot != null ? { hostname: selectedRobot.ip } : null,
selectedRobot != null
? {
hostname: selectedRobot.ip,
requestor:
selectedRobot?.ip === OPENTRONS_USB ? appShellRequestor : undefined,
}
: null,
shouldApplyOffsets
? offsetCandidates.map(({ vector, location, definitionUri }) => ({
vector,
Expand Down
10 changes: 9 additions & 1 deletion app/src/organisms/SendProtocolToOT3Slideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
getProtocolDisplayName,
} from '../../organisms/ProtocolsLanding/utils'
import { useToaster } from '../../organisms/ToasterOven'
import { appShellRequestor } from '../../redux/shell/remote'
import { OPENTRONS_USB } from '../../redux/discovery'
import { getIsProtocolAnalysisInProgress } from '../../redux/protocol-storage'

import type { AxiosError } from 'axios'
Expand Down Expand Up @@ -61,7 +63,13 @@ export function SendProtocolToOT3Slideout(

const { mutateAsync: createProtocolAsync } = useCreateProtocolMutation(
{},
selectedRobot != null ? { hostname: selectedRobot.ip } : null
selectedRobot != null
? {
hostname: selectedRobot.ip,
requestor:
selectedRobot?.ip === OPENTRONS_USB ? appShellRequestor : undefined,
}
: null
)

const isAnalyzing = useSelector((state: State) =>
Expand Down

0 comments on commit 9ff5a6a

Please sign in to comment.