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): fix choose robot slideout for usb #13897

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading