Skip to content

Commit d1ac344

Browse files
committed
[workspace] hide ide alert on stop phase (gitpod-io#11035)
1 parent 88d7fba commit d1ac344

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/dashboard/src/start/StartWorkspace.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
448448
let phase: StartPhase | undefined = StartPhase.Preparing;
449449
let title = undefined;
450450
let isTimedOut = false;
451+
let isStoppingOrStopped = false;
451452
let statusMessage = !!error ? undefined : <p className="text-base text-gray-400">Preparing workspace …</p>;
452453
const contextURL = ContextURL.getNormalizedURL(this.state.workspace)?.toString();
453454
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;
@@ -622,6 +623,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
622623

623624
// Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
624625
case "stopping":
626+
isStoppingOrStopped = true;
625627
if (isPrebuild) {
626628
return (
627629
<StartPage title="Prebuild in Progress">
@@ -659,6 +661,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
659661

660662
// Stopped means the workspace ended regularly because it was shut down.
661663
case "stopped":
664+
isStoppingOrStopped = true;
662665
phase = StartPhase.Stopped;
663666
if (this.state.hasImageBuildLogs) {
664667
const restartWithDefaultImage = (event: React.MouseEvent) => {
@@ -710,7 +713,12 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
710713
break;
711714
}
712715
return (
713-
<StartPage phase={phase} error={error} title={title} showLatestIdeWarning={!isTimedOut && useLatest}>
716+
<StartPage
717+
phase={phase}
718+
error={error}
719+
title={title}
720+
showLatestIdeWarning={!isTimedOut && !isStoppingOrStopped && useLatest}
721+
>
714722
{statusMessage}
715723
</StartPage>
716724
);

0 commit comments

Comments
 (0)