-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app): fix post run tip detection after error recovery (#16860)
Closes RQA-3589 It's insufficient to check if a run entered error recovery as the sole condition for whether or not to run the post-run drop tip wizard, because it's possible for a run to proceed through error recovery then encounter a terminal error. In these spots, we must show drop tip wizard. To fix, determine whether the run just entered error recovery (or not). If it didn't, do the tip detection logic.
- Loading branch information
Showing
5 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './getCommandTextData' | ||
export * from './lastRunCommandPromptedErrorRecovery' |
13 changes: 13 additions & 0 deletions
13
app/src/local-resources/commands/utils/lastRunCommandPromptedErrorRecovery.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { RunCommandSummary } from '@opentrons/api-client' | ||
|
||
// Whether the last run protocol command prompted Error Recovery. | ||
export function lastRunCommandPromptedErrorRecovery( | ||
summary: RunCommandSummary[] | ||
): boolean { | ||
const lastProtocolCommand = summary.findLast( | ||
command => command.intent !== 'fixit' && command.error != null | ||
) | ||
|
||
// All recoverable protocol commands have defined errors. | ||
return lastProtocolCommand?.error?.isDefined ?? false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters