From 03bc5d3414e59c52068be753b8b247624884f945 Mon Sep 17 00:00:00 2001 From: Kacper Wojciechowski <39823706+jog1t@users.noreply.github.com> Date: Sun, 26 Oct 2025 23:42:04 +0100 Subject: [PATCH 1/3] fix(fe): empty token it is a valid token --- .../actors/guard-connectable-inspector.tsx | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/actors/guard-connectable-inspector.tsx b/frontend/src/components/actors/guard-connectable-inspector.tsx index 5f2bb4ecc8..9e3f6ad55d 100644 --- a/frontend/src/components/actors/guard-connectable-inspector.tsx +++ b/frontend/src/components/actors/guard-connectable-inspector.tsx @@ -231,8 +231,7 @@ function useActorEngineContext({ actorId }: { actorId: ActorId }) { const provider = useEngineCompatDataProvider(); const actorContext = useMemo(() => { - return engineToken - ? createInspectorActorContext({ + return createInspectorActorContext({ url: getConfig().apiUrl, token: async () => { const runner = await queryClient.fetchQuery( @@ -245,9 +244,8 @@ function useActorEngineContext({ actorId }: { actorId: ActorId }) { ); }, engineToken, - }) - : null; - }, [actor?.runner, provider.runnerByNameQueryOptions, engineToken]); + }); + }, [actorId, actor?.runner, provider.runnerByNameQueryOptions, engineToken]); return { actorContext, actor, runner, isLoading }; } @@ -273,24 +271,6 @@ function ActorEngineProvider({ ); } - if (!actorContext) { - return ( - - Unable to connect to the Actor's Inspector. - - Your namespace is missing an engine token. Please - report this to Rivet support. - - - } - > - {children} - - ); - } - return ( {children} From c22f51fc13761ec895da8b07094eed3dc094066c Mon Sep 17 00:00:00 2001 From: Kacper Wojciechowski <39823706+jog1t@users.noreply.github.com> Date: Sun, 26 Oct 2025 23:48:38 +0100 Subject: [PATCH 2/3] fix(fe): redirect engine users to connect page when there's no actors --- .../projects.$project/ns.$namespace/index.tsx | 34 +++++++++++-------- .../_context/_engine/ns.$namespace/index.tsx | 8 +++++ 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/frontend/src/routes/_context/_cloud/orgs.$organization/projects.$project/ns.$namespace/index.tsx b/frontend/src/routes/_context/_cloud/orgs.$organization/projects.$project/ns.$namespace/index.tsx index f601ee95ec..e9f5e6a0c3 100644 --- a/frontend/src/routes/_context/_cloud/orgs.$organization/projects.$project/ns.$namespace/index.tsx +++ b/frontend/src/routes/_context/_cloud/orgs.$organization/projects.$project/ns.$namespace/index.tsx @@ -1,13 +1,16 @@ +import type { QueryClient } from "@tanstack/react-query"; import { CatchBoundary, createFileRoute, - type InferAllContext, notFound, redirect, } from "@tanstack/react-router"; import { Actors } from "@/app/actors"; import { BuildPrefiller } from "@/app/build-prefiller"; -import { useDataProvider } from "@/components/actors"; +import { + useDataProvider, + type useEngineCompatDataProvider, +} from "@/components/actors"; export const Route = createFileRoute( "/_context/_cloud/orgs/$organization/projects/$project/ns/$namespace/", @@ -18,15 +21,18 @@ export const Route = createFileRoute( throw notFound(); } - const isVisible = await shouldDisplayActors(context); + const shouldDisplay = await shouldDisplayActors(context); - if (!isVisible) { + if (!shouldDisplay) { throw redirect({ from: Route.to, replace: true, to: "./connect" }); } }, }); -async function shouldDisplayActors(context: InferAllContext) { +export async function shouldDisplayActors(context: { + queryClient: QueryClient; + dataProvider: ReturnType; +}) { try { const infiniteBuilds = await context.queryClient.fetchInfiniteQuery( context.dataProvider.buildsQueryOptions(), @@ -65,16 +71,14 @@ export function RouteComponent() { } return ( - <> - actorId ?? "no-actor-id"}> - - n?.join(",") ?? "no-build-name"} - errorComponent={() => null} - > - {!n ? : null} - + actorId ?? "no-actor-id"}> + + n?.join(",") ?? "no-build-name"} + errorComponent={() => null} + > + {!n ? : null} - > + ); } diff --git a/frontend/src/routes/_context/_engine/ns.$namespace/index.tsx b/frontend/src/routes/_context/_engine/ns.$namespace/index.tsx index 14beeb2739..151d8c3358 100644 --- a/frontend/src/routes/_context/_engine/ns.$namespace/index.tsx +++ b/frontend/src/routes/_context/_engine/ns.$namespace/index.tsx @@ -1,10 +1,12 @@ import { CatchBoundary, createFileRoute, + redirect, useSearch, } from "@tanstack/react-router"; import { Actors } from "@/app/actors"; import { BuildPrefiller } from "@/app/build-prefiller"; +import { shouldDisplayActors } from "../../_cloud/orgs.$organization/projects.$project/ns.$namespace/index"; export const Route = createFileRoute("/_context/_engine/ns/$namespace/")({ component: RouteComponent, @@ -12,6 +14,12 @@ export const Route = createFileRoute("/_context/_engine/ns/$namespace/")({ if (context.__type !== "engine") { throw new Error("Invalid context type for this route"); } + + const shouldDisplay = await shouldDisplayActors(context); + + if (!shouldDisplay) { + throw redirect({ from: Route.to, replace: true, to: "./connect" }); + } }, }); From e650320934f131e677510897d494eddb376bdb55 Mon Sep 17 00:00:00 2001 From: Kacper Wojciechowski <39823706+jog1t@users.noreply.github.com> Date: Mon, 27 Oct 2025 00:13:11 +0100 Subject: [PATCH 3/3] fix(fe): fix aligment of icons in dc region --- frontend/src/app/runner-config-table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/runner-config-table.tsx b/frontend/src/app/runner-config-table.tsx index 62a6fcd118..eb690d9869 100644 --- a/frontend/src/app/runner-config-table.tsx +++ b/frontend/src/app/runner-config-table.tsx @@ -258,7 +258,7 @@ function Regions({ regions }: { regions: string[] }) { if (regions.length === 1) { return (
Unable to connect to the Actor's Inspector.
- Your namespace is missing an engine token. Please - report this to Rivet support. -