-
Notifications
You must be signed in to change notification settings - Fork 180
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): No longer dismiss run if canceled while running on ODD #16142
Conversation
@@ -55,9 +55,17 @@ export function ConfirmCancelRunModal({ | |||
dismissCurrentRun, | |||
isLoading: isDismissing, | |||
} = useDismissCurrentRunMutation({ | |||
onSuccess: () => { | |||
if (isQuickTransfer && !isActiveRun) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mutation will now only be called if !isActiveRun is true
@@ -251,15 +251,10 @@ export function RunSummary(): JSX.Element { | |||
}, [isRunCurrent, enteredER]) | |||
|
|||
const returnToQuickTransfer = (): void => { | |||
if (!isRunCurrent) { | |||
closeCurrentRunIfValid(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closeCurrentRunIfValid
checks for !isRunCurrent and calls the passed in callback regardless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wooooooooooo!
fix RQA-3100, RQA-3098
Overview
This PR changes the behavior of a run cancellation initiated on ODD. Previous behavior stopped the run, dismissed (or un-currented) the run, and then if the run was not yet started we'd manually redirect back to the protocols or quick transfer page. Now, we'll only dismiss the run if it has not yet started. This will fix the drop tip wizard not opening as expected after run cancellation.
Test Plan and Hands on Testing
While testing this, you may run into https://opentrons.atlassian.net/browse/RQA-3109 which is not fixed in this PR. If this is too difficult to test because of the hanging cancellation modal, we can wait to test and merge until that ticket is resolved.
Changelog
dismissCurrentRun
call inConfirmCancelRunModal
so that it is only called if a run is not activeonSettled
callback ofuseDismissCurrentRunMutation
returnToQuickTransfer
function -closeCurrentRunIfValid
handles the current run functionality for usReview requests
Look over code changes
Risk assessment
Medium - we do not think this will have any side effects but it is possible that there are places in the app where we expect a run to be dismissed after ODD cancellation