@@ -447,8 +447,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
447
447
const withPrebuild = WithPrebuild . is ( this . state . workspace ?. context ) ;
448
448
let phase : StartPhase | undefined = StartPhase . Preparing ;
449
449
let title = undefined ;
450
- let isTimedOut = false ;
451
- let isStoppingOrStopped = false ;
450
+ let isStoppingOrStoppedPhase = false ;
452
451
let isError = error ? true : false ;
453
452
let statusMessage = ! ! error ? undefined : < p className = "text-base text-gray-400" > Preparing workspace …</ p > ;
454
453
const contextURL = ContextURL . getNormalizedURL ( this . state . workspace ) ?. toString ( ) ;
@@ -624,7 +623,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
624
623
625
624
// Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
626
625
case "stopping" :
627
- isStoppingOrStopped = true ;
626
+ isStoppingOrStoppedPhase = true ;
628
627
if ( isPrebuild ) {
629
628
return (
630
629
< StartPage title = "Prebuild in Progress" >
@@ -662,7 +661,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
662
661
663
662
// Stopped means the workspace ended regularly because it was shut down.
664
663
case "stopped" :
665
- isStoppingOrStopped = true ;
664
+ isStoppingOrStoppedPhase = true ;
666
665
phase = StartPhase . Stopped ;
667
666
if ( this . state . hasImageBuildLogs ) {
668
667
const restartWithDefaultImage = ( event : React . MouseEvent ) => {
@@ -680,7 +679,6 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
680
679
}
681
680
if ( ! isPrebuild && this . state . workspaceInstance . status . conditions . timeout ) {
682
681
title = "Timed Out" ;
683
- isTimedOut = true ;
684
682
}
685
683
statusMessage = (
686
684
< div >
@@ -718,7 +716,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
718
716
phase = { phase }
719
717
error = { error }
720
718
title = { title }
721
- showLatestIdeWarning = { isError || ( ! isTimedOut && ! isStoppingOrStopped && useLatest ) }
719
+ showLatestIdeWarning = { useLatest && ( isError || ! isStoppingOrStoppedPhase ) }
722
720
>
723
721
{ statusMessage }
724
722
</ StartPage >
0 commit comments