@@ -451,6 +451,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
451
451
let phase : StartPhase | undefined = StartPhase . Preparing ;
452
452
let title = undefined ;
453
453
let isTimedOut = false ;
454
+ let isStoppingOrStopped = false ;
454
455
let statusMessage = ! ! error ? undefined : < p className = "text-base text-gray-400" > Preparing workspace …</ p > ;
455
456
const contextURL = ContextURL . getNormalizedURL ( this . state . workspace ) ?. toString ( ) ;
456
457
const useLatest = ! ! this . state . workspaceInstance ?. configuration ?. ideConfig ?. useLatest ;
@@ -625,6 +626,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
625
626
626
627
// Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
627
628
case "stopping" :
629
+ isStoppingOrStopped = true ;
628
630
if ( isPrebuild ) {
629
631
return (
630
632
< StartPage title = "Prebuild in Progress" >
@@ -662,6 +664,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
662
664
663
665
// Stopped means the workspace ended regularly because it was shut down.
664
666
case "stopped" :
667
+ isStoppingOrStopped = true ;
665
668
phase = StartPhase . Stopped ;
666
669
if ( this . state . hasImageBuildLogs ) {
667
670
const restartWithDefaultImage = ( event : React . MouseEvent ) => {
@@ -713,7 +716,12 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
713
716
break ;
714
717
}
715
718
return (
716
- < StartPage phase = { phase } error = { error } title = { title } showLatestIdeWarning = { ! isTimedOut && useLatest } >
719
+ < StartPage
720
+ phase = { phase }
721
+ error = { error }
722
+ title = { title }
723
+ showLatestIdeWarning = { ! isTimedOut && ! isStoppingOrStopped && useLatest }
724
+ >
717
725
{ statusMessage }
718
726
</ StartPage >
719
727
) ;
0 commit comments