Skip to content

Commit 7727a1b

Browse files
committed
Add loading workspace state
1 parent 9786f6c commit 7727a1b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

site/src/components/WorkspaceStatusBar/WorkspaceStatusBar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const Language = {
2222
starting: "Building",
2323
stopping: "Stopping",
2424
error: "Build Failed",
25+
loading: "Loading Status"
2526
}
2627

2728
export interface WorkspaceStatusBarProps {
@@ -79,6 +80,7 @@ export const WorkspaceStatusBar: React.FC<WorkspaceStatusBarProps> = ({
7980
{workspaceStatus === "stopped" && Language.stopped}
8081
{workspaceStatus === "stopping" && Language.stopping}
8182
{workspaceStatus === "error" && Language.error}
83+
{workspaceStatus === "loading" && Language.loading}
8284
</Box>
8385
</div>
8486

site/src/pages/WorkspacePage/WorkspacePage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Workspace } from "../../components/Workspace/Workspace"
99
import { firstOrItem } from "../../util/array"
1010
import { XServiceContext } from "../../xServices/StateContext"
1111

12-
export type WorkspaceStatus = "started" | "starting" | "stopped" | "stopping" | "error"
12+
export type WorkspaceStatus = "started" | "starting" | "stopped" | "stopping" | "error" | "loading"
1313

1414
export const WorkspacePage: React.FC = () => {
1515
const { workspace: workspaceQueryParam } = useParams()
@@ -28,8 +28,10 @@ export const WorkspacePage: React.FC = () => {
2828
workspaceStatus = "starting"
2929
} else if (workspaceState.hasTag("stopping")) {
3030
workspaceStatus = "stopping"
31-
} else {
31+
} else if (workspaceState.matches("ready.build.error")) {
3232
workspaceStatus = "error"
33+
} else {
34+
workspaceStatus = "loading"
3335
}
3436

3537
/**

0 commit comments

Comments
 (0)