Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { RunCommandSummary } from '@opentrons/api-client'
// Whether the last run protocol command prompted Error Recovery, if Error Recovery is enabled.
export function lastRunCommandPromptedErrorRecovery(
summary: RunCommandSummary[] | null,
summary: RunCommandSummary[],
isEREnabled: boolean
): boolean {
const lastProtocolCommand = summary?.findLast(
const lastProtocolCommand = summary.findLast(
command => command.intent !== 'fixit' && command.error != null
)
// All recoverable protocol commands have defined errors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export function useRunHeaderDropTip({
}
// Only run tip checking if it wasn't *just* handled during Error Recovery.
else if (
runSummaryNoFixit != null &&
!lastRunCommandPromptedErrorRecovery(runSummaryNoFixit, isEREnabled) &&
isRunCurrent &&
isTerminalRunStatus(runStatus)
Expand Down
5 changes: 4 additions & 1 deletion app/src/pages/ODD/RunSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ export function RunSummary(): JSX.Element {

useEffect(() => {
// Only run tip checking if it wasn't *just* handled during Error Recovery.
if (!lastRunCommandPromptedErrorRecovery(runSummaryNoFixit, isEREnabled)) {
if (
runSummaryNoFixit != null &&
!lastRunCommandPromptedErrorRecovery(runSummaryNoFixit, isEREnabled)
) {
void determineTipStatus()
}
}, [isRunCurrent, runSummaryNoFixit, isEREnabled])
Expand Down
Loading