diff --git a/frontend/src/components/actors/guard-connectable-inspector.tsx b/frontend/src/components/actors/guard-connectable-inspector.tsx
index 37ee097dd5..ea1fe14436 100644
--- a/frontend/src/components/actors/guard-connectable-inspector.tsx
+++ b/frontend/src/components/actors/guard-connectable-inspector.tsx
@@ -1,13 +1,12 @@
import { faPowerOff, faSpinnerThird, Icon } from "@rivet-gg/icons";
-import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
-import { useMatch } from "@tanstack/react-router";
import {
- createContext,
- type ReactNode,
- useContext,
- useMemo,
- useState,
-} from "react";
+ useInfiniteQuery,
+ useMutation,
+ useQuery,
+ useSuspenseQuery,
+} from "@tanstack/react-query";
+import { useMatch } from "@tanstack/react-router";
+import { createContext, type ReactNode, useContext, useMemo } from "react";
import { useInspectorCredentials } from "@/app/credentials-context";
import { createInspectorActorContext } from "@/queries/actor-inspector";
import { DiscreteCopyButton } from "../copy-area";
@@ -87,17 +86,7 @@ export function GuardConnectableInspector({
if (pendingAllocationAt && !startedAt) {
return (
-
- Cannot start Actor, runners are out of capacity.
-
- Add more runners to run the Actor or increase runner
- capacity.
-
-
- }
- >
+ }>
{children}
);
@@ -110,6 +99,33 @@ export function GuardConnectableInspector({
);
}
+function NoRunners() {
+ const { data } = useInfiniteQuery({
+ ...useEngineCompatDataProvider().runnersQueryOptions(),
+ refetchInterval: 5_000,
+ });
+
+ if (data?.length === 0) {
+ return (
+
+ There are no runners.
+
+ Check that you have at least one runner available to run
+ your Actors.
+
+
+ );
+ }
+ return (
+
+ Cannot start Actor, runners are out of capacity.
+
+ Add more runners to run the Actor or increase runner capacity.
+
+
+ );
+}
+
function ActorContextProvider(props: {
actorId: ActorId;
children: ReactNode;