Skip to content

Commit 9f60da9

Browse files
committed
[workspace] hide ide alert on stop phase (gitpod-io#11035)
1 parent f4babd3 commit 9f60da9

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
@@ -451,6 +451,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
451451
let phase: StartPhase | undefined = StartPhase.Preparing;
452452
let title = undefined;
453453
let isTimedOut = false;
454+
let isStoppingOrStopped = false;
454455
let statusMessage = !!error ? undefined : <p className="text-base text-gray-400">Preparing workspace …</p>;
455456
const contextURL = ContextURL.getNormalizedURL(this.state.workspace)?.toString();
456457
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;
@@ -625,6 +626,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
625626

626627
// Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
627628
case "stopping":
629+
isStoppingOrStopped = true;
628630
if (isPrebuild) {
629631
return (
630632
<StartPage title="Prebuild in Progress">
@@ -662,6 +664,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
662664

663665
// Stopped means the workspace ended regularly because it was shut down.
664666
case "stopped":
667+
isStoppingOrStopped = true;
665668
phase = StartPhase.Stopped;
666669
if (this.state.hasImageBuildLogs) {
667670
const restartWithDefaultImage = (event: React.MouseEvent) => {
@@ -713,7 +716,12 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
713716
break;
714717
}
715718
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+
>
717725
{statusMessage}
718726
</StartPage>
719727
);

0 commit comments

Comments
 (0)