@@ -324,7 +324,11 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
324
324
325
325
// Redirect to workspaceURL if we are not yet running in an iframe.
326
326
// It happens this late if we were waiting for a docker build.
327
- if ( ! this . props . runsInIFrame && workspaceInstance . ideUrl && ! this . props . dontAutostart ) {
327
+ if (
328
+ ! this . props . runsInIFrame &&
329
+ workspaceInstance . ideUrl &&
330
+ ( ! this . props . dontAutostart || workspaceInstance . status . phase === "running" )
331
+ ) {
328
332
this . redirectTo ( workspaceInstance . ideUrl ) ;
329
333
return ;
330
334
}
@@ -431,48 +435,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
431
435
}
432
436
if ( ! this . state . desktopIde ) {
433
437
phase = StartPhase . Running ;
434
-
435
- if ( this . props . dontAutostart ) {
436
- // hide the progress bar, as we're already running
437
- phase = undefined ;
438
- title = "Running" ;
439
-
440
- // in case we dontAutostart the IDE we have to provide controls to do so
441
- statusMessage = (
442
- < div >
443
- < div className = "flex space-x-3 items-center text-left rounded-xl m-auto px-4 h-16 w-72 mt-4 mb-2 bg-gray-100 dark:bg-gray-800" >
444
- < div className = "rounded-full w-3 h-3 text-sm bg-green-500" > </ div >
445
- < div >
446
- < p className = "text-gray-700 dark:text-gray-200 font-semibold w-56 truncate" >
447
- { this . state . workspaceInstance . workspaceId }
448
- </ p >
449
- < a target = "_parent" href = { contextURL } >
450
- < p className = "w-56 truncate hover:text-blue-600 dark:hover:text-blue-400" >
451
- { contextURL }
452
- </ p >
453
- </ a >
454
- </ div >
455
- </ div >
456
- < div className = "mt-10 justify-center flex space-x-2" >
457
- < a target = "_parent" href = { gitpodHostUrl . asDashboard ( ) . toString ( ) } >
458
- < button className = "secondary" > Go to Dashboard</ button >
459
- </ a >
460
- < a
461
- target = "_parent"
462
- href = {
463
- gitpodHostUrl
464
- . asStart ( this . props . workspaceId )
465
- . toString ( ) /** move over 'start' here to fetch fresh credentials in case this is an older tab */
466
- }
467
- >
468
- < button > Open Workspace</ button >
469
- </ a >
470
- </ div >
471
- </ div >
472
- ) ;
473
- } else {
474
- statusMessage = < p className = "text-base text-gray-400" > Opening Workspace …</ p > ;
475
- }
438
+ statusMessage = < p className = "text-base text-gray-400" > Opening Workspace …</ p > ;
476
439
} else {
477
440
phase = StartPhase . IdeReady ;
478
441
const openLink = this . state . desktopIde . link ;
0 commit comments