}
persistence.setDeleteDialogOpen(true)} />
diff --git a/apps/web/app/settings/executors/new/[type]/executor-types.ts b/apps/web/app/settings/executors/new/[type]/executor-types.ts
index 7798092356..c4d956ad49 100644
--- a/apps/web/app/settings/executors/new/[type]/executor-types.ts
+++ b/apps/web/app/settings/executors/new/[type]/executor-types.ts
@@ -1,42 +1,60 @@
// Registry of executor types presented in the "new executor profile" flow.
// Keep entries here (not inline in the page) so the page file stays under
// the 600-line lint cap and new types can be added without touching layout.
+//
+// The map keys (`local`, `worktree`, `local_docker`, `remote_docker`,
+// `sprites`, `ssh`) are the persisted executor enum and the create route's
+// path segment, and `executorId` is a backend row id — none of them is copy.
+// Labels and descriptions travel as catalog keys and resolve at render;
+// `brandLabel` carries a brand/protocol name that reads the same in every
+// locale, so it is a value rather than a message.
export type ExecutorTypeInfo = {
executorId: string;
- label: string;
- description: string;
+ /** Rendered verbatim. Set on brand/protocol names only. */
+ brandLabel?: string;
+ /** Catalog key for the label. Set when `brandLabel` is not. */
+ labelKey?: string;
+ descriptionKey: string;
};
export const EXECUTOR_TYPE_MAP: Record = {
local: {
executorId: "exec-local",
- label: "Local",
- description: "Runs agents directly in the repository folder.",
+ labelKey: "executors:typeLocal",
+ descriptionKey: "executors:descriptionLocalPc",
},
worktree: {
executorId: "exec-worktree",
- label: "Worktree",
- description: "Creates git worktrees for isolated agent sessions.",
+ labelKey: "executors:typeWorktree",
+ descriptionKey: "executors:descriptionWorktree",
},
local_docker: {
executorId: "exec-local-docker",
- label: "Docker",
- description: "Runs Docker containers on this machine.",
+ brandLabel: "Docker",
+ descriptionKey: "executors:descriptionLocalDocker",
},
remote_docker: {
executorId: "exec-remote-docker",
- label: "Remote Docker",
- description: "Connects to a remote Docker host.",
+ labelKey: "executors:remoteDocker",
+ descriptionKey: "executors:descriptionRemoteDocker",
},
sprites: {
executorId: "exec-sprites",
- label: "Sprites.dev",
- description: "Runs agents in Sprites.dev cloud sandboxes.",
+ brandLabel: "Sprites.dev",
+ descriptionKey: "executors:descriptionSprites",
},
+ // `CreateProfilePage` short-circuits `ssh` to `SSHCreatePage`, which renders
+ // its own header — this entry exists so the unknown-type guard accepts the
+ // route, and its label/description are never rendered.
ssh: {
executorId: "exec-ssh",
- label: "SSH",
- description: "Connects to a remote host over SSH and runs agentctl there.",
+ brandLabel: "SSH",
+ descriptionKey: "executors:descriptionSshCreate",
},
};
+
+/** The label for a type card: a brand name verbatim, or the translated label. */
+export function executorTypeLabel(info: ExecutorTypeInfo, t: (key: string) => string): string {
+ return info.brandLabel ?? (info.labelKey ? t(info.labelKey) : "");
+}
diff --git a/apps/web/app/settings/executors/new/[type]/page.tsx b/apps/web/app/settings/executors/new/[type]/page.tsx
index 26aa33b6fd..a25b4787b2 100644
--- a/apps/web/app/settings/executors/new/[type]/page.tsx
+++ b/apps/web/app/settings/executors/new/[type]/page.tsx
@@ -1,6 +1,7 @@
"use client";
import { useCallback, useEffect, useMemo, useState } from "react";
+import { useTranslation } from "react-i18next";
import { useRouter } from "@/lib/routing/client-router";
import { runWithNavigationBlockerBypassed } from "@/lib/routing/navigation-guard";
import { Badge } from "@kandev/ui/badge";
@@ -44,7 +45,7 @@ import {
import type { NetworkPolicyRule } from "@/lib/api/domains/settings-api";
import type { Executor, ExecutorType, ProfileEnvVar } from "@/lib/types/http";
-import { EXECUTOR_TYPE_MAP } from "./executor-types";
+import { EXECUTOR_TYPE_MAP, executorTypeLabel, type ExecutorTypeInfo } from "./executor-types";
import { SSHCreatePage } from "./ssh-create-page";
const EXECUTORS_ROUTE = "/settings/executors";
@@ -72,28 +73,22 @@ export default function CreateProfilePage({ executorType }: { executorType: stri
}
function InvalidTypeFallback() {
+ const { t } = useTranslation();
const router = useRouter();
return (
-