diff --git a/frontend/src/components/actors/actor-status-indicator.tsx b/frontend/src/components/actors/actor-status-indicator.tsx index 76d5dcad7c..356ff9a98e 100644 --- a/frontend/src/components/actors/actor-status-indicator.tsx +++ b/frontend/src/components/actors/actor-status-indicator.tsx @@ -54,6 +54,7 @@ export const ActorStatusIndicator = ({ "bg-blue-600 animate-pulse": status === "starting", "bg-destructive": status === "crashed", "bg-foreground/10": status === "stopped", + "bg-primary": status === "pending", "bg-accent": status === "unknown", }, props.className, diff --git a/frontend/src/components/actors/actor-status-label.tsx b/frontend/src/components/actors/actor-status-label.tsx index cd45604e87..2e282330c3 100644 --- a/frontend/src/components/actors/actor-status-label.tsx +++ b/frontend/src/components/actors/actor-status-label.tsx @@ -9,6 +9,7 @@ export const ACTOR_STATUS_LABEL_MAP = { stopped: "Stopped", crashed: "Crashed", sleeping: "Sleeping", + pending: "Pending (Allocating)", } satisfies Record; export const ActorStatusLabel = ({ status }: { status?: ActorStatus }) => { diff --git a/frontend/src/components/actors/queries/index.ts b/frontend/src/components/actors/queries/index.ts index 8aa066042b..9303d62300 100644 --- a/frontend/src/components/actors/queries/index.ts +++ b/frontend/src/components/actors/queries/index.ts @@ -95,15 +95,30 @@ export type ActorStatus = | "stopped" | "crashed" | "sleeping" + | "pending" | "unknown"; export function getActorStatus( actor: Pick< Actor, - "createdAt" | "startedAt" | "destroyedAt" | "sleepingAt" + | "createdAt" + | "startedAt" + | "destroyedAt" + | "sleepingAt" + | "pendingAllocationAt" >, ): ActorStatus { - const { createdAt, startedAt, destroyedAt, sleepingAt } = actor; + const { + createdAt, + startedAt, + destroyedAt, + sleepingAt, + pendingAllocationAt, + } = actor; + + if (pendingAllocationAt && !startedAt && !destroyedAt) { + return "pending"; + } if (createdAt && sleepingAt && !destroyedAt) { return "sleeping";