Skip to content

Commit

Permalink
fix(app): fix stale failedCommand during Error Recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Aug 12, 2024
1 parent b99e7c2 commit 1463456
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function useFailedLabwareUtils({
failedCommandByRunRecord,
runCommands,
}),
[failedCommandByRunRecord?.error?.errorType, runCommands]
[failedCommandByRunRecord?.key, runCommands?.meta.totalLength]
)

const tipSelectionUtils = useTipSelectionUtils(recentRelevantFailedLabwareCmd)
Expand All @@ -74,12 +74,12 @@ export function useFailedLabwareUtils({
recentRelevantFailedLabwareCmd,
runRecord
),
[protocolAnalysis, recentRelevantFailedLabwareCmd, runRecord]
[protocolAnalysis?.id, recentRelevantFailedLabwareCmd?.key]
)

const failedLabware = React.useMemo(
() => getFailedLabware(recentRelevantFailedLabwareCmd, runRecord),
[recentRelevantFailedLabwareCmd, runRecord]
[recentRelevantFailedLabwareCmd?.key]
)

const relevantWellName = getRelevantWellName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export function useRetainedFailedCommandBySource(
})
}
}
}, [failedCommandByRunRecord?.key, protocolAnalysis?.id])
}, [
failedCommandByRunRecord?.key,
failedCommandByRunRecord?.error?.errorType,
protocolAnalysis?.id,
])

return retainedFailedCommand
}

0 comments on commit 1463456

Please sign in to comment.