Enhance isInstallComplete function in AppUpdateProgress to recognize additional completion messages, including 'successful' and 'restarting', improving accuracy of installation status detection during updates.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-06-21 22:54:58 +01:00
parent e0b409434d
commit 8677691da3

View File

@ -72,11 +72,17 @@ const getDownloadStageStatus = (phase, isError) => {
return 'pending' return 'pending'
} }
const isInstallComplete = (phase, message) => const isInstallComplete = (phase, message) => {
phase === 'installing' && if (phase !== 'installing') return false
String(message || '')
.toLowerCase() const normalized = String(message || '').toLowerCase()
.includes('complete')
return (
normalized.includes('complete') ||
normalized.includes('successful') ||
normalized.includes('restarting')
)
}
const getInstallStageStatus = (phase, isError, message) => { const getInstallStageStatus = (phase, isError, message) => {
if (isError && ['downloaded', 'installing'].includes(phase)) return 'error' if (isError && ['downloaded', 'installing'].includes(phase)) return 'error'