Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(onboarding): the first run is a full-window stage in the launcher's editorial language

rubenluetke10-beep85ffe182ffed
diff --git a/jarvis/ui/web/frontend/public/onboarding/api-keys-realtime-guide.png b/jarvis/ui/web/frontend/public/onboarding/api-keys-realtime-guide.png
deleted file mode 100644
index 74d57ec104..0000000000
Binary files a/jarvis/ui/web/frontend/public/onboarding/api-keys-realtime-guide.png and /dev/null differ
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/IntroClip.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/IntroClip.test.tsx
deleted file mode 100644
index 15ec38afdd..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/IntroClip.test.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import { cleanup, render, screen } from "@testing-library/react";
-import { afterEach, expect, it, vi } from "vitest";
-
-vi.mock("./IntroSequence", () => ({ IntroSequence: () => <div data-testid="intro-seq" /> }));
-import { IntroClip } from "./IntroClip";
-
-afterEach(cleanup);
-
-it("renders the IntroSequence fallback when no src", () => {
- render(<IntroClip />);
- expect(screen.getByTestId("intro-seq")).toBeDefined();
-});
-
-it("renders a video element when src is given", () => {
- const { container } = render(<IntroClip src="/static/intro.webm" />);
- expect(container.querySelector("video")).not.toBeNull();
-});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/IntroClip.tsx b/jarvis/ui/web/frontend/src/components/onboarding/IntroClip.tsx
deleted file mode 100644
index 9275e2d220..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/IntroClip.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useState } from "react";
-import { IntroSequence } from "./IntroSequence";
-
-/**
- * Plays the onboarding intro video when a usable `src` is given — autoplaying
- * muted (the video carries no audio) with controls so the user can pause or
- * scrub, and can simply move on with the Welcome CTA below to skip it. Falls
- * back to the animated IntroSequence when there is no src or the asset fails to
- * load, so a missing video never blocks onboarding.
- */
-export function IntroClip({ src }: { src?: string }) {
- const [failed, setFailed] = useState(false);
- if (src && src.trim().length > 0 && !failed) {
- return (
- <video
- className="aspect-video w-full rounded-xl border border-border"
- src={src}
- controls
- autoPlay
- muted
- playsInline
- preload="metadata"
- onError={() => setFailed(true)}
- />
- );
- }
- return <IntroSequence />;
-}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/IntroSequence.tsx b/jarvis/ui/web/frontend/src/components/onboarding/IntroSequence.tsx
index 1c963aa40a..33ba7f5244 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/IntroSequence.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/IntroSequence.tsx
@@ -1,6 +1,7 @@
import { useEffect, useState } from "react";
import { MascotGigi } from "@/components/MascotGigi";
import { useT } from "@/i18n";
+import { cn } from "@/lib/utils";
const SCENE_KEYS = [
"onboarding.intro.scene_1",
@@ -21,12 +22,13 @@ function prefersReducedMotion(): boolean {
}
/**
- * Auto-advancing, captioned brand intro shown inside IntroClip when no video
- * asset is present. Stops on the last scene; renders the final scene immediately
- * (no motion) when the user prefers reduced motion. Decorative — the Welcome
- * step owns the CTA below it.
+ * Auto-advancing, captioned brand intro on the first step. The mascot and one
+ * line of copy on the stage's own ground, framed by a hairline — not a boxed
+ * video placeholder. Stops on the last scene; renders the final scene
+ * immediately (no motion) when the user prefers reduced motion. Decorative —
+ * the step owns the CTA below it.
*/
-export function IntroSequence() {
+export function IntroSequence({ className }: { className?: string }) {
const t = useT();
const reduced = prefersReducedMotion();
const [scene, setScene] = useState(reduced ? SCENE_KEYS.length - 1 : 0);
@@ -41,21 +43,27 @@ export function IntroSequence() {
return (
<div
- className="relative flex aspect-video w-full flex-col items-center justify-center gap-4 overflow-hidden rounded-xl border border-border bg-gradient-to-br from-background to-card"
+ className={cn(
+ "relative flex flex-col items-center justify-center gap-5 border-y border-border/70 px-6 py-8",
+ className,
+ )}
aria-live="polite"
>
- <MascotGigi size={96} reactToVoice={false} enableComments={false} />
+ <MascotGigi size={104} reactToVoice={false} enableComments={false} />
<p
key={scene}
- className="animate-in fade-in px-6 text-center text-sm font-medium text-foreground"
+ className="animate-in fade-in text-center text-[17px] font-medium leading-snug tracking-tight text-foreground [text-wrap:balance] motion-reduce:animate-none"
>
{t(SCENE_KEYS[scene])}
</p>
- <div className="absolute bottom-3 flex gap-1.5" aria-hidden>
+ <div className="flex gap-1.5" aria-hidden>
{SCENE_KEYS.map((k, i) => (
<span
key={k}
- className={`h-1 w-5 rounded-full transition-colors ${i <= scene ? "bg-primary" : "bg-muted"}`}
+ className={cn(
+ "h-1 w-5 rounded-full transition-colors",
+ i <= scene ? "bg-primary" : "bg-muted",
+ )}
/>
))}
</div>
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/IntroVideoScreen.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/IntroVideoScreen.test.tsx
deleted file mode 100644
index cd914bceb7..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/IntroVideoScreen.test.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import { cleanup, fireEvent, render, screen } from "@testing-library/react";
-import { afterEach, expect, it, vi } from "vitest";
-
-vi.mock("@/i18n", () => ({ useT: () => (k: string) => k }));
-
-import { IntroVideoScreen } from "./IntroVideoScreen";
-
-afterEach(cleanup);
-
-it("shows a click-to-play facade and only mounts the heavy iframe on demand", () => {
- render(<IntroVideoScreen onContinue={() => {}} />);
- // Facade first: the heavy YouTube iframe is NOT mounted until the user plays,
- // so the step renders instantly with no loading flash.
- expect(screen.queryByTitle("onboarding.tutorial.title")).toBeNull();
-
- fireEvent.click(screen.getByLabelText("onboarding.tutorial.play"));
-
- const frame = screen.getByTitle("onboarding.tutorial.title") as HTMLIFrameElement;
- expect(frame.tagName).toBe("IFRAME");
- expect(frame.src).toContain("youtube-nocookie.com/embed/FXz1HclXL1g");
- expect(frame.src).toContain("autoplay=1");
-});
-
-it("the primary button advances the flow", () => {
- const onContinue = vi.fn();
- render(<IntroVideoScreen onContinue={onContinue} />);
- fireEvent.click(screen.getByText("onboarding.tutorial.continue"));
- expect(onContinue).toHaveBeenCalledOnce();
-});
-
-it("the skip link also advances the flow", () => {
- const onContinue = vi.fn();
- render(<IntroVideoScreen onContinue={onContinue} />);
- fireEvent.click(screen.getByText("onboarding.tutorial.skip"));
- expect(onContinue).toHaveBeenCalledOnce();
-});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/IntroVideoScreen.tsx b/jarvis/ui/web/frontend/src/components/onboarding/IntroVideoScreen.tsx
deleted file mode 100644
index 1088dc8c82..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/IntroVideoScreen.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { useState } from "react";
-import { Play } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { useT } from "@/i18n";
-
-// The public onboarding walkthrough on YouTube. Embedded via the
-// privacy-enhanced youtube-nocookie domain (no cookies until playback) with
-// rel=0 so "related" videos stay within this channel.
-//
-// A lightweight click-to-play thumbnail facade is shown first: the heavy
-// YouTube player iframe is only mounted once the user presses play. This makes
-// the step render instantly — no black box and no visible "loading" flash while
-// the embed boots — and defers the player module (and any YouTube contact beyond
-// the single static thumbnail) until the user actually chooses to watch.
-const VIDEO_ID = "FXz1HclXL1g";
-const EMBED_SRC = `https://www.youtube-nocookie.com/embed/${VIDEO_ID}?rel=0&autoplay=1`;
-const THUMB_SRC = `https://i.ytimg.com/vi/${VIDEO_ID}/maxresdefault.jpg`;
-const THUMB_FALLBACK = `https://i.ytimg.com/vi/${VIDEO_ID}/hqdefault.jpg`;
-
-/**
- * The onboarding tutorial video, shown as the second screen — right after the
- * RiskGate acknowledgement and before the step flow. Frontend-only and gated by
- * local state in OnboardingGate, so it never mutates onboarding/completed state
- * and cannot reintroduce the "onboarding reappears every restart" bug. Both the
- * primary button and the skip link simply advance to the flow, so a user who
- * does not want to watch is never blocked.
- *
- * The video uses a click-to-play thumbnail facade so the step appears instantly
- * instead of mounting (and visibly loading) the heavy YouTube iframe up front.
- */
-export function IntroVideoScreen({ onContinue }: { onContinue: () => void }) {
- const t = useT();
- const [playing, setPlaying] = useState(false);
-
- return (
- <div className="flex w-full max-w-lg flex-col gap-5 rounded-2xl border border-border bg-card p-8 shadow-2xl">
- <div className="text-center">
- <h1 className="font-display text-xl font-semibold">{t("onboarding.tutorial.title")}</h1>
- <p className="mt-1 text-sm text-muted-foreground">{t("onboarding.tutorial.body")}</p>
- </div>
- <div className="aspect-video w-full overflow-hidden rounded-xl border border-border bg-gradient-to-br from-background to-card">
- {playing ? (
- <iframe
- className="h-full w-full"
- src={EMBED_SRC}
- title={t("onboarding.tutorial.title")}
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
- allowFullScreen
- />
- ) : (
- <button
- type="button"
- onClick={() => setPlaying(true)}
- aria-label={t("onboarding.tutorial.play")}
- className="group relative block h-full w-full"
- >
- <img
- src={THUMB_SRC}
- alt=""
- aria-hidden="true"
- className="h-full w-full object-cover"
- onError={(e) => {
- const img = e.currentTarget;
- if (!img.src.endsWith("hqdefault.jpg")) img.src = THUMB_FALLBACK;
- }}
- />
- <span className="absolute inset-0 flex items-center justify-center bg-scrim/25 transition-colors group-hover:bg-scrim/15">
- <span className="flex h-16 w-16 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform group-hover:scale-110">
- <Play className="h-7 w-7 translate-x-0.5 fill-current" />
- </span>
- </span>
- </button>
- )}
- </div>
- <Button className="w-full" onClick={onContinue}>
- {t("onboarding.tutorial.continue")}
- </Button>
- <button className="text-xs text-muted-foreground underline" onClick={onContinue}>
- {t("onboarding.tutorial.skip")}
- </button>
- </div>
- );
-}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.test.tsx
index 1c6be53bd1..e45a22a79e 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.test.tsx
@@ -1,15 +1,16 @@
-import { cleanup, fireEvent, render, screen, within } from "@testing-library/react";
-import { afterEach, expect, it, vi } from "vitest";
+import { cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react";
+import { afterEach, beforeEach, expect, it, vi } from "vitest";
vi.mock("@/i18n", () => ({ useT: () => (k: string) => k }));
vi.mock("@/components/MascotGigi", () => ({ MascotGigi: () => <div data-testid="gigi" /> }));
-type P = { goNext: () => void; skip: () => void };
+type P = { goNext: () => void; skip: () => void; setSummary: (s: string | null) => void };
const { dbl } = vi.hoisted(() => {
const dbl = (testid: string) => (p: P) => (
<div data-testid={testid}>
<button onClick={p.goNext}>next</button>
<button onClick={p.skip}>skip</button>
+ <button onClick={() => p.setSummary(`sum:${testid}`)}>summarize</button>
</div>
);
return { dbl };
@@ -21,9 +22,24 @@ vi.mock("./steps/WakeWordStep", () => ({ WakeWordStep: dbl("step-wake-word") }))
vi.mock("./steps/ApiKeysStep", () => ({ ApiKeysStep: dbl("step-api-keys") }));
vi.mock("./steps/FinishStep", () => ({ FinishStep: dbl("step-finish") }));
-import { OnboardingFlow, STEP_KEYS } from "./OnboardingFlow";
+import { OnboardingFlow, STEP_KEYS, visibleSteps } from "./OnboardingFlow";
-afterEach(cleanup);
+function stubPlatform(platform: string | "error") {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(() =>
+ platform === "error"
+ ? Promise.reject(new Error("net"))
+ : Promise.resolve({ ok: true, json: () => Promise.resolve({ platform }) }),
+ ),
+ );
+}
+
+beforeEach(() => stubPlatform("darwin"));
+afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+});
function makeOnb(stateOverrides: Record<string, unknown> = {}) {
return {
@@ -47,24 +63,33 @@ function makeOnb(stateOverrides: Record<string, unknown> = {}) {
} as never;
}
-it("renders the Gigi host and the first step", () => {
+it("renders the Gigi host, the register and the first step", () => {
render(<OnboardingFlow onb={makeOnb()} />);
expect(screen.getByTestId("gigi")).toBeDefined();
expect(screen.getByTestId("step-welcome")).toBeDefined();
+ expect(screen.getByTestId("onboarding-step-welcome").getAttribute("aria-current")).toBe("step");
+ // Steps not yet visited cannot be jumped to from the register.
+ expect((screen.getByTestId("onboarding-step-finish") as HTMLButtonElement).disabled).toBe(true);
});
-it("advancing persists the next step and shows it", () => {
+it("advancing persists the next step, shows it, and lets the register go back to a visited step", () => {
const onb = makeOnb();
render(<OnboardingFlow onb={onb} />);
fireEvent.click(within(screen.getByTestId("step-welcome")).getByText("next"));
expect((onb as never as { saveStep: ReturnType<typeof vi.fn> }).saveStep)
.toHaveBeenCalledWith("language", []);
expect(screen.getByTestId("step-language")).toBeDefined();
+ fireEvent.click(screen.getByTestId("onboarding-step-welcome"));
+ expect(screen.getByTestId("step-welcome")).toBeDefined();
+});
+
+it("a step's summary shows under its register entry", () => {
+ render(<OnboardingFlow onb={makeOnb()} />);
+ fireEvent.click(within(screen.getByTestId("step-welcome")).getByText("summarize"));
+ expect(screen.getByTestId("onboarding-step-welcome").textContent).toContain("sum:step-welcome");
});
it("always starts at the first step, ignoring a saved current_step", () => {
- // Every run must walk each step in order. A current_step saved by an earlier
- // (already completed) run must NOT auto-skip the user ahead to the end.
render(<OnboardingFlow onb={makeOnb({ current_step: "finish" })} />);
expect(screen.getByTestId("step-welcome")).toBeDefined();
});
@@ -77,11 +102,21 @@ it("skip accumulates the skipped step", () => {
.toHaveBeenCalledWith("language", ["welcome"]);
});
+it("hides the macOS permissions step on Windows and Linux, keeps it on macOS and when unknown", async () => {
+ const all = ["welcome", "permissions", "finish"];
+ expect(visibleSteps(all, "win32")).toEqual(["welcome", "finish"]);
+ expect(visibleSteps(all, "linux")).toEqual(["welcome", "finish"]);
+ expect(visibleSteps(all, "darwin")).toEqual(all);
+ expect(visibleSteps(all, null)).toEqual(all);
+
+ stubPlatform("win32");
+ render(<OnboardingFlow onb={makeOnb({ steps: all })} />);
+ await waitFor(() => expect(screen.queryByTestId("onboarding-step-permissions")).toBeNull());
+ expect(screen.getByTestId("onboarding-step-finish")).toBeDefined();
+});
+
it("REGISTRY covers exactly the canonical backend steps", () => {
expect(new Set(STEP_KEYS)).toEqual(
- new Set([
- "welcome", "language", "permissions", "wake-word",
- "api-keys", "finish",
- ]),
+ new Set(["welcome", "language", "permissions", "wake-word", "api-keys", "finish"]),
);
});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.tsx b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.tsx
index 57121c98d5..a5d27e3b29 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.tsx
@@ -1,6 +1,7 @@
-import { useMemo, useState } from "react";
+import { useCallback, useEffect, useMemo, useState } from "react";
import { MascotGigi } from "@/components/MascotGigi";
import { useT } from "@/i18n";
+import { cn } from "@/lib/utils";
import type { useOnboarding } from "@/hooks/useOnboarding";
import { WelcomeStep } from "./steps/WelcomeStep";
import { LanguageStep } from "./steps/LanguageStep";
@@ -16,6 +17,14 @@ export interface StepProps {
skip: () => void;
isFirst: boolean;
isLast: boolean;
+ /**
+ * The one line the register shows under this step's name once it is done —
+ * "Deutsch · replies Auto", "OpenRouter", "Hey Nova". Steps report it as
+ * soon as they know it; the register is the progress indicator.
+ */
+ setSummary: (text: string | null) => void;
+ /** Every step's current summary, keyed by step id (the finish step reads it). */
+ summaries: Record<string, string | null>;
}
// Restart batching (2026-07-18): permissions + wake-word sit LAST before
@@ -35,25 +44,69 @@ const REGISTRY: Record<string, (p: StepProps) => JSX.Element> = {
// the silent fallback div instead of a real step.
export const STEP_KEYS = Object.keys(REGISTRY);
+/**
+ * Which backend steps this machine actually needs. The permissions step is
+ * macOS TCC only — on Windows and Linux it used to render a "nothing to do
+ * here" card the user had to click through. Now it is not in the register at
+ * all. Unknown platform (probe failed, still warming) keeps the step: showing
+ * an unnecessary screen is a small cost, hiding a necessary one is not.
+ */
+export function visibleSteps(steps: string[], platform: string | null): string[] {
+ if (platform === "win32" || platform === "linux") {
+ return steps.filter((s) => s !== "permissions");
+ }
+ return steps;
+}
+
+function usePlatform(): string | null {
+ const [platform, setPlatform] = useState<string | null>(null);
+ useEffect(() => {
+ let cancelled = false;
+ (async () => {
+ try {
+ const res = await fetch("/api/permissions/status");
+ if (!res.ok) return;
+ const data = (await res.json()) as { platform?: string };
+ if (!cancelled && typeof data?.platform === "string") setPlatform(data.platform);
+ } catch {
+ // Best-effort: an unreachable probe keeps every step visible.
+ }
+ })();
+ return () => {
+ cancelled = true;
+ };
+ }, []);
+ return platform;
+}
+
+/**
+ * The first-run guide as a full-window stage in the workspace launcher's
+ * editorial language: a header with an eyebrow step counter, a numbered
+ * register on the left that doubles as the progress indicator (each entry
+ * carries a live one-line summary of what was chosen), and the step's own
+ * content on the right, separated by rules rather than nested cards.
+ */
export function OnboardingFlow({
onb,
}: {
onb: ReturnType<typeof useOnboarding>;
}) {
const t = useT();
- const steps = onb.state?.steps ?? ["welcome", "finish"];
+ const platform = usePlatform();
+ const allSteps = onb.state?.steps ?? ["welcome", "finish"];
+ const steps = useMemo(() => visibleSteps(allSteps, platform), [allSteps, platform]);
// Always begin at the first step so every run walks each step in order. We do
// NOT resume to a saved current_step: a user who already finished once would
// otherwise be auto-jumped to the last step, which feels like the flow skipped
// itself.
const [idx, setIdx] = useState(0);
+ const [maxVisited, setMaxVisited] = useState(0);
const [skipped, setSkipped] = useState<string[]>(onb.state?.skipped_steps ?? []);
+ const [summaries, setSummaries] = useState<Record<string, string | null>>({});
- const StepComp = useMemo(
- () => REGISTRY[steps[idx]] ?? ((_: StepProps) => <div>{steps[idx]}</div>),
- [steps, idx],
- );
- const isApiKeysGuide = steps[idx] === "api-keys";
+ const safeIdx = Math.min(idx, steps.length - 1);
+ const stepKey = steps[safeIdx];
+ const StepComp = REGISTRY[stepKey] ?? ((_: StepProps) => <div>{stepKey}</div>);
const advance = (next: number, nextSkipped = skipped) => {
if (next >= steps.length) {
@@ -62,53 +115,128 @@ export function OnboardingFlow({
}
setSkipped(nextSkipped);
setIdx(next);
+ setMaxVisited((m) => Math.max(m, next));
void onb.saveStep(steps[next], nextSkipped);
};
+ const setSummary = useCallback(
+ (text: string | null) => {
+ setSummaries((s) => (s[stepKey] === text ? s : { ...s, [stepKey]: text }));
+ },
+ [stepKey],
+ );
+
const props: StepProps = {
onb,
- goNext: () => advance(idx + 1),
+ goNext: () => advance(safeIdx + 1),
goBack: () => setIdx((i) => Math.max(0, i - 1)),
- skip: () => advance(idx + 1, [...new Set([...skipped, steps[idx]])]),
- isFirst: idx === 0,
- isLast: idx === steps.length - 1,
+ skip: () => advance(safeIdx + 1, [...new Set([...skipped, stepKey])]),
+ isFirst: safeIdx === 0,
+ isLast: safeIdx === steps.length - 1,
+ setSummary,
+ summaries,
};
+ const title = t(`onboarding.steps.${stepKey}.title`);
+ const hint = t(`onboarding.steps.${stepKey}.hint`);
+
return (
<div
- className={`flex max-h-[calc(100vh-2rem)] w-full flex-col gap-6 overflow-y-auto overscroll-contain rounded-2xl border border-border bg-card p-8 shadow-2xl scrollbar-jarvis ${
- isApiKeysGuide ? "max-w-4xl" : "max-w-lg"
- }`}
+ data-testid="onboarding-flow"
+ className="flex h-full min-h-0 flex-col font-display"
>
- <div className="flex items-center justify-between">
- <div
- className="flex gap-1.5"
- role="progressbar"
- aria-label={t("onboarding.progress_label")}
- aria-valuemin={1}
- aria-valuemax={steps.length}
- aria-valuenow={idx + 1}
- >
- {steps.map((s, i) => (
- <span
- key={s}
- aria-hidden="true"
- className={`h-1.5 w-6 rounded-full ${i <= idx ? "bg-primary" : "bg-muted"}`}
- />
- ))}
+ <header className="shrink-0 border-b border-border/70 px-5 py-5 sm:px-8">
+ <div className="mx-auto flex w-full max-w-5xl items-start justify-between gap-6">
+ <div className="min-w-0">
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary/80">
+ {t("onboarding.eyebrow")}
+ <span className="px-2 text-muted-foreground/50">/</span>
+ <span
+ role="progressbar"
+ aria-label={t("onboarding.progress_label")}
+ aria-valuemin={1}
+ aria-valuemax={steps.length}
+ aria-valuenow={safeIdx + 1}
+ className="font-mono tabular-nums"
+ >
+ {t("onboarding.step_progress")
+ .replace("{0}", String(safeIdx + 1).padStart(2, "0"))
+ .replace("{1}", String(steps.length).padStart(2, "0"))}
+ </span>
+ </p>
+ <h1 className="mt-2 text-xl font-semibold tracking-tight text-foreground [text-wrap:balance] sm:text-2xl">
+ {title}
+ </h1>
+ <p className="mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground">
+ {hint}
+ </p>
+ </div>
+ <div className="shrink-0 pt-0.5">
+ <MascotGigi size={44} reactToVoice={false} enableComments={false} />
+ </div>
+ </div>
+ </header>
+
+ <div className="min-h-0 flex-1 overflow-y-auto scrollbar-jarvis">
+ <div className="mx-auto grid w-full max-w-5xl gap-x-10 gap-y-4 px-5 pb-8 pt-5 sm:px-8 lg:grid-cols-[200px_minmax(0,1fr)]">
+ <nav aria-label={t("onboarding.progress_label")} className="min-w-0">
+ <ol
+ className="grid border-b border-border/70 lg:flex lg:flex-col lg:border-b-0 lg:border-r lg:pr-6"
+ style={{ gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))` }}
+ >
+ {steps.map((key, index) => {
+ const selected = index === safeIdx;
+ const enabled = index <= maxVisited;
+ const summary = summaries[key];
+ return (
+ <li key={key}>
+ <button
+ type="button"
+ data-testid={`onboarding-step-${key}`}
+ aria-current={selected ? "step" : undefined}
+ disabled={!enabled}
+ onClick={() => setIdx(index)}
+ className={cn(
+ "group relative w-full min-w-0 px-2 py-3 text-left transition-colors lg:px-0 lg:py-3.5",
+ "disabled:cursor-not-allowed disabled:opacity-35",
+ selected ? "text-foreground" : "text-muted-foreground",
+ )}
+ >
+ <span
+ aria-hidden
+ className={cn(
+ "absolute bottom-[-1px] left-0 right-0 h-0.5 lg:bottom-0 lg:left-auto lg:right-[-25px] lg:top-0 lg:h-auto lg:w-0.5",
+ selected ? "bg-primary" : "bg-transparent",
+ )}
+ />
+ <span className="block font-mono text-[10px] tabular-nums text-muted-foreground/70">
+ {(index + 1).toString().padStart(2, "0")}
+ </span>
+ <span className="mt-1 block truncate text-sm font-medium">
+ {t(`onboarding.steps.${key}.label`)}
+ </span>
+ <span className="mt-0.5 hidden truncate text-[11px] text-muted-foreground lg:block">
+ {summary ?? " "}
+ </span>
+ </button>
+ </li>
+ );
+ })}
+ </ol>
+ </nav>
+
+ <section
+ key={stepKey}
+ className="profile-rise min-w-0 pt-2"
+ aria-labelledby="onboarding-step-title"
+ >
+ <h2 id="onboarding-step-title" className="sr-only">
+ {title}
+ </h2>
+ <StepComp {...props} />
+ </section>
</div>
- <MascotGigi size={48} reactToVoice={false} enableComments={false} />
</div>
- <StepComp {...props} />
- {!props.isFirst && (
- <button
- type="button"
- className="self-start touch-manipulation text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
- onClick={props.goBack}
- >
- {t("onboarding.nav.back")}
- </button>
- )}
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.test.tsx
index 7ddd2d426f..990d3a537c 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.test.tsx
@@ -1,4 +1,4 @@
-import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { cleanup, render, screen, waitFor } from "@testing-library/react";
import { afterEach, expect, it, vi } from "vitest";
vi.mock("./OnboardingFlow", () => ({ OnboardingFlow: () => <div data-testid="flow" /> }));
@@ -57,53 +57,19 @@ it("stays hidden when completed, even with an outdated accepted terms version",
await waitFor(() => expect(screen.queryByRole("dialog")).toBeNull());
});
-it("persists terms acceptance when the risk gate is accepted", async () => {
- const calls: Array<[string, RequestInit | undefined]> = [];
- vi.stubGlobal(
- "fetch",
- vi.fn().mockImplementation((url: string, init?: RequestInit) => {
- calls.push([url, init]);
- return Promise.resolve({
- ok: true,
- json: () => Promise.resolve({ ...base, completed: false, ok: true }),
- });
- }),
- );
+it("renders the step flow directly — no separate risk or video screens", async () => {
+ stub({ ...base, completed: false });
render(<OnboardingGate />);
await waitFor(() => expect(screen.getByRole("dialog")).toBeDefined());
-
- // RiskGate is a lazy chunk now — its controls appear only once it resolves.
- fireEvent.click(await screen.findByRole("checkbox"));
- fireEvent.click(screen.getByRole("button", { name: /continue/i }));
-
- await waitFor(() =>
- expect(
- calls.some(
- ([url, init]) => url === "/api/onboarding/accept-terms" && init?.method === "POST",
- ),
- ).toBe(true),
- );
+ // The flow is a lazy chunk; nothing else stands between the gate and it.
+ expect(await screen.findByTestId("flow")).toBeDefined();
+ expect(document.querySelector("iframe")).toBeNull();
});
-it("shows the tutorial video after the risk gate, then the step flow", async () => {
+it("closes when the flow reports completion", async () => {
stub({ ...base, completed: false });
render(<OnboardingGate />);
- await waitFor(() => expect(screen.getByRole("dialog")).toBeDefined());
-
- // Accept the risk gate (tick the box, then the proceed button). RiskGate is
- // a lazy chunk, so its controls appear only once it resolves.
- fireEvent.click(await screen.findByRole("checkbox"));
- fireEvent.click(screen.getByRole("button", { name: /continue/i }));
-
- // Second screen: the tutorial video, its own lazy chunk. It uses a
- // click-to-play thumbnail facade, so the YouTube embed only mounts once the
- // user presses play.
- fireEvent.click(await screen.findByRole("button", { name: /play the tutorial video/i }));
- const frame = screen.getByTitle(/tour/i) as HTMLIFrameElement;
- expect(frame.src).toContain("youtube-nocookie.com");
-
- // Continue past the video → the step flow (mocked, but still a lazy import)
- // renders.
- fireEvent.click(screen.getByRole("button", { name: /continue/i }));
- expect(await screen.findByTestId("flow")).toBeDefined();
+ await screen.findByTestId("flow");
+ window.dispatchEvent(new CustomEvent("jarvis:onboarding-changed"));
+ await waitFor(() => expect(screen.queryByRole("dialog")).toBeNull());
});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.tsx b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.tsx
index 4e12a5e20f..0a3801343e 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/OnboardingGate.tsx
@@ -3,41 +3,34 @@ import { useOnboarding } from "@/hooks/useOnboarding";
/**
* Code-split: a completed install renders this gate exactly once per mount —
- * a no-op `null` return, forever — yet the risk screen, the intro video and
- * the full six-step flow (with its own step components) used to travel in the
- * entry chunk anyway, on every boot, for every returning user. Split the same
- * way MainView.tsx splits section views: only the gate's own show/hide logic
- * stays static, the screens load on the one boot that actually shows them.
+ * a no-op `null` return, forever — yet the full six-step flow (with its own
+ * step components) used to travel in the entry chunk anyway, on every boot,
+ * for every returning user. Split the same way MainView.tsx splits section
+ * views: only the gate's own show/hide logic stays static, the flow loads on
+ * the one boot that actually shows it.
*/
const OnboardingFlow = lazy(() =>
import("./OnboardingFlow").then((m) => ({ default: m.OnboardingFlow })),
);
-const RiskGate = lazy(() =>
- import("./RiskGate").then((m) => ({ default: m.RiskGate })),
-);
-const IntroVideoScreen = lazy(() =>
- import("./IntroVideoScreen").then((m) => ({ default: m.IntroVideoScreen })),
-);
/**
- * Blocking overlay that shows the onboarding flow until it is completed.
- * Fails open (renders nothing) while loading or on a fetch error so a broken
- * guide never traps the user. `?onboarding=force` forces the flow for
- * non-destructive dev replay.
+ * The first-run stage. It covers the whole window on the app's own ground —
+ * no scrim, no blur, no floating card: on a fresh install there is nothing
+ * behind it worth hinting at, and a dialog over a half-built app looked
+ * exactly like what it was. Fails open (renders nothing) while loading or on
+ * a fetch error so a broken guide never traps the user. `?onboarding=force`
+ * forces the flow for non-destructive dev replay.
+ *
+ * The risk acknowledgement lives INSIDE the flow's first step now (it used to
+ * be a separate screen before a separate video screen before the wizard).
+ * Its acceptance is awaited and persisted there; nothing about
+ * onboarding/completed state changes until the final step, so the
+ * restart-loop bug cannot come back through this path.
*/
export function OnboardingGate() {
const onb = useOnboarding();
- // Risk acknowledgement is gated in local state only — never persisted and
- // never touching onboarding/completed state, so it shows once per fresh open
- // of an unfinished guide and cannot reintroduce the restart-loop bug.
- const [riskAck, setRiskAck] = useState(false);
- // The tutorial video is the second screen — shown after the risk gate and
- // before the step flow. Local-state only (like riskAck), so it never touches
- // onboarding/completed state and re-shows on a fresh open / ?onboarding=force
- // replay. A null mutation guarantees it cannot reintroduce the restart-loop.
- const [videoSeen, setVideoSeen] = useState(false);
- // Set once the user completes the guide (the "Get started" / complete() path
- // dispatches jarvis:onboarding-changed). It dismisses the overlay even under
+ // Set once the user completes the guide (the "Start" / complete() path
+ // dispatches jarvis:onboarding-changed). It dismisses the stage even under
// ?onboarding=force, so a dev replay closes on finish exactly like a real
// first run instead of staying stuck open.
const [dismissed, setDismissed] = useState(false);
@@ -63,32 +56,16 @@ export function OnboardingGate() {
const show = (forced || !onb.state.completed) && !dismissed;
if (!show) return null;
- const showVideo = !videoSeen;
-
return (
<div
role="dialog"
aria-modal="true"
- className="fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-sm"
+ className="fixed inset-0 z-50 bg-background text-foreground"
>
- {/* Fallback is empty: the backdrop above already gives the user
- something to look at while the first-run chunk fetches. */}
+ {/* Fallback is empty: the stage ground is already painted while the
+ first-run chunk fetches. */}
<Suspense fallback={null}>
- {!riskAck ? (
- <RiskGate
- onAccept={() => {
- // Persist the Terms record (fail-open: a warming/erroring backend
- // must never block the gate; the fast-boot path usually answers
- // immediately). The ack itself stays local-state-only by design.
- void onb.acceptTerms().catch(() => undefined);
- setRiskAck(true);
- }}
- />
- ) : showVideo ? (
- <IntroVideoScreen onContinue={() => setVideoSeen(true)} />
- ) : (
- <OnboardingFlow onb={onb} />
- )}
+ <OnboardingFlow onb={onb} />
</Suspense>
</div>
);
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/RiskGate.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/RiskGate.test.tsx
deleted file mode 100644
index 8ff7c72137..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/RiskGate.test.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
-import { afterEach, expect, it, vi } from "vitest";
-
-import { RiskGate } from "./RiskGate";
-
-afterEach(() => {
- cleanup();
- vi.restoreAllMocks();
-});
-
-it("declining posts the quit request and shows the goodbye screen", async () => {
- const calls: Array<[string, RequestInit | undefined]> = [];
- vi.stubGlobal(
- "fetch",
- vi.fn().mockImplementation((url: string, init?: RequestInit) => {
- calls.push([url, init]);
- return Promise.resolve({
- ok: true,
- json: () => Promise.resolve({ ok: true, quitting: true }),
- });
- }),
- );
- const onAccept = vi.fn();
- render(<RiskGate onAccept={onAccept} />);
-
- fireEvent.click(screen.getByRole("button", { name: /decline/i }));
-
- await waitFor(() =>
- expect(
- calls.some(
- ([url, init]) =>
- url === "/api/onboarding/decline-terms" && init?.method === "POST",
- ),
- ).toBe(true),
- );
- expect(screen.getByText(/shutting down/i)).toBeDefined();
- expect(onAccept).not.toHaveBeenCalled();
-});
-
-it("shows the goodbye screen even when the quit request fails", async () => {
- // A warming/erroring backend must not trap the user on the gate: the
- // goodbye state renders either way and the user just closes the window.
- vi.stubGlobal("fetch", vi.fn().mockRejectedValue(new Error("net")));
- render(<RiskGate onAccept={() => undefined} />);
-
- fireEvent.click(screen.getByRole("button", { name: /decline/i }));
-
- await waitFor(() => expect(screen.getByText(/shutting down/i)).toBeDefined());
-});
-
-it("declining needs no checkbox tick; accepting still does", () => {
- vi.stubGlobal(
- "fetch",
- vi.fn().mockResolvedValue({ ok: true, json: () => Promise.resolve({}) }),
- );
- render(<RiskGate onAccept={() => undefined} />);
-
- const decline = screen.getByRole("button", { name: /decline/i }) as HTMLButtonElement;
- const proceed = screen.getByRole("button", { name: /continue/i }) as HTMLButtonElement;
- expect(decline.disabled).toBe(false);
- expect(proceed.disabled).toBe(true);
-});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/RiskGate.tsx b/jarvis/ui/web/frontend/src/components/onboarding/RiskGate.tsx
deleted file mode 100644
index e7015d492c..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/RiskGate.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { useState } from "react";
-import { Button } from "@/components/ui/button";
-import { useT } from "@/i18n";
-
-/**
- * A blocking "use at your own risk" acknowledgement shown once, before the
- * onboarding flow itself (mirrors the trust prompt CLIs like Claude Code show on
- * first run). Frontend-only: it gates the flow via local state and never mutates
- * onboarding/completed state, so it cannot reintroduce the "onboarding reappears
- * every restart" bug. The user must tick the checkbox before continuing.
- *
- * Declining is a real, equal-weight choice (design 2026-07-09): it asks the
- * backend to quit the whole app and renders a terminal goodbye state for the
- * browser surface (the desktop window disappears with the process). Nothing is
- * persisted on decline — the next start shows this gate again.
- */
-export function RiskGate({ onAccept }: { onAccept: () => void }) {
- const t = useT();
- const [accepted, setAccepted] = useState(false);
- const [declined, setDeclined] = useState(false);
- // Full Terms text, fetched lazily on first expand — proceeding through this
- // gate records the acceptance (see OnboardingGate), so the text must be
- // reachable right here.
- const [terms, setTerms] = useState<string | null>(null);
- const [showTerms, setShowTerms] = useState(false);
-
- const toggleTerms = async () => {
- setShowTerms((v) => !v);
- if (terms === null) {
- try {
- const res = await fetch("/api/onboarding/terms");
- if (res.ok) setTerms(((await res.json()) as { text: string }).text);
- else setTerms("");
- } catch {
- setTerms("");
- }
- }
- };
-
- const decline = async () => {
- // Show the goodbye state first — the backend kills the process moments
- // after answering, so this screen is the last thing the browser renders.
- setDeclined(true);
- try {
- await fetch("/api/onboarding/decline-terms", { method: "POST" });
- } catch {
- // Best-effort: a warming/erroring backend cannot block the goodbye
- // screen; the user closes the window either way.
- }
- };
-
- if (declined) {
- return (
- <div className="flex w-full max-w-lg flex-col gap-4 rounded-2xl border border-border bg-card p-8 shadow-2xl">
- <h1 className="font-display text-xl font-semibold">
- {t("onboarding.risk.declined_title")}
- </h1>
- <p className="text-sm leading-relaxed text-muted-foreground">
- {t("onboarding.risk.declined_body")}
- </p>
- </div>
- );
- }
-
- return (
- <div className="flex w-full max-w-lg flex-col gap-5 rounded-2xl border border-primary/40 bg-card p-8 shadow-2xl">
- <div className="flex items-center gap-3">
- <span className="text-2xl" aria-hidden>
- ⚠️
- </span>
- <h1 className="font-display text-xl font-semibold">{t("onboarding.risk.title")}</h1>
- </div>
- <p className="text-sm font-semibold text-foreground">{t("onboarding.risk.lead")}</p>
- <p className="text-sm leading-relaxed text-muted-foreground">{t("onboarding.risk.body")}</p>
- <p className="text-sm leading-relaxed text-muted-foreground">{t("onboarding.risk.liability")}</p>
- <button
- type="button"
- className="self-start text-xs text-muted-foreground underline"
- onClick={() => void toggleTerms()}
- >
- {t("onboarding.risk.view_terms")}
- </button>
- {showTerms && (
- <pre className="max-h-40 overflow-y-auto whitespace-pre-wrap rounded-md border border-border bg-muted/30 p-3 text-xs text-muted-foreground">
- {terms ?? t("onboarding.risk.terms_loading")}
- </pre>
- )}
- <label className="flex items-start gap-2 text-sm">
- <input
- type="checkbox"
- className="mt-1 shrink-0"
- checked={accepted}
- onChange={(e) => setAccepted(e.target.checked)}
- />
- <span>{t("onboarding.risk.accept_label")}</span>
- </label>
- <div className="flex gap-3">
- <Button variant="outline" className="flex-1" onClick={() => void decline()}>
- {t("onboarding.risk.decline")}
- </Button>
- <Button className="flex-1" disabled={!accepted} onClick={() => accepted && onAccept()}>
- {t("onboarding.risk.proceed")}
- </Button>
- </div>
- </div>
- );
-}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/primitives.tsx b/jarvis/ui/web/frontend/src/components/onboarding/primitives.tsx
new file mode 100644
index 0000000000..b0875b34be
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/onboarding/primitives.tsx
@@ -0,0 +1,236 @@
+import { ArrowLeft, ArrowRight, Loader2 } from "lucide-react";
+import type { ReactNode } from "react";
+import { Button, FOCUS_RING, SectionLabel } from "@/components/agentic/controls";
+import { useT } from "@/i18n";
+import { cn } from "@/lib/utils";
+
+/**
+ * The first-run guide speaks the workspace launcher's language: hairlines and
+ * type do the structuring, numbers sit in a mono register, and yellow is
+ * reserved for the choice you made and the one action that moves you on.
+ * These are the handful of shapes every step is built from, so the six
+ * screens read as one document rather than six dialogs.
+ */
+
+/** A labelled block: eyebrow on top, hairline-separated content below. */
+export function StepSection({
+ label,
+ children,
+ className,
+}: {
+ label: string;
+ children: ReactNode;
+ className?: string;
+}) {
+ return (
+ <section className={cn("space-y-3", className)}>
+ <SectionLabel>{label}</SectionLabel>
+ {children}
+ </section>
+ );
+}
+
+/**
+ * A numbered register — the same `01 / 02` list the launcher uses for its
+ * terminal plan. Rows are separated by rules, never boxed.
+ */
+export function Register({
+ items,
+ className,
+}: {
+ items: { key: string; icon?: ReactNode; children: ReactNode }[];
+ className?: string;
+}) {
+ return (
+ <ol className={cn("border-y border-border/70", className)}>
+ {items.map((item, index) => (
+ <li
+ key={item.key}
+ className="grid grid-cols-[2rem_minmax(0,1fr)] items-baseline gap-2 border-b border-border/50 py-2.5 text-sm last:border-b-0"
+ >
+ <span className="font-mono text-[10px] tabular-nums text-muted-foreground/70">
+ {(index + 1).toString().padStart(2, "0")}
+ </span>
+ <span className="flex min-w-0 items-start gap-2.5">
+ {item.icon ? (
+ <span className="mt-0.5 shrink-0 text-muted-foreground" aria-hidden>
+ {item.icon}
+ </span>
+ ) : null}
+ <span className="min-w-0 leading-relaxed">{item.children}</span>
+ </span>
+ </li>
+ ))}
+ </ol>
+ );
+}
+
+/**
+ * A selectable row. Selection is a gold edge and a faint gold wash plus a
+ * small "SELECTED" tag — the launcher's card-selection idiom — so the state
+ * is legible without filling the whole row.
+ */
+export function ChoiceRow({
+ selected,
+ title,
+ body,
+ onSelect,
+ testId,
+}: {
+ selected: boolean;
+ title: string;
+ body: string;
+ onSelect: () => void;
+ testId?: string;
+}) {
+ const t = useT();
+ return (
+ <button
+ type="button"
+ role="radio"
+ aria-checked={selected}
+ data-testid={testId}
+ onClick={onSelect}
+ className={cn(
+ "flex w-full items-start justify-between gap-4 rounded-control border px-4 py-3 text-left transition-colors",
+ FOCUS_RING,
+ selected
+ ? "border-primary/70 bg-primary/[0.04]"
+ : "border-border/70 hover:border-border hover:bg-secondary/40",
+ )}
+ >
+ <span className="min-w-0">
+ <span className="block text-sm font-medium text-foreground">{title}</span>
+ <span className="mt-0.5 block text-[13px] leading-relaxed text-muted-foreground">
+ {body}
+ </span>
+ </span>
+ {selected ? (
+ <span className="shrink-0 pt-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] text-primary">
+ {t("onboarding.wake_word.selected")}
+ </span>
+ ) : null}
+ </button>
+ );
+}
+
+/** A checkbox that reads as one line of a document, not a form control. */
+export function ConsentLine({
+ checked,
+ onChange,
+ children,
+ testId,
+}: {
+ checked: boolean;
+ onChange: (next: boolean) => void;
+ children: ReactNode;
+ testId?: string;
+}) {
+ return (
+ <label className="flex cursor-pointer items-start gap-3 py-1 text-sm leading-relaxed">
+ <input
+ type="checkbox"
+ data-testid={testId}
+ className={cn("mt-1 h-4 w-4 shrink-0 accent-primary", FOCUS_RING)}
+ checked={checked}
+ onChange={(e) => onChange(e.target.checked)}
+ />
+ <span>{children}</span>
+ </label>
+ );
+}
+
+/**
+ * One tone-carrying line: a coloured left edge, no fill, no icon — the
+ * launcher's `Notice`, with a success tone added because a saved key or a
+ * clear microphone are things the guide wants to confirm in place.
+ */
+export function StatusLine({
+ tone,
+ children,
+ testId,
+}: {
+ tone: "ok" | "warning" | "error" | "muted";
+ children: ReactNode;
+ testId?: string;
+}) {
+ return (
+ <p
+ data-testid={testId}
+ className={cn(
+ "border-l-2 py-1 pl-3 text-[13px] leading-relaxed",
+ tone === "ok" && "border-emerald-500/70 text-emerald-700 dark:text-emerald-400",
+ tone === "warning" && "border-amber-500/70 text-amber-700 dark:text-amber-300",
+ tone === "error" && "border-destructive/70 text-destructive",
+ tone === "muted" && "border-border text-muted-foreground",
+ )}
+ >
+ {children}
+ </p>
+ );
+}
+
+export interface FooterAction {
+ label: string;
+ onClick: () => void;
+ disabled?: boolean;
+ busy?: boolean;
+ testId?: string;
+}
+
+/**
+ * The step footer: a rule, Back on the left, the one primary action on the
+ * right, with an optional quiet secondary beside it. Every step ends here so
+ * the eye always knows where "go on" lives.
+ */
+export function StepFooter({
+ onBack,
+ primary,
+ secondary,
+ backLabel,
+ hidePrimaryArrow,
+}: {
+ onBack?: (() => void) | null;
+ primary: FooterAction;
+ secondary?: FooterAction | null;
+ backLabel?: string;
+ hidePrimaryArrow?: boolean;
+}) {
+ const t = useT();
+ return (
+ <footer className="mt-8 flex min-h-10 flex-wrap items-center justify-between gap-3 border-t border-border/70 pt-5">
+ {onBack ? (
+ <Button variant="subtle" onClick={onBack} data-testid="onboarding-back">
+ <ArrowLeft className="h-3.5 w-3.5" />
+ {backLabel ?? t("onboarding.nav.back")}
+ </Button>
+ ) : (
+ <span />
+ )}
+ <div className="flex flex-wrap items-center gap-2">
+ {secondary ? (
+ <Button
+ variant="subtle"
+ onClick={secondary.onClick}
+ disabled={secondary.disabled || secondary.busy}
+ data-testid={secondary.testId}
+ >
+ {secondary.busy && <Loader2 className="h-3.5 w-3.5 animate-spin" />}
+ {secondary.label}
+ </Button>
+ ) : null}
+ <Button
+ variant="primary"
+ className="min-w-36 px-4"
+ onClick={primary.onClick}
+ disabled={primary.disabled || primary.busy}
+ data-testid={primary.testId ?? "onboarding-primary"}
+ >
+ {primary.busy && <Loader2 className="h-3.5 w-3.5 animate-spin" />}
+ {primary.label}
+ {!primary.busy && !hidePrimaryArrow && <ArrowRight className="h-3.5 w-3.5" />}
+ </Button>
+ </div>
+ </footer>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx
index 3b79a2d19a..305ac35567 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.test.tsx
@@ -1,22 +1,81 @@
-import { cleanup, fireEvent, render, screen } from "@testing-library/react";
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
import { afterEach, expect, it, vi } from "vitest";
+import type { ProviderDescriptor } from "@/hooks/useProviders";
vi.mock("@/i18n", () => ({ useT: () => (key: string) => key }));
-import { ApiKeysStep } from "./ApiKeysStep";
+const providersState = vi.hoisted(() => ({
+ providers: [] as unknown[],
+ loading: false,
+ error: null as string | null,
+ refetch: vi.fn(),
+ // Mirrors the real helper's wire shape so the local-path test can assert
+ // the request the backend would see.
+ switchBrainProvider: vi.fn(async (provider: string) => {
+ await fetch("/api/brain/switch", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ provider }),
+ });
+ }),
+}));
+vi.mock("@/hooks/useProviders", () => ({
+ useProviders: () => ({
+ providers: providersState.providers,
+ loading: providersState.loading,
+ error: providersState.error,
+ refetch: providersState.refetch,
+ }),
+ switchBrainProvider: providersState.switchBrainProvider,
+}));
+// The real form is exercised by its own tests; here it is a probe that
+// reports which slot it was mounted for and lets a test "save" a key.
+vi.mock("@/components/ApiKeyForm", () => ({
+ ApiKeyForm: (p: { secretKey: string; onSavedActivate?: () => void }) => (
+ <div data-testid={`form-${p.secretKey}`}>
+ <button onClick={() => p.onSavedActivate?.()}>saved</button>
+ </div>
+ ),
+}));
+
+import { ApiKeysStep, startableProviders } from "./ApiKeysStep";
afterEach(() => {
cleanup();
vi.unstubAllGlobals();
+ providersState.providers = [];
+ providersState.loading = false;
+ providersState.error = null;
+ providersState.refetch.mockClear();
+ providersState.switchBrainProvider.mockClear();
});
+function provider(overrides: Partial<ProviderDescriptor>): ProviderDescriptor {
+ return {
+ id: "x",
+ label: "X",
+ tier: "brain",
+ auth_mode: "api_key",
+ secret_keys: ["X_API_KEY"],
+ secrets_set: { X_API_KEY: false },
+ dashboard_url: "https://x.example/keys",
+ login_cli: null,
+ install_hint: null,
+ credential_path_hint: null,
+ configured: false,
+ active: false,
+ cli_installed: null,
+ credential_help: null,
+ signup_url: null,
+ billing: "api",
+ ...overrides,
+ } as ProviderDescriptor;
+}
+
type ProbeShape = { source: string; models: { id: string }[] } | null;
-/**
- * Stub fetch for the local-path probe (+ the brain switch and the engine pin).
- * `null` = network error.
- */
-function stubFetch(probe: ProbeShape, { voiceModeOk = true } = {}) {
+/** Stub fetch for the local-path probe (+ the brain switch and the engine pin). */
+function stubFetch(probe: ProbeShape) {
const calls: { url: string; init?: RequestInit }[] = [];
vi.stubGlobal(
"fetch",
@@ -26,16 +85,7 @@ function stubFetch(probe: ProbeShape, { voiceModeOk = true } = {}) {
if (probe === null) throw new Error("network down");
return { ok: true, json: async () => probe } as Response;
}
- if (url === "/api/brain/switch") {
- return { ok: true, json: async () => ({ ok: true }) } as Response;
- }
- if (url === "/api/settings/voice-mode") {
- if (!voiceModeOk) {
- return {
- ok: false,
- text: async () => "engine pin refused",
- } as Response;
- }
+ if (url === "/api/brain/switch" || url === "/api/settings/voice-mode") {
return { ok: true, json: async () => ({ ok: true }) } as Response;
}
throw new Error(`unexpected fetch: ${url}`);
@@ -52,126 +102,101 @@ function renderStep(overrides: Record<string, unknown> = {}) {
skip: vi.fn(),
isFirst: false,
isLast: false,
+ setSummary: vi.fn(),
+ summaries: {},
...overrides,
};
render(<ApiKeysStep {...props} />);
return props;
}
-it("shows the real API Keys view with the navigation and voice-mode switch marked", () => {
+it("startableProviders keeps key-based brain providers, recommended first", () => {
+ const list = startableProviders([
+ provider({ id: "b", label: "B" }),
+ provider({ id: "tts", tier: "tts" }),
+ provider({ id: "cli", auth_mode: "codex" }),
+ provider({ id: "a", label: "A", recommended: true }),
+ provider({ id: "nokey", secret_keys: [] }),
+ ]);
+ expect(list.map((p) => p.id)).toEqual(["a", "b"]);
+});
+
+it("renders the catalog as a register, opens the first row's form, and lets a saved key continue", async () => {
+ providersState.providers = [
+ provider({ id: "openrouter", label: "OpenRouter", recommended: true, secret_keys: ["OPENROUTER_API_KEY"], secrets_set: { OPENROUTER_API_KEY: false } }),
+ provider({ id: "b", label: "B" }),
+ ];
stubFetch(null);
- renderStep();
+ const props = renderStep();
- const screenshot = screen.getByRole("img", {
- name: "onboarding.api_keys.screenshot_alt",
- });
- expect(screenshot.getAttribute("src")).toBe(
- "/onboarding/api-keys-realtime-guide.png",
+ expect(screen.getByTestId("onboarding-provider-openrouter")).toBeDefined();
+ expect(screen.getByTestId("form-OPENROUTER_API_KEY")).toBeDefined();
+ expect(screen.queryByTestId("form-X_API_KEY")).toBeNull();
+ const next = screen.getByTestId("onboarding-primary") as HTMLButtonElement;
+ expect(next.disabled).toBe(true);
+ expect(screen.getByTestId("onboarding-keys-later")).toBeDefined();
+
+ // Saving through the form makes that provider the active brain when none is.
+ fireEvent.click(screen.getByText("saved"));
+ await waitFor(() =>
+ expect(providersState.switchBrainProvider).toHaveBeenCalledWith("openrouter"),
);
- expect(screen.getByTestId("api-keys-marker")).toBeDefined();
- expect(screen.getByTestId("voice-mode-marker")).toBeDefined();
- expect(screen.getByText("onboarding.api_keys.voice_mode_title")).toBeDefined();
- expect(screen.getByText("onboarding.api_keys.realtime_label")).toBeDefined();
- expect(screen.getByText("onboarding.api_keys.pipeline_label")).toBeDefined();
+
+ // The catalog refresh now reports the key — Continue opens up.
+ providersState.providers = [
+ provider({ id: "openrouter", label: "OpenRouter", recommended: true, secret_keys: ["OPENROUTER_API_KEY"], secrets_set: { OPENROUTER_API_KEY: true }, configured: true }),
+ ];
+ cleanup();
+ const again = renderStep();
+ expect((screen.getByTestId("onboarding-primary") as HTMLButtonElement).disabled).toBe(false);
+ expect(again.setSummary).toHaveBeenLastCalledWith("OpenRouter");
+ expect(props.skip).not.toHaveBeenCalled();
});
-it("keeps credential entry out of the onboarding modal", async () => {
+it("'later' skips honestly, and the summary stays empty", async () => {
+ providersState.providers = [provider({ id: "b", label: "B" })];
stubFetch(null);
- renderStep();
+ const props = renderStep();
await screen.findByText("onboarding.api_keys.local_missing");
-
- // No key can ever be typed here — that is the step's security contract.
- expect(screen.queryByRole("textbox")).toBeNull();
- // The only link the step may carry is the Ollama install pointer (no
- // provider dashboards, no key pages).
- for (const link of screen.queryAllByRole("link")) {
- expect(link.getAttribute("href")).toBe("https://ollama.com/download");
- }
+ fireEvent.click(screen.getByTestId("onboarding-keys-later"));
+ expect(props.skip).toHaveBeenCalledTimes(1);
+ expect(props.setSummary).toHaveBeenLastCalledWith(null);
});
-it("offers one clear action to continue onboarding", async () => {
+it("a failed catalog load says so and still offers the local path", async () => {
+ providersState.error = "HTTP 503";
stubFetch(null);
- const props = renderStep();
+ renderStep();
+ expect(screen.getByText("onboarding.api_keys.load_failed")).toBeDefined();
await screen.findByText("onboarding.api_keys.local_missing");
-
- const cont = screen.getByRole("button", { name: "onboarding.api_keys.continue" });
- fireEvent.click(cont);
- expect(props.goNext).toHaveBeenCalledTimes(1);
- expect(props.skip).not.toHaveBeenCalled();
});
-it("probes through the backend and offers one-click local activation", async () => {
+it("probes through the backend, activates local, pins pipeline, and unlocks Continue", async () => {
const calls = stubFetch({ source: "live", models: [{ id: "qwen3.5:9b" }] });
- renderStep();
+ const props = renderStep();
await screen.findByText("onboarding.api_keys.local_detected");
- const useLocal = screen.getByRole("button", {
- name: "onboarding.api_keys.local_use_button",
- });
- fireEvent.click(useLocal);
+ expect((screen.getByTestId("onboarding-primary") as HTMLButtonElement).disabled).toBe(true);
+ fireEvent.click(screen.getByRole("button", { name: "onboarding.api_keys.local_use_button" }));
- await screen.findByText("onboarding.api_keys.local_active");
+ await screen.findByTestId("local-active");
const switchCall = calls.find((c) => c.url === "/api/brain/switch");
- expect(switchCall).toBeDefined();
- expect(JSON.parse(String(switchCall?.init?.body))).toMatchObject({
- provider: "ollama",
- });
+ expect(JSON.parse(String(switchCall?.init?.body))).toMatchObject({ provider: "ollama" });
+ const modeCall = calls.find((c) => c.url === "/api/settings/voice-mode");
+ expect(modeCall?.init?.method).toBe("PUT");
+ expect(JSON.parse(String(modeCall?.init?.body))).toMatchObject({ mode: "pipeline" });
// The probe went through the backend catalog route — never a
// browser-direct localhost:11434 call.
expect(calls[0].url).toBe("/api/providers/ollama/models");
-});
-
-it("pins the pipeline engine so the local brain is actually used", async () => {
- const calls = stubFetch({ source: "live", models: [{ id: "qwen3.5:9b" }] });
- renderStep();
-
- await screen.findByText("onboarding.api_keys.local_detected");
- fireEvent.click(
- screen.getByRole("button", { name: "onboarding.api_keys.local_use_button" }),
- );
- await screen.findByText("onboarding.api_keys.local_active");
-
- // Realtime replaces STT+Brain+TTS and never reads `[brain].primary`, so
- // activating the local brain without pinning Pipeline changes nothing the
- // user can hear — and `[voice].mode` defaults to realtime.
- const modeCall = calls.find((c) => c.url === "/api/settings/voice-mode");
- expect(modeCall?.init?.method).toBe("PUT");
- expect(JSON.parse(String(modeCall?.init?.body))).toMatchObject({
- mode: "pipeline",
- persist: true,
- });
-});
+ expect(window.localStorage.getItem("jarvis.providers.localMode")).toBe("1");
-it("reports a refused engine pin instead of claiming the local path is live", async () => {
- stubFetch({ source: "live", models: [{ id: "qwen3.5:9b" }] }, { voiceModeOk: false });
- renderStep();
-
- await screen.findByText("onboarding.api_keys.local_detected");
- fireEvent.click(
- screen.getByRole("button", { name: "onboarding.api_keys.local_use_button" }),
- );
-
- await screen.findByText("engine pin refused");
- expect(screen.queryByText("onboarding.api_keys.local_active")).toBeNull();
+ expect((screen.getByTestId("onboarding-primary") as HTMLButtonElement).disabled).toBe(false);
+ expect(props.setSummary).toHaveBeenLastCalledWith("onboarding.api_keys.summary_local");
});
-it("tells a running-but-empty Ollama to pull a model first", async () => {
+it("with Ollama running but empty, explains the missing model and shows no activate button", async () => {
stubFetch({ source: "live", models: [] });
renderStep();
-
await screen.findByText("onboarding.api_keys.local_detected_empty");
- expect(
- screen.queryByRole("button", { name: "onboarding.api_keys.local_use_button" }),
- ).toBeNull();
-});
-
-it("shows the honest install pointer when no local server answers", async () => {
- stubFetch({ source: "static", models: [] });
- renderStep();
-
- await screen.findByText("onboarding.api_keys.local_missing");
- const link = screen.getByRole("link", {
- name: "onboarding.api_keys.local_missing_link",
- });
- expect(link.getAttribute("href")).toBe("https://ollama.com/download");
+ expect(screen.queryByRole("button", { name: "onboarding.api_keys.local_use_button" })).toBeNull();
});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx
index b3b124ae4b..40840bae0c 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx
@@ -1,13 +1,58 @@
-import { useEffect, useState } from "react";
-import { CheckCircle2, HardDrive, KeyRound, Radio, Waypoints } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { switchBrainProvider } from "@/hooks/useProviders";
+import { useEffect, useMemo, useState } from "react";
+import { ChevronDown, ExternalLink } from "lucide-react";
+import { ApiKeyForm } from "@/components/ApiKeyForm";
+import { Button, FOCUS_RING } from "@/components/agentic/controls";
+import {
+ switchBrainProvider,
+ useProviders,
+ type ProviderDescriptor,
+} from "@/hooks/useProviders";
import { setLocalMode } from "@/lib/localMode";
import { putVoiceMode } from "@/lib/voiceEngineMode";
import { useT } from "@/i18n";
+import { cn } from "@/lib/utils";
import type { StepProps } from "../OnboardingFlow";
+import { StatusLine, StepFooter, StepSection } from "../primitives";
-const GUIDE_SCREENSHOT = "/onboarding/api-keys-realtime-guide.png";
+/** How many providers are open before the "show more" fold. */
+const FOLD_AFTER = 4;
+
+/** The one slot a card asks for; providers with several keys expose the first. */
+function primarySlot(p: ProviderDescriptor): string | null {
+ return p.secret_keys[0] ?? null;
+}
+
+function slotConfigured(p: ProviderDescriptor): boolean {
+ const slot = primarySlot(p);
+ if (!slot) return p.configured;
+ return Boolean(p.secrets_set[slot]);
+}
+
+function slotEffective(p: ProviderDescriptor): boolean {
+ const slot = primarySlot(p);
+ if (!slot) return p.configured;
+ return Boolean(p.secrets_effective?.[slot] ?? p.secrets_set[slot]);
+}
+
+/**
+ * The brain providers a first-run user can start with: anything that takes a
+ * pasted key and can be the primary brain. Recommended ones first, then
+ * whatever already has a key, then the rest in catalog order. Exported for
+ * tests.
+ */
+export function startableProviders(providers: ProviderDescriptor[]): ProviderDescriptor[] {
+ return providers
+ .filter((p) => p.tier === "brain" && p.auth_mode === "api_key" && p.brain_switchable !== false)
+ .filter((p) => (p.secret_keys?.length ?? 0) > 0)
+ .sort((a, b) => {
+ const ra = a.recommended ? 0 : 1;
+ const rb = b.recommended ? 0 : 1;
+ if (ra !== rb) return ra - rb;
+ const ca = slotConfigured(a) ? 0 : 1;
+ const cb = slotConfigured(b) ? 0 : 1;
+ return ca - cb;
+ });
+}
/**
* First-sixty-seconds local path (maintainer amendment 2026-07-25): a
@@ -16,7 +61,7 @@ const GUIDE_SCREENSHOT = "/onboarding/api-keys-realtime-guide.png";
* backend catalog route (never a browser-direct localhost:11434 call, which
* CORS would block anyway) and runs once on step mount only (AP-26).
*/
-function LocalPathCard() {
+function LocalPath({ onActivated }: { onActivated: () => void }) {
const t = useT();
const [probe, setProbe] = useState<"checking" | "reachable" | "empty" | "unreachable">(
"checking",
@@ -60,10 +105,10 @@ function LocalPathCard() {
// Somebody who picks the local path here lands in a provider console
// whose cards are almost entirely hosted accounts they just declined.
// Local Mode opens it on the handful that need no key. A view preference,
- // reversible with one click on the switch in that view's header — never a
- // state the user has to hunt for a way out of.
+ // reversible with one click on the switch in that view's header.
setLocalMode(true);
setActive(true);
+ onActivated();
} catch (e) {
setError(e instanceof Error ? e.message : String(e));
} finally {
@@ -72,171 +117,243 @@ function LocalPathCard() {
}
return (
- <section className="rounded-xl border border-border bg-muted/30 p-4">
- <div className="mb-2 flex items-center gap-2 text-sm font-semibold">
- <HardDrive aria-hidden="true" className="h-4 w-4 text-primary" />
- {t("onboarding.api_keys.local_title")}
- </div>
- {probe === "checking" && (
- <p className="text-xs leading-relaxed text-muted-foreground">
- {t("onboarding.api_keys.local_checking")}
- </p>
- )}
- {probe === "reachable" && (
- <div className="space-y-2">
- <p className="text-xs leading-relaxed text-muted-foreground">
- {t("onboarding.api_keys.local_detected")}
+ <StepSection label={t("onboarding.api_keys.local_label")}>
+ <div className="flex flex-wrap items-start justify-between gap-3 border-y border-border/70 py-3">
+ <div className="min-w-0 space-y-1">
+ <p className="text-sm font-medium text-foreground">
+ {t("onboarding.api_keys.local_title")}
</p>
- {active ? (
- <p className="flex items-center gap-2 text-xs font-medium text-emerald-600">
- <CheckCircle2 aria-hidden="true" className="h-4 w-4 shrink-0" />
+ {probe === "checking" && (
+ <p className="text-[13px] text-muted-foreground">
+ {t("onboarding.api_keys.local_checking")}
+ </p>
+ )}
+ {probe === "reachable" && !active && (
+ <p className="text-[13px] leading-relaxed text-muted-foreground">
+ {t("onboarding.api_keys.local_detected")}
+ </p>
+ )}
+ {probe === "reachable" && active && (
+ <StatusLine tone="ok" testId="local-active">
{t("onboarding.api_keys.local_active")}
+ </StatusLine>
+ )}
+ {probe === "empty" && (
+ <p className="text-[13px] leading-relaxed text-muted-foreground">
+ {t("onboarding.api_keys.local_detected_empty")}
+ </p>
+ )}
+ {probe === "unreachable" && (
+ <p className="text-[13px] leading-relaxed text-muted-foreground">
+ {t("onboarding.api_keys.local_missing")}{" "}
+ <a
+ href="https://ollama.com/download"
+ target="_blank"
+ rel="noreferrer"
+ className="inline-flex items-center gap-1 text-primary underline-offset-4 hover:underline"
+ >
+ {t("onboarding.api_keys.local_missing_link")}
+ <ExternalLink className="h-3 w-3" />
+ </a>
</p>
- ) : (
- <Button size="sm" variant="secondary" onClick={useLocal} disabled={activating}>
- {t("onboarding.api_keys.local_use_button")}
- </Button>
)}
- {error && <p className="text-xs text-destructive">{error}</p>}
+ {error && <StatusLine tone="error">{error}</StatusLine>}
</div>
- )}
- {probe === "empty" && (
- <p className="text-xs leading-relaxed text-muted-foreground">
- {t("onboarding.api_keys.local_detected_empty")}
- </p>
- )}
- {probe === "unreachable" && (
- <p className="text-xs leading-relaxed text-muted-foreground">
- {t("onboarding.api_keys.local_missing")}{" "}
- <a
- href="https://ollama.com/download"
- target="_blank"
- rel="noreferrer"
- className="font-medium text-primary underline-offset-2 hover:underline"
- >
- {t("onboarding.api_keys.local_missing_link")}
- </a>
- </p>
- )}
- </section>
+ {probe === "reachable" && !active && (
+ <Button variant="quiet" onClick={() => void useLocal()} disabled={activating}>
+ {t("onboarding.api_keys.local_use_button")}
+ </Button>
+ )}
+ </div>
+ </StepSection>
);
}
/**
- * Introduces the credential path without embedding the full provider console in
- * a first-run modal. The screenshot is captured from the real API Keys view;
- * percentage-based markers stay aligned when the image scales down.
+ * Real key entry on the first run. Each provider is a row of a hairline
+ * register — number, name, a "Recommended" tag where the catalog says so, and
+ * a status word. Opening a row reveals the same `ApiKeyForm` the API Keys
+ * view uses (format recognition, saved state, dashboard link), so what the
+ * user learns here is exactly what they will find later. Saving the first
+ * key also makes that provider the active brain when none is yet — the
+ * point of this step is that chat works the moment the guide ends.
+ *
+ * The list is driven by the backend catalog, so a catalog with one provider
+ * renders one row and nothing here changes.
*/
-export function ApiKeysStep({ goNext }: StepProps) {
+export function ApiKeysStep({ goNext, goBack, skip, setSummary }: StepProps) {
const t = useT();
+ const { providers, loading, error, refetch } = useProviders();
+ const [open, setOpen] = useState<string | null>(null);
+ const [expanded, setExpanded] = useState(false);
+ const [localActive, setLocalActive] = useState(false);
- return (
- <div className="flex flex-col gap-5">
- <div className="flex items-start gap-3">
- <div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary">
- <KeyRound aria-hidden="true" className="h-5 w-5" />
- </div>
- <div className="min-w-0">
- <h2 className="mb-1 font-display text-xl font-semibold text-balance">
- {t("onboarding.api_keys.title")}
- </h2>
- <p className="text-sm leading-relaxed text-muted-foreground">
- {t("onboarding.api_keys.body")}
- </p>
- </div>
- </div>
+ const startable = useMemo(() => startableProviders(providers), [providers]);
+ const visible = expanded ? startable : startable.slice(0, FOLD_AFTER);
+ const hidden = startable.length - visible.length;
+
+ const configured = startable.filter(slotEffective);
+ const hasKey = configured.length > 0;
+
+ useEffect(() => {
+ if (hasKey) {
+ setSummary(configured.map((p) => p.label).join(" · "));
+ } else if (localActive) {
+ setSummary(t("onboarding.api_keys.summary_local"));
+ } else {
+ setSummary(null);
+ }
+ // configured is derived from startable; its labels are what we render.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [hasKey, localActive, configured.map((p) => p.id).join(","), setSummary, t]);
+
+ // Open the first row by default so a fresh install shows an input, not a
+ // list of closed doors. Once anything is configured, everything stays shut.
+ useEffect(() => {
+ if (open === null && startable.length > 0 && !hasKey) setOpen(startable[0].id);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [startable.length, hasKey]);
+
+ const activateIfNone = (p: ProviderDescriptor) => {
+ const anyActive = startable.some((q) => q.active);
+ if (anyActive) return;
+ void switchBrainProvider(p.id)
+ .then(() => refetch())
+ .catch(() => {
+ // The key is saved either way; the provider console remains the
+ // recovery path for choosing the active brain.
+ });
+ };
+
+ const canContinue = hasKey || localActive;
- <figure className="overflow-hidden rounded-xl border border-border bg-background shadow-sm">
- <div className="relative aspect-[1.96/1] overflow-hidden bg-muted">
- <img
- src={GUIDE_SCREENSHOT}
- alt={t("onboarding.api_keys.screenshot_alt")}
- width={2560}
- height={1305}
- className="h-full w-full object-cover"
- decoding="async"
- draggable={false}
- />
-
- <div
- data-testid="api-keys-marker"
- aria-hidden="true"
- className="pointer-events-none absolute left-[0.3%] top-[49.5%] h-[3.1%] w-[10.5%] rounded-md border-2 border-primary bg-primary/10 shadow-[0_0_0_3px_rgba(231,196,110,0.18)]"
- />
- <span
- aria-hidden="true"
- className="pointer-events-none absolute left-[10.1%] top-[48.5%] flex h-6 w-6 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground shadow-lg"
+ return (
+ <div className="space-y-8">
+ <StepSection label={t("onboarding.api_keys.providers_label")}>
+ {loading && startable.length === 0 ? (
+ <p className="text-[13px] text-muted-foreground">{t("onboarding.api_keys.loading")}</p>
+ ) : error && startable.length === 0 ? (
+ <StatusLine tone="warning">{t("onboarding.api_keys.load_failed")}</StatusLine>
+ ) : (
+ <ol className="border-y border-border/70" data-testid="onboarding-provider-list">
+ {visible.map((p, index) => {
+ const isOpen = open === p.id;
+ const slot = primarySlot(p);
+ const saved = slotConfigured(p);
+ const effective = slotEffective(p);
+ return (
+ <li key={p.id} className="border-b border-border/50 last:border-b-0">
+ <button
+ type="button"
+ aria-expanded={isOpen}
+ data-testid={`onboarding-provider-${p.id}`}
+ onClick={() => setOpen(isOpen ? null : p.id)}
+ className={cn(
+ "grid w-full grid-cols-[2rem_minmax(0,1fr)_auto_1rem] items-center gap-2 py-3 text-left",
+ FOCUS_RING,
+ )}
+ >
+ <span className="font-mono text-[10px] tabular-nums text-muted-foreground/70">
+ {(index + 1).toString().padStart(2, "0")}
+ </span>
+ <span className="flex min-w-0 flex-wrap items-baseline gap-x-2.5 gap-y-0.5">
+ <span className="text-sm font-medium text-foreground">{p.label}</span>
+ {p.recommended && (
+ <span className="text-[10px] font-semibold uppercase tracking-[0.14em] text-primary">
+ {t("onboarding.api_keys.recommended")}
+ </span>
+ )}
+ </span>
+ <span className="flex items-center gap-2 font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground">
+ <span
+ aria-hidden
+ className={cn(
+ "h-[7px] w-[7px] rounded-full",
+ effective ? "bg-emerald-500" : "bg-muted-foreground/40",
+ )}
+ />
+ {p.active
+ ? t("onboarding.api_keys.active")
+ : effective
+ ? t("onboarding.api_keys.configured")
+ : t("onboarding.api_keys.not_configured")}
+ </span>
+ <ChevronDown
+ aria-hidden
+ className={cn(
+ "h-3.5 w-3.5 text-muted-foreground transition-transform",
+ isOpen && "rotate-180",
+ )}
+ />
+ </button>
+ {isOpen && slot && (
+ <div className="space-y-2 pb-4 pl-10 pr-2">
+ <ApiKeyForm
+ secretKey={slot}
+ dashboardUrl={p.dashboard_url}
+ configured={saved}
+ effectiveConfigured={effective}
+ credentialHelp={p.credential_help}
+ coveredNote={p.credential_note ?? null}
+ sharedWith={p.secret_shared_with?.[slot] ?? []}
+ onChanged={() => void refetch()}
+ onSavedActivate={() => activateIfNone(p)}
+ />
+ </div>
+ )}
+ </li>
+ );
+ })}
+ </ol>
+ )}
+ {hidden > 0 && !expanded && (
+ <button
+ type="button"
+ className="text-[13px] text-muted-foreground underline underline-offset-4 hover:text-foreground"
+ onClick={() => setExpanded(true)}
>
- 1
- </span>
-
- <div
- data-testid="voice-mode-marker"
- aria-hidden="true"
- className="pointer-events-none absolute left-[84.8%] top-[4.3%] h-[3.2%] w-[14.4%] rounded-md border-2 border-primary bg-primary/10 shadow-[0_0_0_3px_rgba(231,196,110,0.18)]"
- />
- <span
- aria-hidden="true"
- className="pointer-events-none absolute left-[84%] top-[3.5%] flex h-6 w-6 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground shadow-lg"
+ {t("onboarding.api_keys.show_more").replace("{0}", String(hidden))}
+ </button>
+ )}
+ {expanded && startable.length > FOLD_AFTER && (
+ <button
+ type="button"
+ className="text-[13px] text-muted-foreground underline underline-offset-4 hover:text-foreground"
+ onClick={() => setExpanded(false)}
>
- 2
- </span>
- </div>
- </figure>
-
- <div className="grid gap-3 sm:grid-cols-2">
- <section className="rounded-xl border border-border bg-muted/30 p-4">
- <div className="mb-2 flex items-center gap-2 text-sm font-semibold">
- <span className="flex h-6 w-6 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground">
- 1
- </span>
- {t("onboarding.api_keys.api_location_title")}
- </div>
- <p className="text-xs leading-relaxed text-muted-foreground">
- {t("onboarding.api_keys.api_location_body")}
- </p>
- </section>
-
- <section className="rounded-xl border border-primary/40 bg-primary/5 p-4">
- <div className="mb-2 flex items-center gap-2 text-sm font-semibold">
- <span className="flex h-6 w-6 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground">
- 2
- </span>
- {t("onboarding.api_keys.voice_mode_title")}
- </div>
- <div className="space-y-2 text-xs leading-relaxed text-muted-foreground">
- <p className="flex items-start gap-2">
- <Waypoints aria-hidden="true" className="mt-0.5 h-3.5 w-3.5 shrink-0 text-primary" />
- <span>
- <strong className="font-semibold text-foreground">
- {t("onboarding.api_keys.pipeline_label")}
- </strong>{" "}
- {t("onboarding.api_keys.pipeline_body")}
- </span>
- </p>
- <p className="flex items-start gap-2">
- <Radio aria-hidden="true" className="mt-0.5 h-3.5 w-3.5 shrink-0 text-primary" />
- <span>
- <strong className="font-semibold text-foreground">
- {t("onboarding.api_keys.realtime_label")}
- </strong>{" "}
- {t("onboarding.api_keys.realtime_body")}
- </span>
- </p>
- </div>
- </section>
- </div>
+ {t("onboarding.api_keys.show_less")}
+ </button>
+ )}
+ </StepSection>
- <LocalPathCard />
+ <LocalPath onActivated={() => setLocalActive(true)} />
- <p className="flex items-start gap-2 rounded-lg bg-emerald-500/10 px-3 py-2.5 text-xs leading-relaxed text-emerald-600">
- <CheckCircle2 aria-hidden="true" className="mt-0.5 h-4 w-4 shrink-0" />
+ <p className="text-[13px] leading-relaxed text-muted-foreground">
{t("onboarding.api_keys.security_note")}
</p>
- <Button className="w-full" onClick={goNext}>
- {t("onboarding.api_keys.continue")}
- </Button>
+ <StepFooter
+ onBack={goBack}
+ primary={{
+ label: t("onboarding.nav.next"),
+ onClick: goNext,
+ disabled: !canContinue,
+ }}
+ secondary={
+ canContinue
+ ? null
+ : {
+ label: t("onboarding.api_keys.later"),
+ onClick: skip,
+ testId: "onboarding-keys-later",
+ }
+ }
+ />
+ {!canContinue && (
+ <p className="mt-2 text-right text-[11px] text-muted-foreground">
+ {t("onboarding.api_keys.later_hint")}
+ </p>
+ )}
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.test.tsx
index a69615f029..c05d123a4c 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.test.tsx
@@ -3,8 +3,8 @@ import { afterEach, beforeEach, expect, it, vi } from "vitest";
vi.mock("@/i18n", () => ({ useT: () => (k: string) => k }));
import { FinishStep } from "./FinishStep";
-// Default stub: capability probe answers "unsupported" so the legacy tests
-// exercise the step without the autostart toggle.
+// Default stub: capability probe answers "unsupported" so the tests exercise
+// the step without the autostart toggle.
beforeEach(() => {
vi.stubGlobal(
"fetch",
@@ -19,29 +19,63 @@ afterEach(() => {
vi.restoreAllMocks();
});
-it("calls goNext (= complete) on the start CTA", () => {
- const goNext = vi.fn();
- render(<FinishStep onb={{ state: { skipped_steps: [] } } as never} goNext={goNext} goBack={vi.fn()} skip={vi.fn()} isFirst={false} isLast />);
- fireEvent.click(screen.getByRole("button", { name: "onboarding.finish.start_cta" }));
- expect(goNext).toHaveBeenCalled();
+const STEPS = ["welcome", "language", "api-keys", "permissions", "wake-word", "finish"];
+
+function props(overrides: Record<string, unknown> = {}) {
+ return {
+ onb: {
+ state: { skipped_steps: [], steps: STEPS },
+ complete: vi.fn().mockResolvedValue(undefined),
+ } as never,
+ goNext: vi.fn(),
+ goBack: vi.fn(),
+ skip: vi.fn(),
+ isFirst: false,
+ isLast: true,
+ setSummary: vi.fn(),
+ summaries: { language: "Deutsch · Auto", "api-keys": "OpenRouter", "wake-word": "Hey Nova" },
+ ...overrides,
+ };
+}
+
+it("awaits complete() on the start CTA", async () => {
+ const p = props();
+ render(<FinishStep {...p} />);
+ fireEvent.click(screen.getByTestId("onboarding-start"));
+ await waitFor(() =>
+ expect((p.onb as never as { complete: ReturnType<typeof vi.fn> }).complete).toHaveBeenCalled(),
+ );
});
-it("lists skipped steps", () => {
- render(<FinishStep onb={{ state: { skipped_steps: ["api-keys", "mic-test"] } } as never} goNext={vi.fn()} goBack={vi.fn()} skip={vi.fn()} isFirst={false} isLast />);
- expect(screen.getByText("api-keys")).toBeDefined();
- expect(screen.getByText("mic-test")).toBeDefined();
+it("a failed completion shows the error and re-enables the button", async () => {
+ const p = props({
+ onb: {
+ state: { skipped_steps: [], steps: STEPS },
+ complete: vi.fn().mockRejectedValue(new Error("HTTP 500")),
+ } as never,
+ });
+ render(<FinishStep {...p} />);
+ fireEvent.click(screen.getByTestId("onboarding-start"));
+ await waitFor(() => expect(screen.getByText("onboarding.finish.start_failed")).toBeDefined());
+ expect((screen.getByTestId("onboarding-start") as HTMLButtonElement).disabled).toBe(false);
});
-const stepProps = {
- onb: { state: { skipped_steps: [] } } as never,
- goNext: vi.fn(),
- goBack: vi.fn(),
- skip: vi.fn(),
- isFirst: false,
- isLast: true,
-};
+it("reads back the register summaries and marks skipped steps", () => {
+ const p = props({
+ onb: {
+ state: { skipped_steps: ["api-keys"], steps: STEPS },
+ complete: vi.fn(),
+ } as never,
+ summaries: { language: "Deutsch · Auto", "wake-word": "Hey Nova" },
+ });
+ render(<FinishStep {...p} />);
+ const review = screen.getByTestId("onboarding-review");
+ expect(review.textContent).toContain("Deutsch · Auto");
+ expect(review.textContent).toContain("Hey Nova");
+ expect(review.textContent).toContain("onboarding.finish.skipped");
+});
-it("shows the autostart toggle when supported and PUTs on change", async () => {
+it("shows the autostart switch when supported and PUTs on change", async () => {
const calls: Array<[string, RequestInit | undefined]> = [];
vi.stubGlobal(
"fetch",
@@ -56,9 +90,9 @@ it("shows the autostart toggle when supported and PUTs on change", async () => {
});
}),
);
- render(<FinishStep {...stepProps} />);
- const toggle = (await screen.findByRole("checkbox")) as HTMLInputElement;
- expect(toggle.checked).toBe(true);
+ render(<FinishStep {...props()} />);
+ const toggle = await screen.findByTestId("onboarding-autostart");
+ expect(toggle.getAttribute("aria-checked")).toBe("true");
fireEvent.click(toggle);
await waitFor(() =>
@@ -73,13 +107,19 @@ it("shows the autostart toggle when supported and PUTs on change", async () => {
);
});
-it("hides the toggle when autostart is unsupported (headless)", async () => {
- render(<FinishStep {...stepProps} />);
- await waitFor(() => expect(screen.queryByRole("checkbox")).toBeNull());
+it("hides the switch when autostart is unsupported (headless) or the probe fails", async () => {
+ render(<FinishStep {...props()} />);
+ await waitFor(() => expect(screen.queryByTestId("onboarding-autostart")).toBeNull());
+ cleanup();
+ vi.stubGlobal("fetch", vi.fn().mockRejectedValue(new Error("net")));
+ render(<FinishStep {...props()} />);
+ await waitFor(() => expect(screen.queryByTestId("onboarding-autostart")).toBeNull());
});
-it("hides the toggle when the capability probe fails (fail quiet)", async () => {
- vi.stubGlobal("fetch", vi.fn().mockRejectedValue(new Error("net")));
- render(<FinishStep {...stepProps} />);
- await waitFor(() => expect(screen.queryByRole("checkbox")).toBeNull());
+it("the tour is an external link, not an embedded player", () => {
+ render(<FinishStep {...props()} />);
+ const link = screen.getByRole("link", { name: /tour_title/ }) as HTMLAnchorElement;
+ expect(link.href).toContain("youtube.com");
+ expect(link.target).toBe("_blank");
+ expect(document.querySelector("iframe")).toBeNull();
});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.tsx
index ac96cd9ab7..3f35b27af1 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/FinishStep.tsx
@@ -1,18 +1,39 @@
import { useEffect, useState } from "react";
-import { Button } from "@/components/ui/button";
+import { ExternalLink, Play } from "lucide-react";
+import { Switch } from "@/components/ui/switch";
import { useT } from "@/i18n";
import type { StepProps } from "../OnboardingFlow";
+import { StatusLine, StepFooter, StepSection } from "../primitives";
interface AutostartState {
enabled: boolean;
supported: boolean;
}
-export function FinishStep({ onb, goNext }: StepProps) {
+// The public onboarding walkthrough on YouTube. It used to be a full screen
+// of its own between the risk gate and the wizard; now it is one line on the
+// last step that opens in the user's browser, so nobody is asked to sit
+// through a video before they may type a key.
+const TOUR_URL = "https://www.youtube.com/watch?v=FXz1HclXL1g";
+
+/** The steps whose summary the review reads back, in register order. */
+const REVIEW_STEPS = ["language", "api-keys", "permissions", "wake-word"] as const;
+
+/**
+ * The review: what was set up, as a definition list of the register's own
+ * summaries, plus the autostart switch and the one gold action that starts
+ * the assistant. Completion is awaited — the backend restarts the app once
+ * the marker is written — and a failure shows in place instead of leaving
+ * the button dead.
+ */
+export function FinishStep({ onb, goBack, summaries }: StepProps) {
const t = useT();
- const skipped = onb.state?.skipped_steps ?? [];
+ const skipped = new Set(onb.state?.skipped_steps ?? []);
+ const steps = onb.state?.steps ?? [];
+ const [busy, setBusy] = useState(false);
+ const [error, setError] = useState<string | null>(null);
- // "Start Jarvis at login" toggle (formerly a terminal-wizard question).
+ // "Start at login" toggle (formerly a terminal-wizard question).
// Capability-gated: hidden on hosts where autostart is unsupported
// (headless Linux) or when the probe fails — Settings stays the recovery
// path either way.
@@ -42,35 +63,107 @@ export function FinishStep({ onb, goNext }: StepProps) {
}
};
+ const start = async () => {
+ if (busy) return;
+ setBusy(true);
+ setError(null);
+ try {
+ // Awaited through the hook (which dispatches jarvis:onboarding-changed
+ // on success) so a failed POST is visible here instead of a dead button.
+ await onb.complete();
+ } catch {
+ setError(t("onboarding.finish.start_failed"));
+ setBusy(false);
+ }
+ };
+
+ const review = REVIEW_STEPS.filter((key) => steps.includes(key)).map((key) => ({
+ key,
+ label: t(`onboarding.steps.${key}.label`),
+ value: summaries[key] ?? (skipped.has(key) ? t("onboarding.finish.skipped") : "—"),
+ muted: !summaries[key],
+ }));
+
return (
- <div className="flex flex-col gap-4 text-center">
- <h2 className="font-display text-xl font-semibold">{t("onboarding.finish.title")}</h2>
- <p className="text-sm text-muted-foreground">{t("onboarding.finish.body")}</p>
- {skipped.length > 0 && (
- <div className="text-xs text-muted-foreground">
- <div className="font-medium">{t("onboarding.finish.skipped_title")}</div>
- <ul className="mt-1">
- {skipped.map((s) => (
- <li key={s}>{s}</li>
- ))}
- </ul>
- </div>
- )}
- {autostart?.supported && (
- <label className="flex items-center justify-between gap-2 rounded-lg border border-border px-3 py-2 text-left text-sm">
- <span>{t("onboarding.finish.autostart_label")}</span>
- <input
- type="checkbox"
- checked={autostart.enabled}
- onChange={(e) => void toggleAutostart(e.target.checked)}
- />
- </label>
- )}
- <div className="flex items-start gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2 text-left text-xs text-muted-foreground">
- <span aria-hidden className="mt-px text-primary">⏱</span>
- <span>{t("onboarding.finish.boot_notice")}</span>
- </div>
- <Button className="w-full" onClick={goNext}>{t("onboarding.finish.start_cta")}</Button>
+ <div className="space-y-8">
+ <StepSection label={t("onboarding.finish.summary_label")}>
+ <dl className="border-y border-border/70" data-testid="onboarding-review">
+ {review.map((row) => (
+ <div
+ key={row.key}
+ className="grid grid-cols-[minmax(0,1fr)_auto] items-baseline gap-4 border-b border-border/50 py-3 text-sm last:border-b-0"
+ >
+ <dt className="text-muted-foreground">{row.label}</dt>
+ <dd
+ className={
+ row.muted
+ ? "text-right text-[13px] text-muted-foreground/80"
+ : "text-right font-medium text-foreground"
+ }
+ >
+ {row.value}
+ </dd>
+ </div>
+ ))}
+ {autostart?.supported && (
+ <div className="flex items-center justify-between gap-4 border-b border-border/50 py-3 last:border-b-0">
+ <div className="min-w-0">
+ <span className="block text-sm font-medium text-foreground">
+ {t("onboarding.finish.autostart_label")}
+ </span>
+ <span className="mt-0.5 block text-[13px] text-muted-foreground">
+ {t("onboarding.finish.autostart_hint")}
+ </span>
+ </div>
+ <Switch
+ checked={autostart.enabled}
+ onCheckedChange={(v) => void toggleAutostart(v)}
+ aria-label={t("onboarding.finish.autostart_label")}
+ data-testid="onboarding-autostart"
+ />
+ </div>
+ )}
+ </dl>
+ </StepSection>
+
+ <StepSection label={t("onboarding.finish.tour_label")}>
+ <a
+ href={TOUR_URL}
+ target="_blank"
+ rel="noreferrer"
+ className="group flex items-center gap-3 border-y border-border/70 py-3 text-sm"
+ >
+ <span className="flex h-8 w-8 shrink-0 items-center justify-center rounded-control border border-border bg-card/60 text-foreground transition-colors group-hover:border-primary/60 group-hover:text-primary">
+ <Play className="h-3.5 w-3.5 translate-x-px fill-current" />
+ </span>
+ <span className="min-w-0">
+ <span className="block font-medium text-foreground">
+ {t("onboarding.finish.tour_title")}
+ </span>
+ <span className="block text-[13px] text-muted-foreground">
+ {t("onboarding.finish.tour_body")}
+ </span>
+ </span>
+ <ExternalLink className="ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground" />
+ </a>
+ </StepSection>
+
+ <p className="text-[13px] leading-relaxed text-muted-foreground">
+ {t("onboarding.finish.boot_notice")}
+ </p>
+
+ {error && <StatusLine tone="error">{error}</StatusLine>}
+
+ <StepFooter
+ onBack={goBack}
+ primary={{
+ label: busy ? t("onboarding.finish.starting") : t("onboarding.finish.start_cta"),
+ onClick: () => void start(),
+ busy,
+ testId: "onboarding-start",
+ }}
+ hidePrimaryArrow
+ />
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.test.tsx
index 3202a98efa..f6382fa004 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.test.tsx
@@ -9,14 +9,30 @@ vi.mock("@/i18n", () => ({
setReplyLanguage: vi.fn(),
}));
import { LanguageStep } from "./LanguageStep";
-afterEach(() => { cleanup(); setUiLanguage.mockClear(); });
+afterEach(() => {
+ cleanup();
+ setUiLanguage.mockClear();
+});
-it("changes UI language and advances", async () => {
+it("changes UI language, reports the summary, and advances", async () => {
const goNext = vi.fn();
- render(<LanguageStep onb={{} as never} goNext={goNext} goBack={vi.fn()} skip={vi.fn()} isFirst={false} isLast={false} />);
+ const setSummary = vi.fn();
+ render(
+ <LanguageStep
+ onb={{} as never}
+ goNext={goNext}
+ goBack={vi.fn()}
+ skip={vi.fn()}
+ isFirst={false}
+ isLast={false}
+ setSummary={setSummary}
+ summaries={{}}
+ />,
+ );
+ expect(setSummary).toHaveBeenCalledWith("onboarding.language.summary");
fireEvent.click(screen.getByLabelText("onboarding.language.ui_label"));
fireEvent.click(await screen.findByText("Deutsch"));
expect(setUiLanguage).toHaveBeenCalledWith("de");
- fireEvent.click(screen.getByRole("button", { name: "onboarding.nav.next" }));
+ fireEvent.click(screen.getByTestId("onboarding-primary"));
expect(goNext).toHaveBeenCalled();
});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.tsx
index 4af70fa6a6..285160ba5d 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/LanguageStep.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@/components/ui/button";
+import { useEffect } from "react";
import { BrandedSelect } from "@/components/ui/select";
import {
useT,
@@ -10,16 +10,39 @@ import {
type ReplyLanguage,
} from "@/i18n";
import type { StepProps } from "../OnboardingFlow";
+import { StepFooter } from "../primitives";
-export function LanguageStep({ goNext }: StepProps) {
+const LANGUAGE_LABELS: Record<string, string> = {
+ en: "English",
+ de: "Deutsch",
+ es: "Español",
+};
+
+/**
+ * Two settings as two rows of a definition list: label and hint on the left,
+ * the control on the right, a rule between them. The register summary reads
+ * "Deutsch · replies Auto" as soon as either changes.
+ */
+export function LanguageStep({ goNext, goBack, setSummary }: StepProps) {
const t = useT();
const ui = useUiLanguage();
const reply = useReplyLanguage();
- return (
- <div className="flex flex-col gap-4">
- <h2 className="font-display text-lg font-semibold">{t("onboarding.language.title")}</h2>
- <label className="text-sm">
- {t("onboarding.language.ui_label")}
+
+ useEffect(() => {
+ const replyLabel = reply === "auto" ? "Auto" : (LANGUAGE_LABELS[reply] ?? reply);
+ setSummary(
+ t("onboarding.language.summary")
+ .replace("{0}", LANGUAGE_LABELS[ui] ?? ui)
+ .replace("{1}", replyLabel),
+ );
+ }, [ui, reply, setSummary, t]);
+
+ const rows = [
+ {
+ key: "ui",
+ label: t("onboarding.language.ui_label"),
+ hint: t("onboarding.language.ui_hint"),
+ control: (
<BrandedSelect
ariaLabel={t("onboarding.language.ui_label")}
value={ui}
@@ -29,25 +52,52 @@ export function LanguageStep({ goNext }: StepProps) {
{ value: "de", label: "Deutsch" },
{ value: "es", label: "Español" },
]}
- className="mt-1"
/>
- </label>
- <label className="text-sm">
- {t("onboarding.language.reply_label")}
+ ),
+ },
+ {
+ key: "reply",
+ label: t("onboarding.language.reply_label"),
+ hint: t("onboarding.language.reply_hint"),
+ control: (
<BrandedSelect
ariaLabel={t("onboarding.language.reply_label")}
value={reply}
onValueChange={(value) => setReplyLanguage(value as ReplyLanguage)}
options={[
- { value: "auto", label: "Auto" },
+ { value: "auto", label: t("onboarding.language.auto") },
{ value: "en", label: "English" },
{ value: "de", label: "Deutsch" },
{ value: "es", label: "Español" },
]}
- className="mt-1"
/>
- </label>
- <Button className="w-full" onClick={goNext}>{t("onboarding.nav.next")}</Button>
+ ),
+ },
+ ];
+
+ return (
+ <div>
+ <dl className="border-y border-border/70">
+ {rows.map((row) => (
+ <div
+ key={row.key}
+ className="grid gap-3 border-b border-border/50 py-4 last:border-b-0 sm:grid-cols-[minmax(0,1fr)_240px] sm:items-center"
+ >
+ <dt>
+ <span className="block text-sm font-medium text-foreground">{row.label}</span>
+ <span className="mt-0.5 block text-[13px] leading-relaxed text-muted-foreground">
+ {row.hint}
+ </span>
+ </dt>
+ <dd className="min-w-0">{row.control}</dd>
+ </div>
+ ))}
+ </dl>
+
+ <StepFooter
+ onBack={goBack}
+ primary={{ label: t("onboarding.nav.next"), onClick: goNext }}
+ />
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/MicTestStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/MicTestStep.test.tsx
deleted file mode 100644
index 4ade954aca..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/MicTestStep.test.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
-import { afterEach, expect, it, vi } from "vitest";
-vi.mock("@/i18n", () => ({ useT: () => (k: string) => k }));
-import { MicTestStep } from "./MicTestStep";
-
-afterEach(() => {
- cleanup();
- vi.unstubAllGlobals(); // restore navigator so the stub doesn't leak into sibling tests
-});
-
-it("shows the no-mic message when getUserMedia is unavailable", async () => {
- vi.stubGlobal("navigator", { mediaDevices: undefined });
- render(<MicTestStep onb={{} as never} goNext={vi.fn()} goBack={vi.fn()} skip={vi.fn()} isFirst={false} isLast={false} />);
- await waitFor(() => expect(screen.getByText("onboarding.mic_test.no_mic")).toBeDefined());
-});
-
-it("skip advances", () => {
- vi.stubGlobal("navigator", { mediaDevices: undefined });
- const skip = vi.fn();
- render(<MicTestStep onb={{} as never} goNext={vi.fn()} goBack={vi.fn()} skip={skip} isFirst={false} isLast={false} />);
- fireEvent.click(screen.getByRole("button", { name: "onboarding.mic_test.skip" }));
- expect(skip).toHaveBeenCalled();
-});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/MicTestStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/MicTestStep.tsx
deleted file mode 100644
index a11814a92e..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/MicTestStep.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import { useEffect, useState } from "react";
-import { Button } from "@/components/ui/button";
-import { useT } from "@/i18n";
-import type { StepProps } from "../OnboardingFlow";
-
-type MicState = "checking" | "ok" | "no-mic";
-
-export function MicTestStep({ goNext, skip }: StepProps) {
- const t = useT();
- const [mic, setMic] = useState<MicState>("checking");
-
- useEffect(() => {
- let cancelled = false;
- const md = (navigator as Navigator).mediaDevices;
- if (!md || typeof md.getUserMedia !== "function") {
- setMic("no-mic");
- return;
- }
- md.getUserMedia({ audio: true })
- .then((stream) => {
- if (cancelled) return;
- stream.getTracks().forEach((tr) => tr.stop());
- setMic("ok");
- })
- .catch(() => {
- if (!cancelled) setMic("no-mic");
- });
- return () => {
- cancelled = true;
- };
- }, []);
-
- return (
- <div className="flex flex-col gap-4">
- <h2 className="font-display text-lg font-semibold">{t("onboarding.mic_test.title")}</h2>
- <p className="text-sm text-muted-foreground">{t("onboarding.mic_test.body")}</p>
- {mic === "no-mic" && <p className="text-xs text-amber-500">{t("onboarding.mic_test.no_mic")}</p>}
- <Button className="w-full" onClick={goNext}>{t("onboarding.nav.next")}</Button>
- <button className="text-xs text-muted-foreground underline" onClick={skip}>
- {t("onboarding.mic_test.skip")}
- </button>
- </div>
- );
-}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/PermissionsStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/PermissionsStep.tsx
index 1f9a1edf91..188dc44edf 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/PermissionsStep.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/PermissionsStep.tsx
@@ -1,10 +1,9 @@
-import { ShieldCheck } from "lucide-react";
-import { useCallback, useState } from "react";
-import { Button } from "@/components/ui/button";
+import { useCallback, useEffect, useState } from "react";
import type { PermissionId, PermissionSnapshot } from "@/hooks/usePermissions";
import { useT } from "@/i18n";
import { PermissionRows } from "@/views/settings/PermissionsPanel";
import type { StepProps } from "../OnboardingFlow";
+import { StepFooter } from "../primitives";
const EXPECTED_MACOS_PERMISSIONS = new Set<PermissionId>([
"microphone",
@@ -42,46 +41,52 @@ export function permissionSnapshotReady(snapshot: PermissionSnapshot | null): bo
);
}
-export function PermissionsStep({ goNext, skip }: StepProps) {
+/**
+ * macOS only — the flow hides this step on Windows and Linux (see
+ * `visibleSteps`). The rows are the Settings panel's own, so what the user
+ * grants here is exactly what they will see there.
+ */
+export function PermissionsStep({ goNext, goBack, skip, setSummary }: StepProps) {
const t = useT();
const [allReady, setAllReady] = useState(false);
const onSnapshot = useCallback((snapshot: PermissionSnapshot | null) => {
setAllReady(permissionSnapshotReady(snapshot));
}, []);
+ useEffect(() => {
+ setSummary(allReady ? t("onboarding.permissions.summary_ready") : null);
+ }, [allReady, setSummary, t]);
+
return (
- <div className="flex flex-col gap-4">
- <div className="flex items-center gap-3">
- <div className="flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary">
- <ShieldCheck className="h-5 w-5" />
- </div>
- <div>
- <h2 className="font-display text-lg font-semibold">
- {t("onboarding.permissions.title")}
- </h2>
- <p className="text-sm text-muted-foreground">
- {t("onboarding.permissions.body")}
- </p>
- </div>
+ <div className="space-y-6">
+ <div className="border-y border-border/70 py-3">
+ <PermissionRows compact deferRestartNote onSnapshot={onSnapshot} />
</div>
- <PermissionRows compact deferRestartNote onSnapshot={onSnapshot} />
-
- <p className="text-xs text-muted-foreground">
+ <p className="text-[13px] leading-relaxed text-muted-foreground">
{t("onboarding.permissions.privacy_note")}
</p>
- <Button className="w-full" disabled={!allReady} onClick={goNext}>
- {t("onboarding.permissions.continue")}
- </Button>
- {!allReady && (
- <button
- type="button"
- className="text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground"
- onClick={skip}
- >
- {t("onboarding.permissions.text_only")}
- </button>
- )}
+
+ <StepFooter
+ onBack={goBack}
+ primary={{
+ label: t("onboarding.permissions.continue"),
+ onClick: goNext,
+ disabled: !allReady,
+ }}
+ secondary={
+ allReady
+ ? null
+ : {
+ label: t("onboarding.permissions.text_only"),
+ onClick: () => {
+ setSummary(t("onboarding.permissions.summary_skipped"));
+ skip();
+ },
+ testId: "onboarding-permissions-skip",
+ }
+ }
+ />
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/SystemStyleStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/SystemStyleStep.test.tsx
deleted file mode 100644
index 73171ebdcc..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/SystemStyleStep.test.tsx
+++ /dev/null
@@ -1,145 +0,0 @@
-import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
-import { afterEach, expect, it, vi } from "vitest";
-
-vi.mock("@/i18n", () => ({ useT: () => (k: string) => k }));
-vi.mock("@/components/MascotGigi", () => ({ MascotGigi: () => <div data-testid="gigi" /> }));
-
-// Mock the overlay-style hook so the step has no real network dependency. The
-// step must persist the pick through this hook's saveStyle and NEVER restart.
-const saveStyle = vi.fn().mockResolvedValue({
- ok: true,
- style: "jarvis_bar",
- persisted: true,
- applied_live: false, // even when a restart would be "required", onboarding must not restart
- restart_required: true,
-});
-vi.mock("@/hooks/useOverlayStyle", () => ({
- useOverlayStyle: () => ({
- config: { style: "jarvis_bar", options: ["jarvis_bar", "mascot", "none"] },
- loading: false,
- error: null,
- refetch: vi.fn(),
- saveStyle,
- }),
-}));
-
-import { SystemStyleStep } from "./SystemStyleStep";
-
-afterEach(() => {
- cleanup();
- vi.clearAllMocks();
-});
-
-function renderStep() {
- const goNext = vi.fn();
- const skip = vi.fn();
- render(
- <SystemStyleStep
- onb={{} as never}
- goNext={goNext}
- goBack={vi.fn()}
- skip={skip}
- isFirst={false}
- isLast={false}
- />,
- );
- return { goNext, skip };
-}
-
-it("renders all three overlay-style options", () => {
- renderStep();
- expect(
- screen.getByRole("button", { name: "onboarding.system_style.options.jarvis_bar" }),
- ).toBeDefined();
- expect(
- screen.getByRole("button", { name: "onboarding.system_style.options.mascot" }),
- ).toBeDefined();
- expect(
- screen.getByRole("button", { name: "onboarding.system_style.options.none" }),
- ).toBeDefined();
-});
-
-it("pre-selects the Jarvis Bar and labels it Recommended", () => {
- renderStep();
- // Recommended badge is shown.
- expect(screen.getByText("onboarding.system_style.recommended")).toBeDefined();
- // The bar card is the pressed/selected one.
- const bar = screen.getByRole("button", {
- name: "onboarding.system_style.options.jarvis_bar",
- });
- expect(bar.getAttribute("aria-pressed")).toBe("true");
-});
-
-it("persists the chosen style via saveStyle on click", async () => {
- renderStep();
- fireEvent.click(
- screen.getByRole("button", { name: "onboarding.system_style.options.mascot" }),
- );
- await waitFor(() => expect(saveStyle).toHaveBeenCalledWith("mascot"));
-});
-
-it("does not auto-restart on a pick (restart is a separate, explicit action)", async () => {
- const fetchSpy = vi.fn((..._args: unknown[]) =>
- Promise.resolve({ ok: true, status: 200, json: () => Promise.resolve({}) }),
- );
- vi.stubGlobal("fetch", fetchSpy);
- renderStep();
- fireEvent.click(
- screen.getByRole("button", { name: "onboarding.system_style.options.mascot" }),
- );
- await waitFor(() => expect(saveStyle).toHaveBeenCalled());
- // Picking alone must never hit the restart endpoint.
- const restartCalls = fetchSpy.mock.calls.filter(
- (args) => typeof args[0] === "string" && (args[0] as string).includes("restart-app"),
- );
- expect(restartCalls).toHaveLength(0);
-});
-
-it("offers a one-click restart when the pick needs one, and posts restart-app", async () => {
- const fetchSpy = vi.fn((..._args: unknown[]) =>
- Promise.resolve({ ok: true, status: 200, json: () => Promise.resolve({}) }),
- );
- vi.stubGlobal("fetch", fetchSpy);
- renderStep();
- // The mocked saveStyle returns applied_live:false → a restart is needed.
- fireEvent.click(
- screen.getByRole("button", { name: "onboarding.system_style.options.mascot" }),
- );
- const restartBtn = await screen.findByText("onboarding.system_style.restart_now");
- fireEvent.click(restartBtn);
- await waitFor(() =>
- expect(
- fetchSpy.mock.calls.some(
- (args) =>
- typeof args[0] === "string" && args[0].includes("/api/settings/restart-app"),
- ),
- ).toBe(true),
- );
-});
-
-it("reverts the optimistic selection when the save fails", async () => {
- saveStyle.mockRejectedValueOnce(new Error("network down"));
- renderStep();
- fireEvent.click(
- screen.getByRole("button", { name: "onboarding.system_style.options.mascot" }),
- );
- await waitFor(() => expect(saveStyle).toHaveBeenCalledWith("mascot"));
- // The pick was not persisted, so the highlighted card snaps back to the
- // last-known persisted value (jarvis_bar) and an error is shown.
- await waitFor(() =>
- expect(
- screen
- .getByRole("button", { name: "onboarding.system_style.options.jarvis_bar" })
- .getAttribute("aria-pressed"),
- ).toBe("true"),
- );
- expect(screen.getByText("onboarding.system_style.save_error")).toBeDefined();
-});
-
-it("advances on Next and on Skip", () => {
- const props = renderStep();
- fireEvent.click(screen.getByText("onboarding.nav.next"));
- expect(props.goNext).toHaveBeenCalled();
- fireEvent.click(screen.getByText("onboarding.system_style.skip"));
- expect(props.skip).toHaveBeenCalled();
-});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/SystemStyleStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/SystemStyleStep.tsx
deleted file mode 100644
index ba0c3a7873..0000000000
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/SystemStyleStep.tsx
+++ /dev/null
@@ -1,189 +0,0 @@
-import { useEffect, useState } from "react";
-import { Button } from "@/components/ui/button";
-import {
- useOverlayStyle,
- OVERLAY_STYLES,
- type OverlayStyle,
-} from "@/hooks/useOverlayStyle";
-import { StylePreview } from "@/components/overlay/OverlayStylePreviews";
-import { useT } from "@/i18n";
-import { cn } from "@/lib/utils";
-import type { StepProps } from "../OnboardingFlow";
-
-// The Jarvis Bar is the default + recommended on-screen surface.
-const RECOMMENDED: OverlayStyle = "jarvis_bar";
-
-/**
- * Onboarding step: choose the on-screen "system style" (the Jarvis Bar vs. the
- * Orb vs. no overlay). Reuses the existing overlay-style axis
- * (`/api/settings/overlay-style` via `useOverlayStyle`) and the shared preview
- * graphics, with the Jarvis Bar pre-selected and labelled "Recommended".
- *
- * The pick is persisted immediately and live-applied when Tk can swap the
- * surface in place. When it can't (a `bar <-> mascot` first-time swap needs a
- * brand-new Tk root — BUG-031 — which would crash the process), the backend
- * reports `restart_required`; this step then offers a one-click self-restart
- * (the same `request_restart` relauncher the Settings panel uses) so the choice
- * actually takes effect instead of leaving the user to relaunch by hand. We
- * never restart on the *pick* itself — only when the user clicks "Restart now".
- */
-export function SystemStyleStep({ goNext, skip }: StepProps) {
- const t = useT();
- const { config, loading, saveStyle } = useOverlayStyle();
- const [style, setStyle] = useState<OverlayStyle>(RECOMMENDED);
- const [saving, setSaving] = useState(false);
- const [needsRestart, setNeedsRestart] = useState(false);
- const [showSaveError, setShowSaveError] = useState(false);
- const [restarting, setRestarting] = useState(false);
- // Armed after the backend refuses a restart (HTTP 409) because missions are
- // running; the next click resends with force=true. Mirrors the Settings panel.
- const [forceArmed, setForceArmed] = useState(false);
-
- useEffect(() => {
- if (config) setStyle(config.style);
- }, [config]);
-
- const options = config?.options ?? OVERLAY_STYLES;
-
- async function onPick(opt: OverlayStyle) {
- if (saving || restarting) return;
- setStyle(opt); // optimistic — reverted below if the save fails
- setSaving(true);
- setNeedsRestart(false);
- setForceArmed(false);
- setShowSaveError(false);
- try {
- const res = await saveStyle(opt);
- // Live-applied → the surface already changed on screen. Otherwise the
- // choice is persisted and a restart is needed to deliver it.
- if (!res.applied_live) setNeedsRestart(true);
- } catch {
- // Honest failure: revert the optimistic selection to the last persisted
- // value so the highlighted card never claims a pick that wasn't saved, and
- // surface a non-blocking error. The default still stands; the user can
- // retry or continue.
- setStyle(config?.style ?? RECOMMENDED);
- setShowSaveError(true);
- } finally {
- setSaving(false);
- }
- }
-
- async function onRestartNow() {
- if (restarting) return;
- setRestarting(true);
- try {
- const url = forceArmed
- ? "/api/settings/restart-app?force=true"
- : "/api/settings/restart-app";
- const res = await fetch(url, { method: "POST" });
- if (res.status === 409) {
- // Live missions would be killed — arm a force restart instead of
- // killing them silently. The next click resends with force=true.
- setRestarting(false);
- setForceArmed(true);
- return;
- }
- if (!res.ok) throw new Error(`restart-failed:${res.status}`);
- // On success the window goes away as the app relaunches, so we keep
- // `restarting` true (never cleared here).
- } catch {
- // Re-enable the button so the user can retry; the choice is already
- // persisted, so it still applies on the next manual start either way.
- setRestarting(false);
- }
- }
-
- return (
- <div className="flex flex-col gap-4">
- <div>
- <h2 className="font-display text-lg font-semibold">
- {t("onboarding.system_style.title")}
- </h2>
- <p className="mt-1 text-xs text-muted-foreground">
- {t("onboarding.system_style.body")}
- </p>
- </div>
-
- <div className="grid grid-cols-2 gap-3 sm:grid-cols-4">
- {options.map((opt) => (
- <button
- key={opt}
- type="button"
- aria-label={t(`onboarding.system_style.options.${opt}`)}
- aria-pressed={opt === style}
- disabled={saving || loading}
- onClick={() => onPick(opt)}
- className={cn(
- "relative flex flex-col items-center gap-2 rounded-lg border p-3 transition-all disabled:opacity-60",
- opt === style
- ? "border-primary bg-primary/5 ring-1 ring-primary/50"
- : "border-border bg-background/40 hover:border-primary/50",
- )}
- >
- {opt === RECOMMENDED && (
- <span className="absolute -top-2 right-1 rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-semibold text-primary-foreground">
- {t("onboarding.system_style.recommended")}
- </span>
- )}
- <div className="flex h-16 w-full items-center justify-center overflow-hidden rounded-md bg-card/80">
- <StylePreview style={opt} />
- </div>
- <span
- className={cn(
- "text-xs font-medium",
- opt === style ? "text-primary" : "text-muted-foreground",
- )}
- >
- {t(`onboarding.system_style.options.${opt}`)}
- </span>
- </button>
- ))}
- </div>
-
- <p className="text-xs text-muted-foreground">
- {t(`onboarding.system_style.captions.${style}`)}
- </p>
-
- {needsRestart && (
- <div className="flex flex-col gap-2 rounded-md border border-primary/40 bg-primary/5 p-3">
- <p className="text-xs text-muted-foreground">
- {t("onboarding.system_style.needs_restart")}
- </p>
- <button
- type="button"
- onClick={onRestartNow}
- disabled={restarting}
- className="self-start rounded-md border border-primary/50 bg-primary/10 px-3 py-1.5 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:opacity-60"
- >
- {restarting
- ? t("onboarding.system_style.restarting")
- : forceArmed
- ? t("topbar.restart_force")
- : t("onboarding.system_style.restart_now")}
- </button>
- {forceArmed && !restarting && (
- <p className="text-xs text-amber-500">{t("topbar.restart_missions_running")}</p>
- )}
- </div>
- )}
-
- {showSaveError && (
- <p className="text-xs text-destructive">
- {t("onboarding.system_style.save_error")}
- </p>
- )}
-
- <Button className="w-full" onClick={goNext}>
- {t("onboarding.nav.next")}
- </Button>
- <button
- type="button"
- className="text-xs text-muted-foreground underline"
- onClick={skip}
- >
- {t("onboarding.system_style.skip")}
- </button>
- </div>
- );
-}
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.test.tsx
index 250ba31c6b..307dec51cf 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.test.tsx
@@ -25,6 +25,7 @@ vi.mock("@/hooks/useWakeWord", () => ({
import { WakeWordStep } from "./WakeWordStep";
afterEach(() => {
cleanup();
+ vi.unstubAllGlobals();
saveWakeWord.mockClear();
saveWakeWord.mockResolvedValue({ ok: true, degraded: false });
setWakeActivation.mockClear();
@@ -37,75 +38,68 @@ const onb = {
acknowledgeWakeWord: vi.fn().mockResolvedValue(undefined),
} as never;
-function renderStep(goNext = vi.fn()) {
- render(<WakeWordStep onb={onb} goNext={goNext} goBack={vi.fn()} skip={vi.fn()} isFirst={false} isLast={false} />);
- return { goNext };
-}
-
-function selectWakeMode() {
- fireEvent.click(screen.getByRole("button", { name: /mode_wake_title/ }));
+function renderStep(goNext = vi.fn(), setSummary = vi.fn()) {
+ render(
+ <WakeWordStep
+ onb={onb}
+ goNext={goNext}
+ goBack={vi.fn()}
+ skip={vi.fn()}
+ isFirst={false}
+ isLast={false}
+ setSummary={setSummary}
+ summaries={{}}
+ />,
+ );
+ return { goNext, setSummary };
}
-function selectShortcutMode() {
- fireEvent.click(screen.getByRole("button", { name: /mode_shortcut_title/ }));
-}
+const primary = () => screen.getByTestId("onboarding-primary") as HTMLButtonElement;
-it("shows the mode choice first, with wake-word and keyboard-shortcut options", () => {
+it("offers both activation paths on one screen, wake word preselected with its input open", () => {
renderStep();
- expect(screen.getByRole("button", { name: /mode_wake_title/ })).toBeDefined();
- expect(screen.getByRole("button", { name: /mode_shortcut_title/ })).toBeDefined();
- // Neither the wake-word input nor the shortcut CTA are visible yet.
- expect(screen.queryByRole("textbox")).toBeNull();
+ expect(screen.getByTestId("wake-mode-wake").getAttribute("aria-checked")).toBe("true");
+ expect(screen.getByTestId("wake-mode-shortcut").getAttribute("aria-checked")).toBe("false");
+ expect(screen.getByRole("textbox")).toBeDefined();
});
it("keyboard-shortcut path: turns the wake word off and advances, no phrase required", async () => {
- const { goNext } = renderStep();
- selectShortcutMode();
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.shortcut_cta" }));
+ const { goNext, setSummary } = renderStep();
+ fireEvent.click(screen.getByTestId("wake-mode-shortcut"));
+ expect(screen.queryByRole("textbox")).toBeNull();
+ expect(setSummary).toHaveBeenLastCalledWith("onboarding.wake_word.summary_shortcut");
+ fireEvent.click(primary());
await waitFor(() => expect(setWakeActivation).toHaveBeenCalledWith(false));
expect(goNext).toHaveBeenCalled();
- // The wake-only save path was never touched.
expect(saveWakeWord).not.toHaveBeenCalled();
});
-it("back-to-choice returns from a chosen mode to the mode picker", () => {
- renderStep();
- selectWakeMode();
- expect(screen.getByRole("textbox")).toBeDefined();
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.back_to_choice" }));
- expect(screen.getByRole("button", { name: /mode_wake_title/ })).toBeDefined();
- expect(screen.queryByRole("textbox")).toBeNull();
-});
-
-it("wake-word path: shows the derived-name preview only after a valid word is typed", () => {
- renderStep();
- selectWakeMode();
+it("wake-word path: shows the derived-name preview and reports 'Hey <word>' as the summary", () => {
+ const { setSummary } = renderStep();
expect(screen.queryByText("onboarding.wake_word.derived_name")).toBeNull();
fireEvent.change(screen.getByRole("textbox"), { target: { value: "Nova" } });
expect(screen.queryByText("onboarding.wake_word.derived_name")).not.toBeNull();
+ expect(setSummary).toHaveBeenLastCalledWith("Hey Nova");
});
-it("wake-word path: requires word + ack, saves 'Hey <word>', activates the wake word, and advances", async () => {
+it("wake-word path: requires word + ack, saves 'Hey <word>', activates, and advances", async () => {
const { goNext } = renderStep();
- selectWakeMode();
- // The trademark references are tucked behind a "How to check" toggle now —
- // reveal them before asserting the register link is present.
fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.learn_more" }));
expect(screen.getByRole("link", { name: "EUIPO" })).toBeDefined();
- const cta = screen.getByRole("button", { name: "onboarding.wake_word.cta" });
- expect((cta as HTMLButtonElement).disabled).toBe(true);
-
+ expect(primary().disabled).toBe(true);
fireEvent.change(screen.getByRole("textbox"), { target: { value: "Nova" } });
- expect((cta as HTMLButtonElement).disabled).toBe(true); // checkbox still unticked
- fireEvent.click(screen.getByRole("checkbox"));
- expect((cta as HTMLButtonElement).disabled).toBe(false);
+ expect(primary().disabled).toBe(true); // checkbox still unticked
+ fireEvent.click(screen.getByTestId("wake-ack"));
+ expect(primary().disabled).toBe(false);
- fireEvent.click(cta);
+ fireEvent.click(primary());
await waitFor(() => expect(saveWakeWord).toHaveBeenCalled());
expect(saveWakeWord.mock.calls[0][0].phrase).toBe("Hey Nova");
- expect((onb as never as { acknowledgeWakeWord: ReturnType<typeof vi.fn> }).acknowledgeWakeWord).toHaveBeenCalled();
+ expect(
+ (onb as never as { acknowledgeWakeWord: ReturnType<typeof vi.fn> }).acknowledgeWakeWord,
+ ).toHaveBeenCalled();
await waitFor(() => expect(setWakeActivation).toHaveBeenCalledWith(true));
expect(goNext).toHaveBeenCalled();
});
@@ -113,11 +107,10 @@ it("wake-word path: requires word + ack, saves 'Hey <word>', activates the wake
it("wake-word path: a degraded save does NOT advance and offers the local-speech install", async () => {
saveWakeWord.mockResolvedValue({ ok: true, degraded: true });
const { goNext } = renderStep();
- selectWakeMode();
fireEvent.change(screen.getByRole("textbox"), { target: { value: "Nova" } });
- fireEvent.click(screen.getByRole("checkbox"));
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.cta" }));
+ fireEvent.click(screen.getByTestId("wake-ack"));
+ fireEvent.click(primary());
await waitFor(() =>
expect(screen.getByText("settings_view.wake_word.needs_whisper_hint")).toBeDefined(),
@@ -135,17 +128,14 @@ it("wake-word path: completed local install clears the stale degraded warning",
.mockResolvedValueOnce({ ok: true, degraded: true })
.mockResolvedValue({ ok: true, degraded: false });
const { goNext } = renderStep();
- selectWakeMode();
fireEvent.change(screen.getByRole("textbox"), { target: { value: "Nova" } });
- fireEvent.click(screen.getByRole("checkbox"));
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.cta" }));
+ fireEvent.click(screen.getByTestId("wake-ack"));
+ fireEvent.click(primary());
await screen.findByText("settings_view.wake_word.needs_whisper_hint");
fireEvent.click(
- screen.getByRole("button", {
- name: "settings_view.wake_word.enable_local_button",
- }),
+ screen.getByRole("button", { name: "settings_view.wake_word.enable_local_button" }),
);
expect(localSpeech.startInstall).toHaveBeenCalledOnce();
@@ -159,13 +149,13 @@ it("wake-word path: completed local install clears the stale degraded warning",
).toBeNull();
// The normal CTA re-validates the already-persisted phrase and activates it.
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.cta" }));
+ fireEvent.click(primary());
await waitFor(() => expect(saveWakeWord).toHaveBeenCalledTimes(2));
await waitFor(() => expect(setWakeActivation).toHaveBeenCalledWith(true));
expect(goNext).toHaveBeenCalled();
});
-it("wake-word path: renders a mic-check control that reports a good level", async () => {
+it("renders ONE mic-check control that reports a good level", async () => {
const fetchSpy = vi.fn(() =>
Promise.resolve({
ok: true,
@@ -175,62 +165,37 @@ it("wake-word path: renders a mic-check control that reports a good level", asyn
);
vi.stubGlobal("fetch", fetchSpy);
renderStep();
- selectWakeMode();
-
- expect(screen.getByText("onboarding.wake_word.mic_check.title")).toBeDefined();
- const testButton = screen.getByRole("button", { name: "onboarding.wake_word.mic_check.test_button" });
- expect(screen.getByRole("button", { name: "onboarding.wake_word.mic_check.say_once_button" })).toBeDefined();
- fireEvent.click(testButton);
+ expect(screen.getAllByTestId("wake-mic-test")).toHaveLength(1);
+ fireEvent.click(screen.getByTestId("wake-mic-test"));
await waitFor(() =>
expect(fetchSpy).toHaveBeenCalledWith("/api/settings/wake-word/mic-level"),
);
await waitFor(() => expect(screen.getByText("onboarding.wake_word.mic_check.good")).toBeDefined());
});
-it("wake-word path: mic-check shows the amber too-quiet warning without blocking the save CTA", async () => {
- const fetchSpy = vi.fn(() =>
- Promise.resolve({
- ok: true,
- status: 200,
- json: () => Promise.resolve({ max_dbfs: -55.0, no_device: false, too_quiet: true }),
- }),
- );
- vi.stubGlobal("fetch", fetchSpy);
- renderStep();
- selectWakeMode();
-
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.mic_check.test_button" }));
- const warning = await screen.findByText("onboarding.wake_word.mic_check.too_quiet");
- expect(warning).toBeDefined();
-
- // Acknowledgment must never be blocked by a failed/quiet mic check — the
- // save CTA is only gated on word length + the ack checkbox.
- fireEvent.change(screen.getByRole("textbox"), { target: { value: "Nova" } });
- fireEvent.click(screen.getByRole("checkbox"));
- const cta = screen.getByRole("button", { name: "onboarding.wake_word.cta" });
- expect((cta as HTMLButtonElement).disabled).toBe(false);
-});
-
-it("wake-word path: mic-check reports a neutral no-device state on a headless host", async () => {
- const fetchSpy = vi.fn(() =>
- Promise.resolve({
- ok: true,
- status: 200,
- json: () => Promise.resolve({ max_dbfs: -120.0, no_device: true, too_quiet: false }),
- }),
+it("mic-check shows the too-quiet warning without blocking the save CTA", async () => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(() =>
+ Promise.resolve({
+ ok: true,
+ status: 200,
+ json: () => Promise.resolve({ max_dbfs: -55.0, no_device: false, too_quiet: true }),
+ }),
+ ),
);
- vi.stubGlobal("fetch", fetchSpy);
renderStep();
- selectWakeMode();
-
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.mic_check.say_once_button" }));
+ fireEvent.click(screen.getByTestId("wake-mic-test"));
await waitFor(() =>
- expect(screen.getByText("onboarding.wake_word.mic_check.no_device")).toBeDefined(),
+ expect(screen.getByText("onboarding.wake_word.mic_check.too_quiet")).toBeDefined(),
);
+ fireEvent.change(screen.getByRole("textbox"), { target: { value: "Nova" } });
+ fireEvent.click(screen.getByTestId("wake-ack"));
+ expect(primary().disabled).toBe(false);
});
-it("wake-word path: mic-check directs a blocked macOS user to Permissions", async () => {
+it("mic-check surfaces permission_required and a probe failure honestly", async () => {
vi.stubGlobal(
"fetch",
vi.fn(() =>
@@ -239,20 +204,26 @@ it("wake-word path: mic-check directs a blocked macOS user to Permissions", asyn
status: 200,
json: () =>
Promise.resolve({
- max_dbfs: -120.0,
+ max_dbfs: -90,
no_device: false,
- too_quiet: false,
+ too_quiet: true,
permission_required: true,
}),
}),
),
);
renderStep();
- selectWakeMode();
-
- fireEvent.click(screen.getByRole("button", { name: "onboarding.wake_word.mic_check.test_button" }));
-
- expect(
- await screen.findByText("onboarding.wake_word.mic_check.permission_required"),
- ).toBeDefined();
+ fireEvent.click(screen.getByTestId("wake-mic-test"));
+ await waitFor(() =>
+ expect(
+ screen.getByText("onboarding.wake_word.mic_check.permission_required"),
+ ).toBeDefined(),
+ );
+ cleanup();
+ vi.stubGlobal("fetch", vi.fn(() => Promise.reject(new Error("down"))));
+ renderStep();
+ fireEvent.click(screen.getByTestId("wake-mic-test"));
+ await waitFor(() =>
+ expect(screen.getByText("onboarding.wake_word.mic_check.error")).toBeDefined(),
+ );
});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.tsx
index 1ce6d66d9d..41605269d6 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/WakeWordStep.tsx
@@ -1,11 +1,19 @@
-import { useState } from "react";
-import { Button } from "@/components/ui/button";
+import { useEffect, useState } from "react";
+import { Mic } from "lucide-react";
+import { Button, Field } from "@/components/agentic/controls";
import { useWakeWord, useLocalSpeechInstall } from "@/hooks/useWakeWord";
import { useT } from "@/i18n";
import { deriveAssistantName } from "@/lib/deriveAssistantName";
import type { StepProps } from "../OnboardingFlow";
+import {
+ ChoiceRow,
+ ConsentLine,
+ StatusLine,
+ StepFooter,
+ StepSection,
+} from "../primitives";
-type Mode = "choice" | "wake" | "shortcut";
+type Mode = "wake" | "shortcut";
/** GET /api/settings/wake-word/mic-level response shape. */
interface MicLevelResult {
@@ -27,11 +35,15 @@ type MicCheckState = "idle" | "checking" | "done";
* honest "continue anyway" (wake word off until the pack lands).
* - "shortcut": no wake word at all — the Call keyboard shortcut starts a
* normal voice session and remains editable later in Settings.
+ *
+ * Both paths sit on one screen as two selectable rows; the wake-word row
+ * unfolds its input in place. One microphone check (the old step had two
+ * buttons wired to the same probe).
*/
-export function WakeWordStep({ onb, goNext }: StepProps) {
+export function WakeWordStep({ onb, goNext, goBack, setSummary }: StepProps) {
const t = useT();
const { saveWakeWord, setWakeActivation } = useWakeWord();
- const [mode, setMode] = useState<Mode>("choice");
+ const [mode, setMode] = useState<Mode>("wake");
const [word, setWord] = useState("");
const [ack, setAck] = useState(false);
const [busy, setBusy] = useState(false);
@@ -49,10 +61,10 @@ export function WakeWordStep({ onb, goNext }: StepProps) {
setDegraded(false);
setErr(null);
});
- // Mic verification (Task 7): a live dBFS read from the desktop app's own
- // capture path (the same one the wake-word detector listens on) — never
- // blocks the save/acknowledge below, it just surfaces an honest signal so a
- // quiet mic or a headless/no-mic host is visible before the user commits.
+ // Mic verification: a live dBFS read from the desktop app's own capture
+ // path (the same one the wake-word detector listens on) — never blocks the
+ // save/acknowledge below, it just surfaces an honest signal so a quiet mic
+ // or a headless/no-mic host is visible before the user commits.
const [micCheck, setMicCheck] = useState<{
state: MicCheckState;
result: MicLevelResult | null;
@@ -64,6 +76,11 @@ export function WakeWordStep({ onb, goNext }: StepProps) {
const derivedName = deriveAssistantName(`Hey ${trimmed}`);
const refs = onb.state?.legal_references ?? [];
+ useEffect(() => {
+ if (mode === "shortcut") setSummary(t("onboarding.wake_word.summary_shortcut"));
+ else setSummary(trimmed.length >= 2 ? `Hey ${trimmed}` : null);
+ }, [mode, trimmed, setSummary, t]);
+
function setWordReset(next: string) {
// Any edit invalidates a previous degraded verdict — back to the normal CTA.
setWord(next);
@@ -71,11 +88,6 @@ export function WakeWordStep({ onb, goNext }: StepProps) {
if (err) setErr(null);
}
- // Shared by both the "Test your microphone" and "Say your wake word once"
- // affordances — both hit the same live dBFS read; the second just prompts
- // the user to say their word during the ~3s window instead of just any
- // sound. Never throws: a fetch failure is shown as its own honest state,
- // never blocks the save/acknowledge CTA below.
async function runMicCheck() {
setMicCheck({ state: "checking", result: null, error: null });
try {
@@ -138,211 +150,204 @@ export function WakeWordStep({ onb, goNext }: StepProps) {
}
}
- if (mode === "choice") {
- return (
- <div className="flex flex-col gap-4">
- <h2 className="font-display text-lg font-semibold">{t("onboarding.wake_word.choice_title")}</h2>
- <p className="text-sm text-muted-foreground">{t("onboarding.wake_word.choice_body")}</p>
- <div className="flex flex-col gap-3">
- <button
- type="button"
- onClick={() => setMode("wake")}
- className="flex flex-col gap-1 rounded-lg border border-muted-foreground/25 p-4 text-left hover:border-primary hover:bg-primary/5"
- >
- <span className="font-medium">{t("onboarding.wake_word.mode_wake_title")}</span>
- <span className="text-xs text-muted-foreground">{t("onboarding.wake_word.mode_wake_body")}</span>
- </button>
- <button
- type="button"
- onClick={() => setMode("shortcut")}
- className="flex flex-col gap-1 rounded-lg border border-muted-foreground/25 p-4 text-left hover:border-primary hover:bg-primary/5"
- >
- <span className="font-medium">{t("onboarding.wake_word.mode_shortcut_title")}</span>
- <span className="text-xs text-muted-foreground">{t("onboarding.wake_word.mode_shortcut_body")}</span>
- </button>
- </div>
- </div>
- );
- }
-
- if (mode === "shortcut") {
- return (
- <div className="flex flex-col gap-4">
- <div className="flex items-center justify-between">
- <h2 className="font-display text-lg font-semibold">{t("onboarding.wake_word.mode_shortcut_title")}</h2>
- <button
- type="button"
- onClick={() => setMode("choice")}
- className="text-xs text-muted-foreground underline"
- >
- {t("onboarding.wake_word.back_to_choice")}
- </button>
- </div>
- <p className="text-sm text-muted-foreground">{t("onboarding.wake_word.shortcut_note")}</p>
- {err && <p className="text-xs text-amber-500">{err}</p>}
- <Button className="w-full" disabled={busy} onClick={onChooseShortcut}>
- {busy ? t("onboarding.wake_word.saving") : t("onboarding.wake_word.shortcut_cta")}
- </Button>
- </div>
- );
- }
+ const micLine = (() => {
+ if (micCheck.state === "checking") {
+ return <StatusLine tone="muted">{t("onboarding.wake_word.mic_check.listening")}</StatusLine>;
+ }
+ if (micCheck.state !== "done") return null;
+ if (micCheck.error) {
+ return <StatusLine tone="warning">{t("onboarding.wake_word.mic_check.error")}</StatusLine>;
+ }
+ const r = micCheck.result;
+ if (!r) return null;
+ if (r.permission_required) {
+ return (
+ <StatusLine tone="warning">
+ {t("onboarding.wake_word.mic_check.permission_required")}
+ </StatusLine>
+ );
+ }
+ if (r.no_device) {
+ return <StatusLine tone="muted">{t("onboarding.wake_word.mic_check.no_device")}</StatusLine>;
+ }
+ if (r.too_quiet) {
+ return <StatusLine tone="warning">{t("onboarding.wake_word.mic_check.too_quiet")}</StatusLine>;
+ }
+ return <StatusLine tone="ok">{t("onboarding.wake_word.mic_check.good")}</StatusLine>;
+ })();
return (
- <div className="flex flex-col gap-4">
- <div className="flex items-center justify-between">
- <h2 className="font-display text-lg font-semibold">{t("onboarding.wake_word.title")}</h2>
- <button
- type="button"
- onClick={() => setMode("choice")}
- className="text-xs text-muted-foreground underline"
- >
- {t("onboarding.wake_word.back_to_choice")}
- </button>
- </div>
- <p className="text-sm text-muted-foreground">{t("onboarding.wake_word.body")}</p>
-
- <div className="flex items-center gap-2">
- <span className="rounded-md bg-muted px-3 py-2 text-sm font-medium">
- {t("onboarding.wake_word.prefix")}
- </span>
- <input
- aria-label={t("onboarding.wake_word.input_label")}
- type="text"
- value={word}
- maxLength={56}
- autoFocus
- onChange={(e) => setWordReset(e.target.value)}
- placeholder={t("onboarding.wake_word.placeholder")}
- className="w-full rounded-md border border-muted-foreground/25 bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40"
- />
- </div>
-
- {trimmed.length >= 2 && derivedName ? (
- <p className="text-xs text-muted-foreground">
- {t("onboarding.wake_word.derived_name").replace("{0}", derivedName)}
- </p>
- ) : null}
-
- <div className="flex flex-col gap-2 rounded-md border border-muted-foreground/25 p-3">
- <div className="flex flex-wrap items-center justify-between gap-2">
- <span className="text-xs font-medium">{t("onboarding.wake_word.mic_check.title")}</span>
- <div className="flex flex-wrap gap-2">
- <Button
- variant="outline"
- size="sm"
- disabled={micCheck.state === "checking"}
- onClick={() => void runMicCheck()}
- >
- {micCheck.state === "checking"
- ? t("onboarding.wake_word.mic_check.checking")
- : t("onboarding.wake_word.mic_check.test_button")}
- </Button>
- <Button
- variant="outline"
- size="sm"
- disabled={micCheck.state === "checking"}
- onClick={() => void runMicCheck()}
- >
- {t("onboarding.wake_word.mic_check.say_once_button")}
- </Button>
- </div>
+ <div className="space-y-8">
+ <StepSection label={t("onboarding.wake_word.mode_label")}>
+ <div role="radiogroup" aria-label={t("onboarding.wake_word.mode_label")} className="space-y-2">
+ <ChoiceRow
+ selected={mode === "wake"}
+ onSelect={() => setMode("wake")}
+ title={t("onboarding.wake_word.mode_wake_title")}
+ body={t("onboarding.wake_word.mode_wake_body")}
+ testId="wake-mode-wake"
+ />
+ <ChoiceRow
+ selected={mode === "shortcut"}
+ onSelect={() => setMode("shortcut")}
+ title={t("onboarding.wake_word.mode_shortcut_title")}
+ body={t("onboarding.wake_word.mode_shortcut_body")}
+ testId="wake-mode-shortcut"
+ />
</div>
- {micCheck.state === "checking" && (
- <p className="text-xs text-muted-foreground">{t("onboarding.wake_word.mic_check.listening")}</p>
- )}
- {micCheck.state === "done" && micCheck.error && (
- <p className="text-xs text-amber-500">{t("onboarding.wake_word.mic_check.error")}</p>
- )}
- {micCheck.state === "done" && micCheck.result && (
- micCheck.result.permission_required ? (
- <p className="text-xs text-amber-500">{t("onboarding.wake_word.mic_check.permission_required")}</p>
- ) : micCheck.result.no_device ? (
- <p className="text-xs text-muted-foreground">{t("onboarding.wake_word.mic_check.no_device")}</p>
- ) : micCheck.result.too_quiet ? (
- <p className="text-xs text-amber-500">{t("onboarding.wake_word.mic_check.too_quiet")}</p>
- ) : (
- <p className="text-xs text-emerald-500">{t("onboarding.wake_word.mic_check.good")}</p>
- )
- )}
- </div>
-
- <p className="text-xs text-muted-foreground">
- {t("onboarding.wake_word.notice")}{" "}
- <button
- type="button"
- onClick={() => setShowRefs((v) => !v)}
- className="text-primary underline"
- >
- {t("onboarding.wake_word.learn_more")}
- </button>
- </p>
-
- {showRefs && refs.length > 0 && (
- <div className="text-xs">
- <div className="font-medium">{t("onboarding.wake_word.references_title")}</div>
- <ul className="mt-1 list-disc pl-4">
- {refs.map((r) => (
- <li key={r.url}>
- <a href={r.url} target="_blank" rel="noreferrer" className="text-primary underline">
- {r.label}
- </a>
- </li>
- ))}
- </ul>
- <p className="mt-1 text-muted-foreground">{t("onboarding.wake_word.references_caveat")}</p>
- </div>
- )}
-
- <label className="flex items-start gap-2 text-sm">
- <input type="checkbox" checked={ack} onChange={(e) => setAck(e.target.checked)} className="mt-1" />
- {t("onboarding.wake_word.ack_label")}
- </label>
+ </StepSection>
- {err && <p className="text-xs text-amber-500">{err}</p>}
-
- {degraded ? (
- // The chosen word has no pretrained model and local Whisper is absent.
- // Offer the one-click local-speech install, or continue with the
- // honest knowledge that the wake word stays off until the pack lands.
- <div className="flex flex-col gap-2 rounded-md border border-amber-500/40 bg-amber-500/5 p-3">
- <p className="text-xs text-amber-500">
- {t("settings_view.wake_word.needs_whisper_hint")}
+ {mode === "shortcut" ? (
+ <>
+ <p className="text-sm leading-relaxed text-muted-foreground">
+ {t("onboarding.wake_word.shortcut_note")}
</p>
- {install.state === "running" ? (
- <p className="text-xs text-muted-foreground">
- {t("settings_view.wake_word.enable_local_installing")}
- </p>
- ) : install.state === "done" ? (
- <p className="text-xs text-emerald-500">
- {t("settings_view.wake_word.enable_local_done")}
- </p>
- ) : install.state === "error" ? (
- <p className="text-xs text-amber-500">
- {t("settings_view.wake_word.enable_local_error")}
- </p>
- ) : null}
- <div className="flex gap-2">
- {install.state !== "done" && (
+ {err && <StatusLine tone="error">{err}</StatusLine>}
+ <StepFooter
+ onBack={goBack}
+ primary={{
+ label: busy ? t("onboarding.wake_word.saving") : t("onboarding.nav.next"),
+ onClick: () => void onChooseShortcut(),
+ busy,
+ }}
+ />
+ </>
+ ) : (
+ <>
+ <StepSection label={t("onboarding.wake_word.word_label")}>
+ <div className="space-y-3 border-y border-border/70 py-4">
+ <p className="text-[13px] text-muted-foreground">{t("onboarding.wake_word.body")}</p>
+ <div className="flex items-center gap-2">
+ <span className="inline-flex h-8 items-center rounded-control bg-secondary px-3 text-sm font-medium text-foreground">
+ {t("onboarding.wake_word.prefix")}
+ </span>
+ <Field
+ aria-label={t("onboarding.wake_word.input_label")}
+ type="text"
+ value={word}
+ maxLength={56}
+ autoFocus
+ onChange={(e) => setWordReset(e.target.value)}
+ placeholder={t("onboarding.wake_word.placeholder")}
+ className="max-w-xs"
+ />
+ </div>
+ {trimmed.length >= 2 && derivedName ? (
+ <p className="text-[13px] text-muted-foreground">
+ {t("onboarding.wake_word.derived_name").replace("{0}", derivedName)}
+ </p>
+ ) : null}
+ <p className="text-[13px] text-muted-foreground">
+ {t("onboarding.wake_word.notice")}{" "}
+ <button
+ type="button"
+ onClick={() => setShowRefs((v) => !v)}
+ className="text-primary underline-offset-4 hover:underline"
+ >
+ {t("onboarding.wake_word.learn_more")}
+ </button>
+ </p>
+ {showRefs && refs.length > 0 && (
+ <div className="border-l-2 border-border pl-3 text-[13px]">
+ <div className="font-medium">{t("onboarding.wake_word.references_title")}</div>
+ <ul className="mt-1 space-y-0.5">
+ {refs.map((r) => (
+ <li key={r.url}>
+ <a
+ href={r.url}
+ target="_blank"
+ rel="noreferrer"
+ className="text-primary underline-offset-4 hover:underline"
+ >
+ {r.label}
+ </a>
+ </li>
+ ))}
+ </ul>
+ <p className="mt-1 text-muted-foreground">
+ {t("onboarding.wake_word.references_caveat")}
+ </p>
+ </div>
+ )}
+ </div>
+ </StepSection>
+
+ <StepSection label={t("onboarding.wake_word.mic_check.title")}>
+ <div className="flex flex-wrap items-center gap-3">
<Button
- variant="outline"
- className="flex-1"
- disabled={install.state === "running"}
- onClick={() => void startInstall()}
+ variant="quiet"
+ disabled={micCheck.state === "checking"}
+ onClick={() => void runMicCheck()}
+ data-testid="wake-mic-test"
>
- {install.state === "error"
- ? t("settings_view.wake_word.enable_local_retry")
- : t("settings_view.wake_word.enable_local_button")}
+ <Mic className="h-3.5 w-3.5" />
+ {micCheck.state === "checking"
+ ? t("onboarding.wake_word.mic_check.checking")
+ : t("onboarding.wake_word.mic_check.test_button")}
</Button>
- )}
- <Button className="flex-1" disabled={busy} onClick={onContinueDegraded}>
- {t("onboarding.wake_word.continue_anyway")}
- </Button>
- </div>
- </div>
- ) : (
- <Button className="w-full" disabled={!canSave} onClick={onSaveWake}>
- {busy ? t("onboarding.wake_word.saving") : t("onboarding.wake_word.cta")}
- </Button>
+ <div className="min-w-0 flex-1">{micLine}</div>
+ </div>
+ </StepSection>
+
+ <ConsentLine checked={ack} onChange={setAck} testId="wake-ack">
+ {t("onboarding.wake_word.ack_label")}
+ </ConsentLine>
+
+ {err && <StatusLine tone="error">{err}</StatusLine>}
+
+ {degraded ? (
+ // The chosen word has no pretrained model and local Whisper is
+ // absent. Offer the one-click local-speech install, or continue
+ // with the honest knowledge that the wake word stays off until
+ // the pack lands.
+ <div className="space-y-3">
+ <StatusLine tone="warning">{t("settings_view.wake_word.needs_whisper_hint")}</StatusLine>
+ {install.state === "running" && (
+ <StatusLine tone="muted">
+ {t("settings_view.wake_word.enable_local_installing")}
+ </StatusLine>
+ )}
+ {install.state === "done" && (
+ <StatusLine tone="ok">{t("settings_view.wake_word.enable_local_done")}</StatusLine>
+ )}
+ {install.state === "error" && (
+ <StatusLine tone="warning">
+ {t("settings_view.wake_word.enable_local_error")}
+ </StatusLine>
+ )}
+ <StepFooter
+ onBack={goBack}
+ primary={{
+ label: t("onboarding.wake_word.continue_anyway"),
+ onClick: () => void onContinueDegraded(),
+ busy,
+ }}
+ secondary={
+ install.state !== "done"
+ ? {
+ label:
+ install.state === "error"
+ ? t("settings_view.wake_word.enable_local_retry")
+ : t("settings_view.wake_word.enable_local_button"),
+ onClick: () => void startInstall(),
+ busy: install.state === "running",
+ }
+ : null
+ }
+ />
+ </div>
+ ) : (
+ <StepFooter
+ onBack={goBack}
+ primary={{
+ label: busy ? t("onboarding.wake_word.saving") : t("onboarding.wake_word.cta"),
+ onClick: () => void onSaveWake(),
+ disabled: !canSave,
+ busy,
+ }}
+ />
+ )}
+ </>
)}
</div>
);
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.test.tsx
index 01ccaa22f1..0e07aaf2c6 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.test.tsx
@@ -1,25 +1,101 @@
-import { cleanup, fireEvent, render, screen } from "@testing-library/react";
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
import { afterEach, expect, it, vi } from "vitest";
vi.mock("@/i18n", () => ({ useT: () => (k: string) => k }));
-vi.mock("../IntroClip", () => ({ IntroClip: () => <div data-testid="clip" /> }));
+vi.mock("../IntroSequence", () => ({ IntroSequence: () => <div data-testid="intro" /> }));
import { WelcomeStep } from "./WelcomeStep";
-afterEach(cleanup);
+afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+});
+
+const base = {
+ goBack: vi.fn(),
+ skip: vi.fn(),
+ isFirst: true,
+ isLast: false,
+ summaries: {},
+};
+
+it("renders the intro and the capability register; continue stays disabled until accepted", () => {
+ render(
+ <WelcomeStep
+ {...base}
+ onb={{ acceptTerms: vi.fn() } as never}
+ goNext={vi.fn()}
+ setSummary={vi.fn()}
+ />,
+ );
+ expect(screen.getByTestId("intro")).toBeDefined();
+ expect(screen.getByText("onboarding.welcome.cap_commands")).toBeDefined();
+ expect(screen.getByText("onboarding.welcome.cap_mistakes")).toBeDefined();
+ const cta = screen.getByTestId("onboarding-primary") as HTMLButtonElement;
+ expect(cta.disabled).toBe(true);
+});
+
+it("AWAITS the terms record before advancing and reports the summary", async () => {
+ const goNext = vi.fn();
+ const setSummary = vi.fn();
+ let resolveAccept: () => void = () => undefined;
+ const acceptTerms = vi.fn(
+ () =>
+ new Promise<void>((resolve) => {
+ resolveAccept = resolve;
+ }),
+ );
+ render(
+ <WelcomeStep
+ {...base}
+ onb={{ acceptTerms } as never}
+ goNext={goNext}
+ setSummary={setSummary}
+ />,
+ );
+ fireEvent.click(screen.getByTestId("onboarding-accept"));
+ expect(setSummary).toHaveBeenLastCalledWith("onboarding.welcome.summary_accepted");
+ fireEvent.click(screen.getByTestId("onboarding-primary"));
+ expect(acceptTerms).toHaveBeenCalled();
+ // Not yet: the POST is still in flight.
+ expect(goNext).not.toHaveBeenCalled();
+ resolveAccept();
+ await waitFor(() => expect(goNext).toHaveBeenCalled());
+});
-it("renders the clip and advances on the CTA", () => {
+it("a failed acceptance stays on the step and says so", async () => {
const goNext = vi.fn();
render(
- <WelcomeStep onb={{} as never} goNext={goNext} goBack={vi.fn()} skip={vi.fn()} isFirst isLast={false} />,
+ <WelcomeStep
+ {...base}
+ onb={{ acceptTerms: vi.fn().mockRejectedValue(new Error("HTTP 503")) } as never}
+ goNext={goNext}
+ setSummary={vi.fn()}
+ />,
+ );
+ fireEvent.click(screen.getByTestId("onboarding-accept"));
+ fireEvent.click(screen.getByTestId("onboarding-primary"));
+ await waitFor(() =>
+ expect(screen.getByText("onboarding.welcome.accept_failed")).toBeDefined(),
);
- expect(screen.getByTestId("clip")).toBeDefined();
- fireEvent.click(screen.getByRole("button", { name: "onboarding.welcome.cta" }));
- expect(goNext).toHaveBeenCalled();
+ expect(goNext).not.toHaveBeenCalled();
});
-it("skip-setup calls skip", () => {
- const skip = vi.fn();
+it("decline posts decline-terms and renders the goodbye state", async () => {
+ const calls: string[] = [];
+ vi.stubGlobal(
+ "fetch",
+ vi.fn((url: string) => {
+ calls.push(url);
+ return Promise.resolve({ ok: true, json: () => Promise.resolve({}) });
+ }),
+ );
render(
- <WelcomeStep onb={{} as never} goNext={vi.fn()} goBack={vi.fn()} skip={skip} isFirst isLast={false} />,
+ <WelcomeStep
+ {...base}
+ onb={{ acceptTerms: vi.fn() } as never}
+ goNext={vi.fn()}
+ setSummary={vi.fn()}
+ />,
);
- fireEvent.click(screen.getByRole("button", { name: "onboarding.welcome.skip_setup" }));
- expect(skip).toHaveBeenCalled();
+ fireEvent.click(screen.getByTestId("onboarding-decline"));
+ expect(screen.getByTestId("onboarding-declined")).toBeDefined();
+ await waitFor(() => expect(calls).toContain("/api/onboarding/decline-terms"));
});
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.tsx b/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.tsx
index f2fdd5a5c3..adb445db20 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/steps/WelcomeStep.tsx
@@ -1,19 +1,143 @@
-import { Button } from "@/components/ui/button";
+import { useEffect, useState } from "react";
+import { AlertTriangle, Cloud, CreditCard, Monitor, Terminal } from "lucide-react";
import { useT } from "@/i18n";
import type { StepProps } from "../OnboardingFlow";
-import { IntroClip } from "../IntroClip";
+import { IntroSequence } from "../IntroSequence";
+import { ConsentLine, Register, StatusLine, StepFooter, StepSection } from "../primitives";
-export function WelcomeStep({ goNext, skip }: StepProps) {
+/**
+ * The first step is the consent moment. It replaced a separate "I understand
+ * the risks" card (a checkbox and a warning emoji) with the plain list of
+ * what the assistant actually does on this machine, then the one line of
+ * acceptance the legal posture needs.
+ *
+ * Acceptance is AWAITED: the Terms record must exist before the guide goes
+ * on. A warming backend answers this route from the fast-boot path, so the
+ * wait is normally invisible; a real failure shows in place and the step
+ * stays. Declining is a real, equal-weight choice: it asks the backend to
+ * quit the whole app and renders a terminal goodbye state (the desktop
+ * window disappears with the process). Nothing is persisted on decline —
+ * the next start shows this step again.
+ */
+export function WelcomeStep({ onb, goNext, setSummary }: StepProps) {
const t = useT();
+ const [accepted, setAccepted] = useState(false);
+ const [busy, setBusy] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const [declined, setDeclined] = useState(false);
+ const [terms, setTerms] = useState<string | null>(null);
+ const [showTerms, setShowTerms] = useState(false);
+
+ useEffect(() => {
+ setSummary(accepted ? t("onboarding.welcome.summary_accepted") : null);
+ }, [accepted, setSummary, t]);
+
+ const toggleTerms = async () => {
+ setShowTerms((v) => !v);
+ if (terms === null) {
+ try {
+ const res = await fetch("/api/onboarding/terms");
+ setTerms(res.ok ? ((await res.json()) as { text: string }).text : "");
+ } catch {
+ setTerms("");
+ }
+ }
+ };
+
+ const proceed = async () => {
+ if (!accepted || busy) return;
+ setBusy(true);
+ setError(null);
+ try {
+ await onb.acceptTerms();
+ goNext();
+ } catch {
+ setError(t("onboarding.welcome.accept_failed"));
+ } finally {
+ setBusy(false);
+ }
+ };
+
+ const decline = async () => {
+ // Show the goodbye state first — the backend kills the process moments
+ // after answering, so this screen is the last thing the browser renders.
+ setDeclined(true);
+ try {
+ await fetch("/api/onboarding/decline-terms", { method: "POST" });
+ } catch {
+ // Best-effort: a warming/erroring backend cannot block the goodbye
+ // screen; the user closes the window either way.
+ }
+ };
+
+ if (declined) {
+ return (
+ <div className="max-w-xl space-y-3 pt-6" data-testid="onboarding-declined">
+ <h3 className="text-lg font-semibold tracking-tight">
+ {t("onboarding.welcome.declined_title")}
+ </h3>
+ <p className="text-sm leading-relaxed text-muted-foreground">
+ {t("onboarding.welcome.declined_body")}
+ </p>
+ </div>
+ );
+ }
+
+ const capabilities = [
+ { key: "commands", icon: <Terminal className="h-4 w-4" />, text: t("onboarding.welcome.cap_commands") },
+ { key: "screen", icon: <Monitor className="h-4 w-4" />, text: t("onboarding.welcome.cap_screen") },
+ { key: "cloud", icon: <Cloud className="h-4 w-4" />, text: t("onboarding.welcome.cap_cloud") },
+ { key: "costs", icon: <CreditCard className="h-4 w-4" />, text: t("onboarding.welcome.cap_costs") },
+ { key: "mistakes", icon: <AlertTriangle className="h-4 w-4" />, text: t("onboarding.welcome.cap_mistakes") },
+ ];
+
return (
- <div className="flex flex-col gap-5 text-center">
- <h1 className="font-display text-2xl font-semibold">{t("onboarding.welcome.title")}</h1>
- <p className="text-sm text-muted-foreground">{t("onboarding.welcome.subtitle")}</p>
- <IntroClip />
- <Button className="w-full" onClick={goNext}>{t("onboarding.welcome.cta")}</Button>
- <button className="text-xs text-muted-foreground underline" onClick={skip}>
- {t("onboarding.welcome.skip_setup")}
- </button>
+ <div className="space-y-8">
+ <IntroSequence />
+
+ <StepSection label={t("onboarding.welcome.capabilities_label")}>
+ <Register
+ items={capabilities.map((c) => ({ key: c.key, icon: c.icon, children: c.text }))}
+ />
+ </StepSection>
+
+ <div className="space-y-3">
+ <p className="text-sm leading-relaxed text-muted-foreground">
+ {t("onboarding.welcome.liability")}
+ </p>
+ <button
+ type="button"
+ className="text-[13px] text-muted-foreground underline underline-offset-4 hover:text-foreground"
+ onClick={() => void toggleTerms()}
+ >
+ {showTerms ? t("onboarding.welcome.hide_terms") : t("onboarding.welcome.view_terms")}
+ </button>
+ {showTerms && (
+ <pre className="max-h-48 overflow-y-auto whitespace-pre-wrap border-l-2 border-border py-1 pl-3 font-sans text-xs leading-relaxed text-muted-foreground scrollbar-jarvis">
+ {terms ?? t("onboarding.welcome.terms_loading")}
+ </pre>
+ )}
+ </div>
+
+ <ConsentLine checked={accepted} onChange={setAccepted} testId="onboarding-accept">
+ {t("onboarding.welcome.accept_label")}
+ </ConsentLine>
+
+ {error && <StatusLine tone="error">{error}</StatusLine>}
+
+ <StepFooter
+ primary={{
+ label: t("onboarding.welcome.proceed"),
+ onClick: () => void proceed(),
+ disabled: !accepted,
+ busy,
+ }}
+ secondary={{
+ label: t("onboarding.welcome.decline"),
+ onClick: () => void decline(),
+ testId: "onboarding-decline",
+ }}
+ />
</div>
);
}
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 1a4779433a..c5c7769bb1 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -77,7 +77,7 @@
"plugins": "Plugins",
"docs": "Docs",
"mcps": "MCPs",
- "tasks": "Aufgaben",
+ "tasks": "Automatisierungen",
"sessions": "Transkription",
"run_inspector": "Run Inspector",
"costs": "Kosten",
@@ -760,7 +760,7 @@
}
},
"tasks_view": {
- "title": "Aufgaben",
+ "title": "Automatisierungen",
"subtitle": "Persistente Task-Queue — Erinnerungen, Harness-Dispatches, Tool-Calls.",
"filter_all": "Alle",
"filter_active": "Aktiv",
@@ -777,6 +777,7 @@
"state": {
"pending": "wartet",
"scheduled": "geplant",
+ "paused": "pausiert",
"running": "läuft",
"completed": "fertig",
"failed": "fehler",
@@ -857,6 +858,93 @@
"in_prefix": "in",
"due_now": "fällig"
},
+ "automations_view": {
+ "title": "Automatisierungen",
+ "subtitle": "Wiederkehrende Agenten-Aufgaben — deine eigenen und ein Katalog fertiger Vorlagen.",
+ "new_button": "Neue Automatisierung",
+ "refresh": "Aktualisieren",
+ "tab_automations": "Automatisierungen",
+ "tab_runs": "Läufe",
+ "yours_heading": "Deine Automatisierungen",
+ "yours_empty": "Noch keine Automatisierungen.",
+ "yours_empty_hint": "Füge eine aus dem Katalog unten hinzu oder erstelle deine eigene mit „Neue Automatisierung“.",
+ "catalogue_heading": "Katalog",
+ "catalogue_hint": "Fertige Automatisierungen — hinzufügen und den Zeitplan anpassen.",
+ "catalogue_loading": "Lade Katalog…",
+ "catalogue_error": "Katalog konnte nicht geladen werden",
+ "catalogue_empty": "Der Katalog ist leer.",
+ "catalogue_unavailable": "Der Katalog ist noch nicht verfügbar — starte die App neu, um ihn zu aktivieren.",
+ "route_unavailable": "Diese Aktion braucht das aktualisierte Backend — starte die App neu.",
+ "already_running": "Diese Automatisierung läuft gerade schon.",
+ "category": {
+ "news": "Nachrichten",
+ "productivity": "Produktivität",
+ "finance": "Finanzen",
+ "research": "Recherche",
+ "developer": "Entwickler"
+ },
+ "add": "Hinzufügen",
+ "added": "Hinzugefügt",
+ "show_installed": "Deine Automatisierung anzeigen",
+ "needs": "Braucht {tools}",
+ "needs_warning": "Diese Automatisierung braucht {tools} — das ist nicht verbunden. Du kannst sie trotzdem hinzufügen; sie läuft, sobald das Plugin verbunden ist.",
+ "add_dialog_title": "Hinzufügen: {name}",
+ "add_error": "Automatisierung konnte nicht hinzugefügt werden.",
+ "added_notice": "„{name}“ hinzugefügt.",
+ "required": "Pflichtfeld",
+ "kind": {
+ "hourly": "Stündlich",
+ "daily": "Täglich",
+ "weekly": "Wöchentlich"
+ },
+ "weekday_label": "Wochentag",
+ "time_label": "Uhrzeit",
+ "weekday": {
+ "0": "Montags",
+ "1": "Dienstags",
+ "2": "Mittwochs",
+ "3": "Donnerstags",
+ "4": "Freitags",
+ "5": "Samstags",
+ "6": "Sonntags"
+ },
+ "schedule": {
+ "hourly": "Stündlich",
+ "daily": "Täglich um {time}",
+ "weekly": "{day} um {time}",
+ "every_minutes": "Alle {n} Min.",
+ "every_hours": "Alle {n} Std.",
+ "on_event": "Bei einem Ereignis"
+ },
+ "schedule_label": "Zeitplan",
+ "next_run": "Nächster Lauf",
+ "last_run": "Letzter Lauf",
+ "never_ran": "noch nie gelaufen",
+ "run_now": "Jetzt ausführen",
+ "run_started": "Läuft jetzt.",
+ "run_error": "Lauf konnte nicht gestartet werden.",
+ "pause": "Pausieren",
+ "resume": "Fortsetzen",
+ "paused_notice": "Pausiert.",
+ "resumed": "Fortgesetzt.",
+ "toggle_error": "Automatisierung konnte nicht geändert werden.",
+ "deleted": "Gelöscht.",
+ "delete_error": "Automatisierung konnte nicht gelöscht werden.",
+ "delete_confirm": "Löschen?",
+ "keep": "Behalten",
+ "details": "Details",
+ "latest_result": "Letztes Ergebnis",
+ "result": "Ergebnis",
+ "timeline": "Verlauf",
+ "no_result_yet": "Noch kein Ergebnis.",
+ "runs_empty": "Noch keine Läufe — sie erscheinen hier, sobald die erste Automatisierung gelaufen ist.",
+ "runs_filter": {
+ "all": "Alle",
+ "running": "Laufend",
+ "done": "Fertig",
+ "problems": "Probleme"
+ }
+ },
"plugins_view": {
"title": "Plugins",
"count": "{n} verfügbar · {connected} verbunden",
@@ -1670,7 +1758,6 @@
"no_providers_in_tier": "In dieser Kategorie sind keine Provider verfügbar.",
"model_picker_activate_hint": "Aktiviere diesen Provider, um seine Stimme oder sein Modell zu wählen.",
"active_tooltip": "Bereits aktiv",
- "click_to_activate": "Klick aktiviert diesen Provider",
"click_to_activate": "Klick aktiviert diesen Provider und öffnet die Einstellungen",
"provider_active": "Aktiv",
"provider_set_active": "Aktivieren",
@@ -1927,9 +2014,9 @@
"title": "Denkpause",
"description": "Wie lange {name} in Stille wartet, bevor er deinen Satz übernimmt. Auf Automatisch nutzt jeder Sprachmodus seine eigene Werkseinstellung — das ist die kürzeste Pause. Höher stellen, um mehr Zeit zum Innehalten und Zu-Ende-Denken zu haben; sprichst du innerhalb der Pause weiter, wird das Gesagte an dieselbe Anfrage angehängt. Gilt für beide Sprachmodi — Pipeline sofort, Realtime ab dem nächsten Anruf.",
"unit_seconds": "s",
- "automatic_label": "Automatisch",
- "automatic_caption": "Werkseinstellung des Anbieters — kürzeste Pause.",
- "saved_toast_automatic": "Denkpause auf Automatisch gesetzt.",
+ "automatic_label": "Automatisch",
+ "automatic_caption": "Werkseinstellung des Anbieters — kürzeste Pause.",
+ "saved_toast_automatic": "Denkpause auf Automatisch gesetzt.",
"reset": "Auf Standard zurücksetzen (Automatisch)",
"saved_toast": "Denkpause auf {0} gesetzt.",
"restart_caption": "Gespeichert — wird beim nächsten Start aktiv."
@@ -2537,156 +2624,158 @@
"install_failed": "{0}: Install fehlgeschlagen (exit {1}). Versuch eine andere Methode."
},
"onboarding": {
- "progress_label": "Onboarding-Fortschritt",
+ "progress_label": "Einrichtungsfortschritt",
+ "eyebrow": "Erster Start",
+ "step_progress": "{0} von {1}",
"nav": {
"next": "Weiter",
"back": "Zurück",
"skip": "Überspringen"
},
- "welcome": {
- "title": "Willkommen bei Personal Jarvis",
- "subtitle": "Dein sprachgesteuerter KI-Assistent. Lass uns alles einrichten.",
- "cta": "Los geht's",
- "skip_setup": "Einrichtung vorerst überspringen"
- },
- "tutorial": {
- "title": "Sieh dir die 2-Minuten-Tour an",
- "body": "Ein kurzer Überblick, was Personal Jarvis kann und wie die Einrichtung läuft. Du kannst überspringen und sofort loslegen.",
- "continue": "Weiter",
- "skip": "Video überspringen",
- "play": "Tutorial-Video abspielen"
+ "steps": {
+ "welcome": {
+ "label": "Bevor wir starten",
+ "title": "Bevor wir starten",
+ "hint": "{name} handelt auf deinem Computer. Lies, was das bedeutet, und entscheide dann."
+ },
+ "language": {
+ "label": "Sprache",
+ "title": "Welche Sprache soll {name} sprechen?",
+ "hint": "Oberfläche und Antworten dürfen sich unterscheiden. Beides lässt sich später in den Einstellungen ändern."
+ },
+ "api-keys": {
+ "label": "Dein Schlüssel",
+ "title": "Ein Schlüssel genügt zum Start",
+ "hint": "Füge einen API-Schlüssel eines Anbieters ein, den du schon nutzt — oder arbeite komplett lokal. Sprachanbieter kannst du später unter API-Schlüssel ergänzen."
+ },
+ "permissions": {
+ "label": "Berechtigungen",
+ "title": "Zugriff auf diesem Mac erlauben",
+ "hint": "macOS fragt jede Fähigkeit einzeln ab. Erteile sie und komm zurück — die Liste aktualisiert sich selbst."
+ },
+ "wake-word": {
+ "label": "Aktivierung",
+ "title": "Wie möchtest du {name} rufen?",
+ "hint": "Ein eigenes Aktivierungswort oder ein Tastenkürzel. Beides lässt sich später ändern."
+ },
+ "finish": {
+ "label": "Bereit",
+ "title": "{name} ist bereit",
+ "hint": "Das hast du eingerichtet. Ein Neustart übernimmt alles."
+ }
},
- "risk": {
- "title": "Bevor du fortfährst",
- "lead": "Personal Jarvis ist mächtige, experimentelle Software.",
- "body": "Sie kann deinen Computer steuern, Befehle ausführen, Apps öffnen, Nachrichten senden und Dateien in deinem Namen verändern — und sie kann Fehler machen. Sie kann ungewollte oder sogar zerstörerische Dinge tun.",
- "liability": "Die Nutzung erfolgt vollständig auf eigenes Risiko. Die Entwickler übernehmen keine Haftung für Schäden, Datenverlust oder andere Folgen. Fahre nur fort, wenn du das verstehst und akzeptierst.",
- "accept_label": "Ich verstehe die Risiken und akzeptiere, dass ich Personal Jarvis auf eigenes Risiko nutze.",
- "proceed": "Verstanden — fortfahren",
- "decline": "Ablehnen & beenden",
- "declined_title": "Jarvis wird beendet",
- "declined_body": "Du hast die Bedingungen abgelehnt, deshalb wird Personal Jarvis jetzt geschlossen — es wurde nichts eingerichtet und nichts gespeichert. Starte die App jederzeit erneut, wenn du es dir anders überlegst; diese Frage erscheint dann wieder.",
- "view_terms": "Vollständige Nutzungsbedingungen anzeigen",
- "terms_loading": "Bedingungen werden geladen…"
+ "welcome": {
+ "capabilities_label": "Was {name} kann",
+ "cap_commands": "Befehle ausführen, Apps öffnen und Dateien in deinem Namen ändern",
+ "cap_screen": "Deinen Bildschirm sehen und auf Wunsch darauf handeln",
+ "cap_cloud": "Was du sagst an den KI-Anbieter senden, den du wählst",
+ "cap_costs": "Dein Anbieterkonto nutzen — abgerechnet wird dort, vom Anbieter",
+ "cap_mistakes": "Fehler machen — auch ungewollte oder zerstörerische",
+ "liability": "Die Nutzung erfolgt vollständig auf eigenes Risiko. Die Entwickler übernehmen keine Haftung für Schäden, Datenverlust oder andere Folgen.",
+ "accept_label": "Ich verstehe die Risiken und nutze {name} auf eigenes Risiko.",
+ "view_terms": "Die vollständigen Nutzungsbedingungen lesen",
+ "hide_terms": "Nutzungsbedingungen ausblenden",
+ "terms_loading": "Bedingungen werden geladen…",
+ "proceed": "Verstanden — weiter",
+ "decline": "Ablehnen und beenden",
+ "accept_failed": "Deine Zustimmung konnte nicht gespeichert werden. Prüfe, ob die App läuft, und versuche es erneut.",
+ "declined_title": "{name} wird beendet",
+ "declined_body": "Du hast die Bedingungen abgelehnt — nichts wurde eingerichtet und nichts gespeichert. Starte die App jederzeit neu; dieser Bildschirm fragt dann erneut.",
+ "summary_accepted": "Bedingungen akzeptiert"
},
"intro": {
- "scene_1": "Triff deinen sprachgesteuerten Assistenten.",
- "scene_2": "Sprich einfach — er hört zu und handelt.",
- "scene_3": "Er arbeitet im Hintergrund weiter, wenn du es nicht tust.",
+ "scene_1": "Dein sprachgesteuerter Assistent.",
+ "scene_2": "Einfach sprechen — er hört zu und handelt.",
+ "scene_3": "Er arbeitet im Hintergrund weiter, während du es nicht tust.",
"scene_4": "Deine Schlüssel, deine Daten, deine Regeln."
},
- "terms": {
- "title": "Nutzungsbedingungen & Haftungsausschluss",
- "intro": "Bitte lies und akzeptiere sie, bevor du fortfährst.",
- "accept_label": "Ich habe die Nutzungsbedingungen & den Haftungsausschluss gelesen und akzeptiere sie.",
- "continue": "Akzeptieren & weiter"
- },
"language": {
- "title": "Wähle deine Sprache",
- "ui_label": "Oberflächensprache",
- "reply_label": "Antwortsprache"
+ "ui_label": "Sprache der Oberfläche",
+ "ui_hint": "Menüs, Schaltflächen und Einstellungen",
+ "reply_label": "Antwortsprache",
+ "reply_hint": "Worin {name} antwortet — Auto folgt der Sprache, in der du sprichst",
+ "auto": "Auto — folgt mir",
+ "summary": "{0} · Antworten {1}"
+ },
+ "api_keys": {
+ "providers_label": "Anbieter",
+ "loading": "Anbieter werden geladen…",
+ "load_failed": "Die Anbieterliste konnte nicht geladen werden. Du kannst später unter API-Schlüssel einen Schlüssel hinzufügen.",
+ "recommended": "Empfohlen",
+ "configured": "Schlüssel gespeichert",
+ "not_configured": "Kein Schlüssel",
+ "active": "Aktiv",
+ "show_more": "{0} weitere anzeigen",
+ "show_less": "Weniger anzeigen",
+ "local_label": "Kein Schlüssel zur Hand?",
+ "local_title": "Komplett lokal mit Ollama",
+ "local_checking": "Suche nach einem lokalen Ollama…",
+ "local_detected": "Ollama läuft auf diesem Rechner — {name} kann komplett lokal denken, ganz ohne Schlüssel.",
+ "local_detected_empty": "Ollama läuft, hat aber noch kein Modell — lade zuerst eines (z. B. ollama pull qwen3.5).",
+ "local_use_button": "Lokales Modell nutzen",
+ "local_active": "Lokales Gehirn aktiv — Ollama antwortet von diesem Rechner.",
+ "local_missing": "Installiere Ollama, und {name} läuft komplett lokal — ohne Cloud-Konto.",
+ "local_missing_link": "Ollama holen",
+ "security_note": "Schlüssel liegen im Schlüsselbund deines Systems und gehen nur an den Anbieter, den du gewählt hast — nie in Chat oder Sprache.",
+ "later": "Später — Schlüssel in den Einstellungen hinzufügen",
+ "later_hint": "Chat und Sprache bleiben aus, bis ein Schlüssel gespeichert ist.",
+ "summary_none": "Noch kein Schlüssel",
+ "summary_local": "Lokal · Ollama"
},
"permissions": {
- "title": "Zugriff auf diesem Mac erlauben",
- "body": "macOS lässt jede Funktion einzeln bestätigen. Nutze die Schaltflächen unten und kehre danach hierher zurück; der Status wird automatisch aktualisiert.",
- "privacy_note": "Diese Abfragen kommen von macOS. Das Installationsprogramm kann sie nicht stillschweigend freigeben, und Personal Jarvis umgeht niemals die Systemeinstellungen. Die Schlüsselbund-Abfrage beim App-Start bedeutet nur, dass Personal Jarvis deine API-Keys verschlüsselt im macOS-Schlüsselbund speichert — sie verlassen deinen Mac nicht.",
+ "privacy_note": "Diese Abfragen kommen von macOS. Der Installer kann sie nicht still genehmigen, und {name} umgeht die Systemeinstellungen nie. Die Schlüsselbund-Abfrage beim App-Start bedeutet nur, dass deine API-Schlüssel verschlüsselt im macOS-Schlüsselbund gespeichert werden — sie verlassen deinen Mac nie.",
"continue": "Weiter",
- "text_only": "Nur mit Text fortfahren"
+ "text_only": "Nur mit Text weitermachen",
+ "summary_ready": "Erteilt",
+ "summary_skipped": "Nur Text"
},
"wake_word": {
- "choice_title": "Wie möchtest du {name} aktivieren?",
- "choice_body": "Wähle, was zu deiner Arbeitsweise passt — du kannst das später in den Einstellungen ändern.",
+ "mode_label": "Aktivierung",
"mode_wake_title": "Aktivierungswort",
- "mode_wake_body": "Sag jederzeit dein eigenes Wort — {name} hört ständig mit. Braucht ein kleines lokales Modell für genau dein Wort.",
- "mode_shortcut_title": "Tastenkombination",
- "mode_shortcut_body": "Kein Aktivierungswort — drücke das Anruf-Tastenkürzel, um eine Sprachsitzung zu starten.",
- "back_to_choice": "Zurück",
- "shortcut_note": "Du aktivierst {name} über das Anruf-Tastenkürzel statt über ein Aktivierungswort. Du kannst es jederzeit unter Einstellungen → Sprach-Tastenkürzel festlegen.",
- "shortcut_cta": "Weiter",
- "title": "Wähle dein Aktivierungswort",
- "body": "Wähle das Wort, das deinen Assistenten aufweckt. \"Hey\" bleibt fest — den Rest bestimmst du.",
+ "mode_wake_body": "Sag jederzeit dein eigenes Wort — hört immer zu. Braucht ein kleines lokales Modell für genau dein Wort.",
+ "mode_shortcut_title": "Tastenkürzel",
+ "mode_shortcut_body": "Kein Aktivierungswort — drücke das Anruf-Kürzel, um eine Sprachsitzung zu starten.",
+ "selected": "Gewählt",
+ "shortcut_note": "Du aktivierst {name} mit dem Anruf-Kürzel statt mit einem Aktivierungswort. Du kannst es jederzeit unter Einstellungen → Sprach-Tastenkürzel anpassen.",
+ "word_label": "Dein Wort",
+ "body": "„Hey“ bleibt fest — den Rest wählst du.",
"prefix": "Hey",
"input_label": "Dein Aktivierungswort",
"placeholder": "z. B. Nova",
- "notice": "Nimm irgendein Wort — achte nur darauf, dass es keine fremde Marke ist.",
- "learn_more": "Wie prüfen?",
+ "notice": "Wähle ein beliebiges Wort — achte nur darauf, dass es keine fremde Marke ist.",
+ "learn_more": "So prüfst du das",
"references_title": "Wo du geschützte Namen prüfen kannst",
- "references_caveat": "Diese Referenzen dienen nur zur Information und können unvollständig oder veraltet sein — sie ersetzen nicht deine eigene Prüfung.",
- "ack_label": "Ich bin für mein gewähltes Weckwort selbst verantwortlich.",
- "cta": "Aktivierungswort speichern",
- "saving": "Speichern…",
- "derived_name": "Dein Assistent heißt dann: {0}",
- "continue_anyway": "Trotzdem fortfahren",
+ "references_caveat": "Diese Verweise sind informativ und können unvollständig oder veraltet sein — sie ersetzen deine eigene Prüfung nicht.",
+ "ack_label": "Ich bin für das gewählte Aktivierungswort verantwortlich.",
+ "cta": "Speichern und weiter",
+ "saving": "Wird gespeichert…",
+ "derived_name": "Dein Assistent heißt dann {0}",
+ "continue_anyway": "Trotzdem weiter",
+ "summary_shortcut": "Tastenkürzel",
"mic_check": {
- "title": "Mikrofon-Check",
+ "title": "Mikrofon",
"test_button": "Mikrofon testen",
- "say_once_button": "Aktivierungswort einmal sagen",
"checking": "Höre zu…",
- "listening": "Höre zu — sprich jetzt…",
+ "listening": "Höre zu — sag jetzt dein Wort.",
"good": "Klingt gut — dein Mikrofon hat deine Stimme klar aufgenommen.",
- "too_quiet": "Das war sehr leise. Erhöhe die Mikrofonlautstärke oder rücke näher heran und versuche es erneut.",
+ "too_quiet": "Das war sehr leise. Dreh das Mikrofon lauter oder geh näher heran und versuche es erneut.",
"no_device": "Kein Mikrofon erkannt — du kannst die Einrichtung trotzdem abschließen und das später in den Einstellungen beheben.",
- "permission_required": "Erteile unter Berechtigungen zuerst den Mikrofonzugriff, bevor du diesen Check startest.",
+ "permission_required": "Erteile unter Berechtigungen zuerst den Mikrofonzugriff, bevor du diesen Test startest.",
"error": "Das Mikrofon konnte gerade nicht geprüft werden."
}
},
- "api_keys": {
- "title": "API-Schlüssel nach dem Onboarding einrichten",
- "body": "Schließe zuerst das Onboarding ab. Öffne danach API Keys & Providers. Du musst nicht jedes API-Key-Feld ausfüllen.",
- "screenshot_alt": "Personal-Jarvis-Ansicht mit Markierungen bei der API-Keys-Navigation und beim Schalter Realtime oder Pipeline",
- "api_location_title": "API Keys öffnen",
- "api_location_body": "Wähle nach dem Onboarding links in der Seitenleiste API Keys. Füge Anbieter-Schlüssel nur in dieser sicheren Ansicht ein.",
- "voice_mode_title": "Wähle deinen Sprachmodus",
- "realtime_label": "Realtime (empfohlen, Research-Preview):",
- "realtime_body": "Füge einen OpenAI- oder Gemini-Schlüssel für Zuhören, Denken und Sprechen in einem Modell hinzu.",
- "pipeline_label": "Pipeline (nicht empfohlen):",
- "pipeline_body": "Füge nur Schlüssel für die ausgewählten Anbieter für Denken, Sprachausgabe und Spracheingabe hinzu.",
- "security_note": "Füge Schlüssel ausschließlich in der sicheren API-Keys-Ansicht ein — niemals im Chat oder per Sprache.",
- "local_title": "Kein API-Key? Komplett lokal starten",
- "local_checking": "Suche nach einem lokalen Ollama…",
- "local_detected": "Ollama auf diesem Rechner gefunden — Jarvis kann komplett lokal denken, ganz ohne Key.",
- "local_detected_empty": "Ollama läuft, hat aber noch kein Modell — lade zuerst eins (z. B. ollama pull qwen3.5).",
- "local_use_button": "Lokales Modell verwenden",
- "local_active": "Lokales Gehirn aktiv — Ollama antwortet von diesem Rechner, und die Sprache steht auf Pipeline, damit es auch genutzt wird.",
- "local_missing": "Kein API-Key zur Hand? Installiere Ollama und Jarvis läuft komplett lokal — ohne Cloud-Konto.",
- "local_missing_link": "Ollama holen",
- "continue": "Onboarding fortsetzen"
- },
- "mic_test": {
- "title": "Mikrofon-Check",
- "body": "Stellen wir sicher, dass dein Assistent dich hören kann.",
- "no_mic": "Kein Mikrofon erkannt. Du kannst trotzdem per Text oder über einen Kanal wie Telegram sprechen.",
- "skip": "Mikrofon-Check überspringen"
- },
- "system_style": {
- "title": "Wähle deinen Stil",
- "body": "Wie soll dein Assistent auf dem Bildschirm erscheinen? Du kannst das jederzeit in den Einstellungen ändern.",
- "recommended": "Empfohlen",
- "options": {
- "jarvis_bar": "Jarvis-Leiste",
- "mascot": "Maskottchen",
- "voice_orb": "Voice-Orb",
- "none": "Kein Overlay"
- },
- "captions": {
- "jarvis_bar": "Eine schmale schwebende Sprachleiste, immer griffbereit.",
- "mascot": "Ein schwebender Begleiter, der auf deine Stimme reagiert.",
- "voice_orb": "Eine leuchtende Kugel aus ziehendem Licht — auf jeden Bildschirm ziehbar.",
- "none": "Nur das App-Fenster — kein schwebendes Element auf dem Bildschirm."
- },
- "needs_restart": "Fast geschafft — dieser Stil wird nach einem kurzen Neustart aktiv.",
- "restart_now": "Jetzt neu starten",
- "restarting": "Wird neu gestartet…",
- "save_error": "Konnte das nicht speichern — die empfohlene Voreinstellung bleibt. Du kannst es später in den Einstellungen ändern.",
- "skip": "Überspringen — Jarvis-Leiste behalten"
- },
"finish": {
- "title": "Alles bereit!",
- "body": "Dein Assistent ist startklar. Sag dein Aktivierungswort oder tippe einen Befehl, um zu beginnen.",
- "skipped_title": "Du hast übersprungen — jederzeit in den Einstellungen nachholbar:",
- "start_cta": "Loslegen",
- "boot_notice": "Hinweis: Der erste Start dauert etwa 10 Sekunden, während dein Assistent hochfährt — das ist völlig normal.",
- "autostart_label": "Jarvis beim Anmelden automatisch starten"
+ "summary_label": "Deine Einrichtung",
+ "skipped": "Übersprungen — jederzeit in den Einstellungen nachholbar",
+ "autostart_label": "{name} beim Anmelden starten",
+ "autostart_hint": "Läuft nach der Anmeldung leise im Hintergrund.",
+ "tour_label": "Neu hier?",
+ "tour_title": "Die 2-Minuten-Tour ansehen",
+ "tour_body": "Öffnet YouTube in deinem Browser.",
+ "boot_notice": "Der erste Start dauert etwa 10 Sekunden, während {name} aufwärmt — das ist normal.",
+ "start_cta": "{name} starten",
+ "starting": "Startet…",
+ "start_failed": "Die Einrichtung konnte nicht abgeschlossen werden. Prüfe, ob die App läuft, und versuche es erneut."
}
},
"language_select": {
@@ -4307,21 +4396,45 @@
"coding_mode_on_open": "Wird beim Öffnen aktiviert",
"terminal_plan": "Terminal-Plan",
"steps": {
- "folder": { "label": "Ordner", "title": "Projektordner auswählen", "hint": "Alles, was die Agents tun, bleibt in diesem Ordner." },
- "layout": { "label": "Layout", "title": "Arbeitsbereich aufteilen", "hint": "Lege fest, wie viele unabhängige Terminal-Fenster geöffnet werden." },
- "agents": { "label": "Agents" },
- "view": { "label": "Ansicht", "title": "Darstellung des Arbeitsbereichs auswählen", "hint": "Danach ist beides einen Klick entfernt — der Schalter sitzt in der Workspace-Leiste." },
- "review": { "label": "Prüfen", "title": "Vor dem Öffnen prüfen", "hint": "Nichts startet, bevor du den Arbeitsbereich öffnest." }
+ "folder": {
+ "label": "Ordner",
+ "title": "Projektordner auswählen",
+ "hint": "Alles, was die Agents tun, bleibt in diesem Ordner."
+ },
+ "layout": {
+ "label": "Layout",
+ "title": "Arbeitsbereich aufteilen",
+ "hint": "Lege fest, wie viele unabhängige Terminal-Fenster geöffnet werden."
+ },
+ "agents": {
+ "label": "Agents"
+ },
+ "view": {
+ "label": "Ansicht",
+ "title": "Darstellung des Arbeitsbereichs auswählen",
+ "hint": "Danach ist beides einen Klick entfernt — der Schalter sitzt in der Workspace-Leiste."
+ },
+ "review": {
+ "label": "Prüfen",
+ "title": "Vor dem Öffnen prüfen",
+ "hint": "Nichts startet, bevor du den Arbeitsbereich öffnest."
+ }
},
"views": {
- "grid": { "title": "Terminal-Raster", "description": "Alle Fenster gleichzeitig nebeneinander — die vollständige Terminal-Wand." },
- "chat": { "title": "Chat", "description": "Der Agenten-Chat, im Ordner dieses Workspaces — schreiben statt Terminals zuschauen." }
+ "grid": {
+ "title": "Terminal-Raster",
+ "description": "Alle Fenster gleichzeitig nebeneinander — die vollständige Terminal-Wand."
+ },
+ "chat": {
+ "title": "Chat",
+ "description": "Der Agenten-Chat, im Ordner dieses Workspaces — schreiben statt Terminals zuschauen."
+ }
}
},
"crowded": {
- "warning": "{0} Terminals sind viel für einen Bildschirm — jedes bekommt wenig Platz. Auf einem großen Display kein Problem; auf einem Laptop lassen sich weniger leichter verfolgen. Ein Fenster kannst du jederzeit maximieren, um es zu lesen.",
- "measured": "{0} Terminals werden auf diesem Fenster etwa {1} Spalten breit — schmal für die Ausgabe eines Agenten. Bequem passen bei deiner Schriftgröße {2} nebeneinander. Maximiere ein Fenster, wann immer du es in voller Größe lesen willst."
- },
+ "warning": "{0} Terminals sind viel für einen Bildschirm — jedes bekommt wenig Platz. Auf einem großen Display kein Problem; auf einem Laptop lassen sich weniger leichter verfolgen. Ein Fenster kannst du jederzeit maximieren, um es zu lesen.",
+ "measured": "{0} Terminals werden auf diesem Fenster etwa {1} Spalten breit — schmal für die Ausgabe eines Agenten. Bequem passen bei deiner Schriftgröße {2} nebeneinander. Maximiere ein Fenster, wann immer du es in voller Größe lesen willst."
+ },
"resume": {
"eyebrow": "Vorheriger Arbeitsstand",
"title": "Den Arbeitsraum wiederherstellen, nicht nur die Fenster",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 31113bf3e5..5cecabb74a 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -77,7 +77,7 @@
"plugins": "Plugins",
"docs": "Docs",
"mcps": "MCPs",
- "tasks": "Tasks",
+ "tasks": "Automations",
"sessions": "Transcription",
"run_inspector": "Run Inspector",
"costs": "Spend",
@@ -760,7 +760,7 @@
}
},
"tasks_view": {
- "title": "Tasks",
+ "title": "Automations",
"subtitle": "Persistent task queue — reminders, harness dispatches, tool calls.",
"filter_all": "All",
"filter_active": "Active",
@@ -777,6 +777,7 @@
"state": {
"pending": "waiting",
"scheduled": "scheduled",
+ "paused": "paused",
"running": "running",
"completed": "done",
"failed": "failed",
@@ -857,6 +858,93 @@
"in_prefix": "in",
"due_now": "due"
},
+ "automations_view": {
+ "title": "Automations",
+ "subtitle": "Recurring agent tasks — yours, and a catalogue of ready-made ones.",
+ "new_button": "New automation",
+ "refresh": "Refresh",
+ "tab_automations": "Automations",
+ "tab_runs": "Runs",
+ "yours_heading": "Your automations",
+ "yours_empty": "No automations yet.",
+ "yours_empty_hint": "Add one from the catalogue below, or create your own with \"New automation\".",
+ "catalogue_heading": "Catalogue",
+ "catalogue_hint": "Ready-made automations — add one and adjust its schedule.",
+ "catalogue_loading": "Loading catalogue…",
+ "catalogue_error": "Could not load the catalogue",
+ "catalogue_empty": "The catalogue is empty.",
+ "catalogue_unavailable": "The catalogue is not available yet — restart the app to enable it.",
+ "route_unavailable": "This action needs the updated backend — restart the app.",
+ "already_running": "This automation is already running.",
+ "category": {
+ "news": "News",
+ "productivity": "Productivity",
+ "finance": "Finance",
+ "research": "Research",
+ "developer": "Developer"
+ },
+ "add": "Add",
+ "added": "Added",
+ "show_installed": "Show your automation",
+ "needs": "Needs {tools}",
+ "needs_warning": "This automation needs {tools}, which is not connected. You can add it anyway — it will run once the plugin is connected.",
+ "add_dialog_title": "Add: {name}",
+ "add_error": "Could not add the automation.",
+ "added_notice": "\"{name}\" added.",
+ "required": "Required",
+ "kind": {
+ "hourly": "Hourly",
+ "daily": "Daily",
+ "weekly": "Weekly"
+ },
+ "weekday_label": "Weekday",
+ "time_label": "Time",
+ "weekday": {
+ "0": "Mondays",
+ "1": "Tuesdays",
+ "2": "Wednesdays",
+ "3": "Thursdays",
+ "4": "Fridays",
+ "5": "Saturdays",
+ "6": "Sundays"
+ },
+ "schedule": {
+ "hourly": "Every hour",
+ "daily": "Daily at {time}",
+ "weekly": "{day} at {time}",
+ "every_minutes": "Every {n} min",
+ "every_hours": "Every {n} h",
+ "on_event": "When an event fires"
+ },
+ "schedule_label": "Schedule",
+ "next_run": "Next run",
+ "last_run": "Last run",
+ "never_ran": "never ran",
+ "run_now": "Run now",
+ "run_started": "Running now.",
+ "run_error": "Could not start the run.",
+ "pause": "Pause",
+ "resume": "Resume",
+ "paused_notice": "Paused.",
+ "resumed": "Resumed.",
+ "toggle_error": "Could not change the automation.",
+ "deleted": "Deleted.",
+ "delete_error": "Could not delete the automation.",
+ "delete_confirm": "Delete?",
+ "keep": "Keep",
+ "details": "Details",
+ "latest_result": "Latest result",
+ "result": "Result",
+ "timeline": "Timeline",
+ "no_result_yet": "No result yet.",
+ "runs_empty": "No runs yet — they show up here after the first automation has run.",
+ "runs_filter": {
+ "all": "All",
+ "running": "Running",
+ "done": "Done",
+ "problems": "Problems"
+ }
+ },
"plugins_view": {
"title": "Plugins",
"count": "{n} available · {connected} connected",
@@ -1670,7 +1758,6 @@
"no_providers_in_tier": "No providers available in this category.",
"model_picker_activate_hint": "Activate this provider to choose its voice or model.",
"active_tooltip": "Already active",
- "click_to_activate": "Click to activate this provider",
"click_to_activate": "Click to activate this provider and open its settings",
"provider_active": "Active",
"provider_set_active": "Set active",
@@ -1927,9 +2014,9 @@
"title": "Thinking pause",
"description": "How long {name} waits in silence before it takes your turn. On Automatic each voice mode keeps its own factory timing — the shortest pause. Raise it to give yourself more time to pause and finish a thought; if you keep talking inside the pause, the words are added to the same request. Applies to both voice modes — Pipeline right away, Realtime on the next call.",
"unit_seconds": "s",
- "automatic_label": "Automatic",
- "automatic_caption": "The provider's factory timing — the shortest pause.",
- "saved_toast_automatic": "Thinking pause set to Automatic.",
+ "automatic_label": "Automatic",
+ "automatic_caption": "The provider's factory timing — the shortest pause.",
+ "saved_toast_automatic": "Thinking pause set to Automatic.",
"reset": "Reset to default (Automatic)",
"saved_toast": "Thinking pause set to {0}.",
"restart_caption": "Saved — applies on next start."
@@ -2537,37 +2624,64 @@
"install_failed": "{0}: install failed (exit {1}). Try a different method."
},
"onboarding": {
- "progress_label": "Onboarding progress",
+ "progress_label": "Setup progress",
+ "eyebrow": "First run",
+ "step_progress": "{0} of {1}",
"nav": {
- "next": "Next",
+ "next": "Continue",
"back": "Back",
"skip": "Skip"
},
- "welcome": {
- "title": "Welcome to Personal Jarvis",
- "subtitle": "Your voice-first AI assistant. Let's get you set up.",
- "cta": "Get started",
- "skip_setup": "Skip setup for now"
- },
- "tutorial": {
- "title": "Watch the 2-minute tour",
- "body": "A quick walkthrough of what Personal Jarvis does and how setup works. You can skip and start right away.",
- "continue": "Continue",
- "skip": "Skip the video",
- "play": "Play the tutorial video"
+ "steps": {
+ "welcome": {
+ "label": "Before we start",
+ "title": "Before we start",
+ "hint": "{name} acts on your computer. Read what that means, then decide."
+ },
+ "language": {
+ "label": "Language",
+ "title": "Which language should {name} speak?",
+ "hint": "Interface and replies can differ. Both can be changed later in Settings."
+ },
+ "api-keys": {
+ "label": "Your key",
+ "title": "One key gets you started",
+ "hint": "Paste an API key from a provider you already use, or run fully local. Voice providers can be added later under API Keys."
+ },
+ "permissions": {
+ "label": "Permissions",
+ "title": "Allow access on this Mac",
+ "hint": "macOS asks for each capability separately. Grant them, then come back — the list updates itself."
+ },
+ "wake-word": {
+ "label": "Activation",
+ "title": "How do you want to call {name}?",
+ "hint": "A wake word of your own, or a keyboard shortcut. Either can be changed later."
+ },
+ "finish": {
+ "label": "Ready",
+ "title": "{name} is ready",
+ "hint": "Here is what you set up. One restart applies everything."
+ }
},
- "risk": {
- "title": "Before you continue",
- "lead": "Personal Jarvis is powerful, experimental software.",
- "body": "It can control your computer, run commands, open apps, send messages, and change files on your behalf — and it can make mistakes. It may do unintended or even destructive things.",
- "liability": "You use it entirely at your own risk. The developers accept no liability for any damage, data loss, or other consequences. Only continue if you understand and accept this.",
- "accept_label": "I understand the risks and accept that I use Personal Jarvis at my own risk.",
+ "welcome": {
+ "capabilities_label": "What {name} can do",
+ "cap_commands": "Run commands, open apps and change files on your behalf",
+ "cap_screen": "See your screen and act on it when you ask",
+ "cap_cloud": "Send what you say to the AI provider you choose",
+ "cap_costs": "Use your provider account — usage is billed there, by them",
+ "cap_mistakes": "Make mistakes — including unintended or destructive ones",
+ "liability": "You use it entirely at your own risk. The developers accept no liability for damage, data loss or other consequences.",
+ "accept_label": "I understand the risks and use {name} at my own risk.",
+ "view_terms": "Read the full Terms of Use",
+ "hide_terms": "Hide the Terms",
+ "terms_loading": "Loading terms…",
"proceed": "I understand — continue",
- "decline": "Decline & quit",
- "declined_title": "Jarvis is shutting down",
- "declined_body": "You declined the Terms, so Personal Jarvis is closing now — nothing was set up and nothing was saved. Start the app again anytime if you change your mind; this screen will ask again.",
- "view_terms": "View the full Terms of Use",
- "terms_loading": "Loading terms…"
+ "decline": "Decline and quit",
+ "accept_failed": "Your acceptance could not be saved. Check that the app is running, then try again.",
+ "declined_title": "{name} is closing",
+ "declined_body": "You declined the Terms, so nothing was set up and nothing was saved. Start the app again anytime — this screen will ask again.",
+ "summary_accepted": "Terms accepted"
},
"intro": {
"scene_1": "Meet your voice-first assistant.",
@@ -2575,36 +2689,56 @@
"scene_3": "It keeps working in the background while you don't.",
"scene_4": "Your keys, your data, your rules."
},
- "terms": {
- "title": "Terms & Disclaimer",
- "intro": "Please read and accept before continuing.",
- "accept_label": "I have read and accept the Terms & Disclaimer.",
- "continue": "Accept & continue"
- },
"language": {
- "title": "Choose your language",
"ui_label": "Interface language",
- "reply_label": "Reply language"
+ "ui_hint": "Menus, buttons and settings",
+ "reply_label": "Reply language",
+ "reply_hint": "What {name} answers in — Auto follows the language you speak",
+ "auto": "Auto — follow me",
+ "summary": "{0} · replies {1}"
+ },
+ "api_keys": {
+ "providers_label": "Providers",
+ "loading": "Loading providers…",
+ "load_failed": "The provider list could not be loaded. You can add a key later under API Keys.",
+ "recommended": "Recommended",
+ "configured": "Key saved",
+ "not_configured": "No key",
+ "active": "Active",
+ "show_more": "Show {0} more",
+ "show_less": "Show fewer",
+ "local_label": "No key at hand?",
+ "local_title": "Run fully local with Ollama",
+ "local_checking": "Checking for a local Ollama…",
+ "local_detected": "Ollama is running on this machine — {name} can think fully local, no key needed.",
+ "local_detected_empty": "Ollama is running but has no model yet — pull one first (e.g. ollama pull qwen3.5).",
+ "local_use_button": "Use local model",
+ "local_active": "Local brain active — Ollama answers from this machine.",
+ "local_missing": "Install Ollama and {name} runs fully local — no cloud account needed.",
+ "local_missing_link": "Get Ollama",
+ "security_note": "Keys are stored in your system keychain and only ever sent to the provider you chose — never into chat or voice.",
+ "later": "Later — add a key in Settings",
+ "later_hint": "Chat and voice stay off until a key is saved.",
+ "summary_none": "No key yet",
+ "summary_local": "Local · Ollama"
},
"permissions": {
- "title": "Allow access on this Mac",
- "body": "macOS asks you to approve each capability separately. Use the buttons below, then return here; the status updates automatically.",
- "privacy_note": "These prompts come from macOS. The installer cannot silently approve them, and Personal Jarvis never bypasses System Settings. The Keychain prompt at app start only means Personal Jarvis is saving your API keys encrypted in the macOS Keychain — they never leave your Mac.",
+ "privacy_note": "These prompts come from macOS. The installer cannot silently approve them, and {name} never bypasses System Settings. The Keychain prompt at app start only means your API keys are being saved encrypted in the macOS Keychain — they never leave your Mac.",
"continue": "Continue",
- "text_only": "Continue with text only"
+ "text_only": "Continue with text only",
+ "summary_ready": "Granted",
+ "summary_skipped": "Text only"
},
"wake_word": {
- "choice_title": "How do you want to activate {name}?",
- "choice_body": "Pick whichever fits how you work — you can change this later in Settings.",
+ "mode_label": "Activation",
"mode_wake_title": "Wake word",
"mode_wake_body": "Say your own word any time — always listening. Needs a small local model for your exact word.",
"mode_shortcut_title": "Keyboard shortcut",
"mode_shortcut_body": "No wake word — press the Call shortcut to start a voice session.",
- "back_to_choice": "Back",
+ "selected": "Selected",
"shortcut_note": "You'll activate {name} with the Call shortcut instead of a wake word. You can configure it anytime in Settings → Voice Keybinds.",
- "shortcut_cta": "Continue",
- "title": "Pick your wake word",
- "body": "Choose the word that wakes your assistant. \"Hey\" stays fixed — you pick the rest.",
+ "word_label": "Your word",
+ "body": "\"Hey\" stays fixed — you pick the rest.",
"prefix": "Hey",
"input_label": "Your wake word",
"placeholder": "e.g. Nova",
@@ -2613,80 +2747,35 @@
"references_title": "Where to check protected names",
"references_caveat": "These references are informational and may be incomplete or out of date — they are not a substitute for your own check.",
"ack_label": "I'm responsible for the wake word I choose.",
- "cta": "Save wake word",
+ "cta": "Save and continue",
"saving": "Saving…",
- "derived_name": "Your assistant will be called: {0}",
+ "derived_name": "Your assistant will be called {0}",
"continue_anyway": "Continue anyway",
+ "summary_shortcut": "Keyboard shortcut",
"mic_check": {
- "title": "Microphone check",
+ "title": "Microphone",
"test_button": "Test your microphone",
- "say_once_button": "Say your wake word once",
"checking": "Listening…",
- "listening": "Listening — speak now…",
+ "listening": "Listening — say your word now.",
"good": "Sounds good — your microphone picked up your voice clearly.",
- "too_quiet": "That was very quiet. Turn up your microphone volume or move closer, then try again.",
+ "too_quiet": "That was very quiet. Turn up your microphone or move closer, then try again.",
"no_device": "No microphone detected — you can still finish setup and fix this later in Settings.",
"permission_required": "Grant Microphone access in Permissions before running this check.",
"error": "Could not check the microphone right now."
}
},
- "api_keys": {
- "title": "Set up API keys after onboarding",
- "body": "Finish onboarding first. Then open API Keys & Providers. You do not need to fill every API-key field.",
- "screenshot_alt": "Personal Jarvis API Keys view with the API Keys navigation and Realtime or Pipeline switch highlighted",
- "api_location_title": "Open API Keys",
- "api_location_body": "After onboarding, select API Keys in the left sidebar. Paste provider keys only in this secure view.",
- "voice_mode_title": "Choose your voice mode",
- "realtime_label": "Realtime (recommended, research preview):",
- "realtime_body": "Add one OpenAI or Gemini key for listening, reasoning, and speech in one model.",
- "pipeline_label": "Pipeline (not recommended):",
- "pipeline_body": "Add keys only for the Brain, Voice Output, and Voice Input providers you choose.",
- "security_note": "Paste keys only into the secure API Keys view — never into chat or voice.",
- "local_title": "No API key? Run fully local",
- "local_checking": "Checking for a local Ollama…",
- "local_detected": "Ollama detected on this machine — Jarvis can think fully local, no key needed.",
- "local_detected_empty": "Ollama is running but has no model yet — pull one first (e.g. ollama pull qwen3.5).",
- "local_use_button": "Use local model",
- "local_active": "Local brain active — Ollama answers from this machine, and voice is set to Pipeline so it is actually used.",
- "local_missing": "No API key at hand? Install Ollama and Jarvis runs fully local — no cloud account needed.",
- "local_missing_link": "Get Ollama",
- "continue": "Continue onboarding"
- },
- "mic_test": {
- "title": "Microphone check",
- "body": "Let's make sure your assistant can hear you.",
- "no_mic": "No microphone detected. You can still talk by text or through a channel like Telegram.",
- "skip": "Skip microphone check"
- },
- "system_style": {
- "title": "Choose your style",
- "body": "How should your assistant appear on screen? You can change this any time in Settings.",
- "recommended": "Recommended",
- "options": {
- "jarvis_bar": "Jarvis Bar",
- "mascot": "Mascot",
- "voice_orb": "Voice orb",
- "none": "No overlay"
- },
- "captions": {
- "jarvis_bar": "A slim floating voice bar, always within reach.",
- "mascot": "A floating companion that reacts as you talk.",
- "voice_orb": "A glowing sphere of drifting light — drag it to any screen.",
- "none": "Just the app window — no floating surface on screen."
- },
- "needs_restart": "Almost there — this style needs a quick restart to take effect.",
- "restart_now": "Restart now to apply",
- "restarting": "Restarting…",
- "save_error": "Couldn't save that — the recommended default stays. You can change it later in Settings.",
- "skip": "Skip — keep the Jarvis Bar"
- },
"finish": {
- "title": "You're all set!",
- "body": "Your assistant is ready. Try saying your wake word, or type a command to begin.",
- "skipped_title": "You skipped — set up anytime in Settings:",
- "start_cta": "Get started",
- "boot_notice": "Heads up: the first launch takes about 10 seconds while your assistant warms up — that's completely normal.",
- "autostart_label": "Start Jarvis automatically at login"
+ "summary_label": "Your setup",
+ "skipped": "Skipped — set up anytime in Settings",
+ "autostart_label": "Start {name} at login",
+ "autostart_hint": "Runs quietly in the background after you sign in.",
+ "tour_label": "New here?",
+ "tour_title": "Watch the 2-minute tour",
+ "tour_body": "Opens on YouTube in your browser.",
+ "boot_notice": "The first launch takes about 10 seconds while {name} warms up — that's normal.",
+ "start_cta": "Start {name}",
+ "starting": "Starting…",
+ "start_failed": "Could not finish setup. Check that the app is running, then try again."
}
},
"language_select": {
@@ -4307,21 +4396,45 @@
"coding_mode_on_open": "Turns on when opened",
"terminal_plan": "Terminal plan",
"steps": {
- "folder": { "label": "Folder", "title": "Choose the project folder", "hint": "Everything the agents do stays inside this folder." },
- "layout": { "label": "Layout", "title": "Shape the workspace", "hint": "Choose how many independent terminal panes should open." },
- "agents": { "label": "Agents" },
- "view": { "label": "View", "title": "Choose how to read the workspace", "hint": "Both are one click apart afterwards — the switch is in the workspace bar." },
- "review": { "label": "Review", "title": "Review before opening", "hint": "Nothing starts until you open the workspace." }
+ "folder": {
+ "label": "Folder",
+ "title": "Choose the project folder",
+ "hint": "Everything the agents do stays inside this folder."
+ },
+ "layout": {
+ "label": "Layout",
+ "title": "Shape the workspace",
+ "hint": "Choose how many independent terminal panes should open."
+ },
+ "agents": {
+ "label": "Agents"
+ },
+ "view": {
+ "label": "View",
+ "title": "Choose how to read the workspace",
+ "hint": "Both are one click apart afterwards — the switch is in the workspace bar."
+ },
+ "review": {
+ "label": "Review",
+ "title": "Review before opening",
+ "hint": "Nothing starts until you open the workspace."
+ }
},
"views": {
- "grid": { "title": "Terminal grid", "description": "Every pane on screen at once, side by side — the full wall of terminals." },
- "chat": { "title": "Chat", "description": "The agent chat, running in this workspace's folder — type instead of watching terminals." }
+ "grid": {
+ "title": "Terminal grid",
+ "description": "Every pane on screen at once, side by side — the full wall of terminals."
+ },
+ "chat": {
+ "title": "Chat",
+ "description": "The agent chat, running in this workspace's folder — type instead of watching terminals."
+ }
}
},
"crowded": {
- "warning": "{0} terminals is a lot for one screen — each gets little room. Fine on a big display; on a laptop, fewer are easier to follow. You can always maximize one pane to read it.",
- "measured": "{0} terminals come out at about {1} columns each on this window — narrow for an agent's output. This window fits {2} across comfortably at your text size. Maximize a pane whenever you want to read it full size."
- },
+ "warning": "{0} terminals is a lot for one screen — each gets little room. Fine on a big display; on a laptop, fewer are easier to follow. You can always maximize one pane to read it.",
+ "measured": "{0} terminals come out at about {1} columns each on this window — narrow for an agent's output. This window fits {2} across comfortably at your text size. Maximize a pane whenever you want to read it full size."
+ },
"resume": {
"eyebrow": "Previous working set",
"title": "Restore the room, not just the windows",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 78f99fe03a..e5028d560d 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -77,7 +77,7 @@
"plugins": "Plugins",
"docs": "Documentos",
"mcps": "MCPs",
- "tasks": "Tareas",
+ "tasks": "Automatizaciones",
"sessions": "Transcripción",
"run_inspector": "Run Inspector",
"costs": "Gastos",
@@ -758,7 +758,7 @@
}
},
"tasks_view": {
- "title": "Tareas",
+ "title": "Automatizaciones",
"subtitle": "Cola persistente de tareas — recordatorios, despachos y llamadas a herramientas.",
"filter_all": "Todas",
"filter_active": "Activas",
@@ -775,6 +775,7 @@
"state": {
"pending": "esperando",
"scheduled": "programada",
+ "paused": "en pausa",
"running": "en ejecución",
"completed": "hecha",
"failed": "fallida",
@@ -855,6 +856,93 @@
"in_prefix": "en",
"due_now": "pendiente"
},
+ "automations_view": {
+ "title": "Automatizaciones",
+ "subtitle": "Tareas recurrentes del agente: las tuyas y un catálogo de plantillas listas.",
+ "new_button": "Nueva automatización",
+ "refresh": "Actualizar",
+ "tab_automations": "Automatizaciones",
+ "tab_runs": "Ejecuciones",
+ "yours_heading": "Tus automatizaciones",
+ "yours_empty": "Aún no hay automatizaciones.",
+ "yours_empty_hint": "Añade una del catálogo de abajo o crea la tuya con «Nueva automatización».",
+ "catalogue_heading": "Catálogo",
+ "catalogue_hint": "Automatizaciones listas: añade una y ajusta su horario.",
+ "catalogue_loading": "Cargando catálogo…",
+ "catalogue_error": "No se pudo cargar el catálogo",
+ "catalogue_empty": "El catálogo está vacío.",
+ "catalogue_unavailable": "El catálogo aún no está disponible: reinicia la app para activarlo.",
+ "route_unavailable": "Esta acción necesita el backend actualizado: reinicia la app.",
+ "already_running": "Esta automatización ya se está ejecutando.",
+ "category": {
+ "news": "Noticias",
+ "productivity": "Productividad",
+ "finance": "Finanzas",
+ "research": "Investigación",
+ "developer": "Desarrollo"
+ },
+ "add": "Añadir",
+ "added": "Añadida",
+ "show_installed": "Mostrar tu automatización",
+ "needs": "Necesita {tools}",
+ "needs_warning": "Esta automatización necesita {tools}, que no está conectado. Puedes añadirla igualmente; se ejecutará cuando el plugin esté conectado.",
+ "add_dialog_title": "Añadir: {name}",
+ "add_error": "No se pudo añadir la automatización.",
+ "added_notice": "«{name}» añadida.",
+ "required": "Obligatorio",
+ "kind": {
+ "hourly": "Cada hora",
+ "daily": "Diario",
+ "weekly": "Semanal"
+ },
+ "weekday_label": "Día de la semana",
+ "time_label": "Hora",
+ "weekday": {
+ "0": "Lunes",
+ "1": "Martes",
+ "2": "Miércoles",
+ "3": "Jueves",
+ "4": "Viernes",
+ "5": "Sábados",
+ "6": "Domingos"
+ },
+ "schedule": {
+ "hourly": "Cada hora",
+ "daily": "Diario a las {time}",
+ "weekly": "{day} a las {time}",
+ "every_minutes": "Cada {n} min",
+ "every_hours": "Cada {n} h",
+ "on_event": "Cuando ocurre un evento"
+ },
+ "schedule_label": "Horario",
+ "next_run": "Próxima ejecución",
+ "last_run": "Última ejecución",
+ "never_ran": "nunca ejecutada",
+ "run_now": "Ejecutar ahora",
+ "run_started": "Ejecutándose ahora.",
+ "run_error": "No se pudo iniciar la ejecución.",
+ "pause": "Pausar",
+ "resume": "Reanudar",
+ "paused_notice": "En pausa.",
+ "resumed": "Reanudada.",
+ "toggle_error": "No se pudo cambiar la automatización.",
+ "deleted": "Eliminada.",
+ "delete_error": "No se pudo eliminar la automatización.",
+ "delete_confirm": "¿Eliminar?",
+ "keep": "Conservar",
+ "details": "Detalles",
+ "latest_result": "Último resultado",
+ "result": "Resultado",
+ "timeline": "Cronología",
+ "no_result_yet": "Aún no hay resultado.",
+ "runs_empty": "Aún no hay ejecuciones: aparecerán aquí cuando la primera automatización se haya ejecutado.",
+ "runs_filter": {
+ "all": "Todas",
+ "running": "En curso",
+ "done": "Hechas",
+ "problems": "Problemas"
+ }
+ },
"plugins_view": {
"title": "Plugins",
"count": "{n} disponibles · {connected} conectados",
@@ -1668,7 +1756,6 @@
"no_providers_in_tier": "No hay proveedores disponibles en esta categoría.",
"model_picker_activate_hint": "Activa este proveedor para elegir su voz o modelo.",
"active_tooltip": "Ya activo",
- "click_to_activate": "Clic para activar este proveedor",
"click_to_activate": "Clic para activar este proveedor y abrir sus ajustes",
"provider_active": "Activo",
"provider_set_active": "Activar",
@@ -1925,9 +2012,9 @@
"title": "Pausa para pensar",
"description": "Cuánto espera {name} en silencio antes de tomar tu turno. En Automático cada modo de voz mantiene su propio ajuste de fábrica: la pausa más corta. Súbelo para darte más tiempo para pausar y terminar una idea; si sigues hablando dentro de la pausa, lo dicho se añade a la misma petición. Se aplica a ambos modos de voz: Pipeline de inmediato, Realtime a partir de la siguiente llamada.",
"unit_seconds": "s",
- "automatic_label": "Automático",
- "automatic_caption": "Ajuste de fábrica del proveedor: la pausa más corta.",
- "saved_toast_automatic": "Pausa para pensar fijada en Automático.",
+ "automatic_label": "Automático",
+ "automatic_caption": "Ajuste de fábrica del proveedor: la pausa más corta.",
+ "saved_toast_automatic": "Pausa para pensar fijada en Automático.",
"reset": "Restablecer al valor predeterminado (Automático)",
"saved_toast": "Pausa para pensar fijada en {0}.",
"restart_caption": "Guardado — se aplica en el próximo inicio."
@@ -2535,156 +2622,158 @@
"install_failed": "{0}: instalación fallida (exit {1}). Prueba otro método."
},
"onboarding": {
- "progress_label": "Progreso de la introducción",
+ "progress_label": "Progreso de la configuración",
+ "eyebrow": "Primer inicio",
+ "step_progress": "{0} de {1}",
"nav": {
- "next": "Siguiente",
+ "next": "Continuar",
"back": "Atrás",
"skip": "Omitir"
},
- "welcome": {
- "title": "Bienvenido a Personal Jarvis",
- "subtitle": "Tu asistente de IA por voz. Vamos a configurarlo.",
- "cta": "Empezar",
- "skip_setup": "Omitir la configuración por ahora"
- },
- "tutorial": {
- "title": "Mira el recorrido de 2 minutos",
- "body": "Un repaso rápido de lo que hace Personal Jarvis y cómo es la configuración. Puedes omitirlo y empezar enseguida.",
- "continue": "Continuar",
- "skip": "Omitir el vídeo",
- "play": "Reproducir el vídeo del tutorial"
+ "steps": {
+ "welcome": {
+ "label": "Antes de empezar",
+ "title": "Antes de empezar",
+ "hint": "{name} actúa en tu ordenador. Lee lo que eso significa y luego decide."
+ },
+ "language": {
+ "label": "Idioma",
+ "title": "¿En qué idioma debe hablar {name}?",
+ "hint": "La interfaz y las respuestas pueden diferir. Ambos se pueden cambiar después en Ajustes."
+ },
+ "api-keys": {
+ "label": "Tu clave",
+ "title": "Una clave basta para empezar",
+ "hint": "Pega una clave API de un proveedor que ya uses, o trabaja totalmente en local. Los proveedores de voz se pueden añadir después en Claves API."
+ },
+ "permissions": {
+ "label": "Permisos",
+ "title": "Permitir el acceso en este Mac",
+ "hint": "macOS pide cada capacidad por separado. Concédelas y vuelve — la lista se actualiza sola."
+ },
+ "wake-word": {
+ "label": "Activación",
+ "title": "¿Cómo quieres llamar a {name}?",
+ "hint": "Una palabra de activación propia o un atajo de teclado. Ambos se pueden cambiar después."
+ },
+ "finish": {
+ "label": "Listo",
+ "title": "{name} está listo",
+ "hint": "Esto es lo que has configurado. Un reinicio lo aplica todo."
+ }
},
- "risk": {
- "title": "Antes de continuar",
- "lead": "Personal Jarvis es un software potente y experimental.",
- "body": "Puede controlar tu ordenador, ejecutar comandos, abrir aplicaciones, enviar mensajes y modificar archivos en tu nombre, y puede cometer errores. Podría hacer cosas no deseadas o incluso destructivas.",
- "liability": "Lo usas completamente bajo tu propia responsabilidad. Los desarrolladores no aceptan responsabilidad alguna por daños, pérdida de datos u otras consecuencias. Continúa solo si lo entiendes y lo aceptas.",
- "accept_label": "Entiendo los riesgos y acepto que uso Personal Jarvis bajo mi propia responsabilidad.",
- "proceed": "Lo entiendo — continuar",
+ "welcome": {
+ "capabilities_label": "Qué puede hacer {name}",
+ "cap_commands": "Ejecutar comandos, abrir aplicaciones y modificar archivos en tu nombre",
+ "cap_screen": "Ver tu pantalla y actuar sobre ella cuando se lo pidas",
+ "cap_cloud": "Enviar lo que dices al proveedor de IA que elijas",
+ "cap_costs": "Usar tu cuenta del proveedor — el uso se factura allí, por ellos",
+ "cap_mistakes": "Cometer errores — incluidos no deseados o destructivos",
+ "liability": "Lo usas completamente bajo tu propia responsabilidad. Los desarrolladores no aceptan responsabilidad alguna por daños, pérdida de datos u otras consecuencias.",
+ "accept_label": "Entiendo los riesgos y uso {name} bajo mi propia responsabilidad.",
+ "view_terms": "Leer las Condiciones de uso completas",
+ "hide_terms": "Ocultar las Condiciones",
+ "terms_loading": "Cargando condiciones…",
+ "proceed": "Entendido — continuar",
"decline": "Rechazar y salir",
- "declined_title": "Jarvis se está cerrando",
- "declined_body": "Has rechazado los términos, así que Personal Jarvis se cierra ahora — no se configuró ni se guardó nada. Vuelve a iniciar la aplicación cuando quieras si cambias de opinión; esta pregunta aparecerá de nuevo.",
- "view_terms": "Ver los Términos de uso completos",
- "terms_loading": "Cargando los términos…"
+ "accept_failed": "No se pudo guardar tu aceptación. Comprueba que la aplicación esté en marcha e inténtalo de nuevo.",
+ "declined_title": "{name} se está cerrando",
+ "declined_body": "Has rechazado las Condiciones, así que no se configuró ni se guardó nada. Vuelve a abrir la aplicación cuando quieras; esta pantalla preguntará de nuevo.",
+ "summary_accepted": "Condiciones aceptadas"
},
"intro": {
- "scene_1": "Te presentamos a tu asistente de voz.",
- "scene_2": "Solo habla: escucha y actúa.",
- "scene_3": "Sigue trabajando en segundo plano cuando tú no.",
+ "scene_1": "Conoce a tu asistente por voz.",
+ "scene_2": "Solo habla — escucha y actúa.",
+ "scene_3": "Sigue trabajando en segundo plano mientras tú no.",
"scene_4": "Tus claves, tus datos, tus reglas."
},
- "terms": {
- "title": "Términos y descargo de responsabilidad",
- "intro": "Léelos y acéptalos antes de continuar.",
- "accept_label": "He leído y acepto los Términos y el descargo de responsabilidad.",
- "continue": "Aceptar y continuar"
- },
"language": {
- "title": "Elige tu idioma",
"ui_label": "Idioma de la interfaz",
- "reply_label": "Idioma de respuesta"
+ "ui_hint": "Menús, botones y ajustes",
+ "reply_label": "Idioma de respuesta",
+ "reply_hint": "En qué responde {name} — Auto sigue el idioma en el que hablas",
+ "auto": "Auto — sígueme",
+ "summary": "{0} · respuestas {1}"
+ },
+ "api_keys": {
+ "providers_label": "Proveedores",
+ "loading": "Cargando proveedores…",
+ "load_failed": "No se pudo cargar la lista de proveedores. Puedes añadir una clave después en Claves API.",
+ "recommended": "Recomendado",
+ "configured": "Clave guardada",
+ "not_configured": "Sin clave",
+ "active": "Activo",
+ "show_more": "Mostrar {0} más",
+ "show_less": "Mostrar menos",
+ "local_label": "¿Sin clave a mano?",
+ "local_title": "Totalmente local con Ollama",
+ "local_checking": "Buscando un Ollama local…",
+ "local_detected": "Ollama está en marcha en este equipo — {name} puede pensar totalmente en local, sin clave.",
+ "local_detected_empty": "Ollama está en marcha pero aún no tiene ningún modelo — descarga uno primero (p. ej. ollama pull qwen3.5).",
+ "local_use_button": "Usar modelo local",
+ "local_active": "Cerebro local activo — Ollama responde desde este equipo.",
+ "local_missing": "Instala Ollama y {name} funcionará totalmente en local — sin cuenta en la nube.",
+ "local_missing_link": "Obtener Ollama",
+ "security_note": "Las claves se guardan en el llavero de tu sistema y solo se envían al proveedor que elegiste — nunca al chat ni a la voz.",
+ "later": "Más tarde — añadir una clave en Ajustes",
+ "later_hint": "El chat y la voz permanecen desactivados hasta que se guarde una clave.",
+ "summary_none": "Aún sin clave",
+ "summary_local": "Local · Ollama"
},
"permissions": {
- "title": "Permite el acceso en este Mac",
- "body": "macOS pide aprobar cada capacidad por separado. Usa los botones de abajo y vuelve aquí; el estado se actualizará automáticamente.",
- "privacy_note": "Estos avisos proceden de macOS. El instalador no puede aprobarlos de forma silenciosa y Personal Jarvis nunca elude Ajustes del Sistema. El aviso del Llavero al iniciar la app solo significa que Personal Jarvis guarda tus claves API cifradas en el Llavero de macOS — nunca salen de tu Mac.",
+ "privacy_note": "Estas solicitudes vienen de macOS. El instalador no puede aprobarlas en silencio y {name} nunca se salta los Ajustes del Sistema. La solicitud del Llavero al iniciar solo significa que tus claves API se guardan cifradas en el Llavero de macOS — nunca salen de tu Mac.",
"continue": "Continuar",
- "text_only": "Continuar solo con texto"
+ "text_only": "Continuar solo con texto",
+ "summary_ready": "Concedidos",
+ "summary_skipped": "Solo texto"
},
"wake_word": {
- "choice_title": "¿Cómo quieres activar a {name}?",
- "choice_body": "Elige lo que mejor se adapte a tu forma de trabajar — puedes cambiarlo después en Ajustes.",
+ "mode_label": "Activación",
"mode_wake_title": "Palabra de activación",
- "mode_wake_body": "Di tu propia palabra en cualquier momento — {name} escucha todo el tiempo. Necesita un pequeño modelo local para tu palabra exacta.",
+ "mode_wake_body": "Di tu propia palabra en cualquier momento — siempre escucha. Necesita un pequeño modelo local para tu palabra exacta.",
"mode_shortcut_title": "Atajo de teclado",
- "mode_shortcut_body": "Sin palabra de activación — pulsa el atajo de Llamar para iniciar una sesión de voz.",
- "back_to_choice": "Atrás",
- "shortcut_note": "Activarás a {name} con el atajo de Llamar en lugar de una palabra de activación. Puedes configurarlo en cualquier momento en Ajustes → Atajos de voz.",
- "shortcut_cta": "Continuar",
- "title": "Elige tu palabra de activación",
- "body": "Elige la palabra que activa tu asistente. \"Hey\" queda fija — tú eliges el resto.",
+ "mode_shortcut_body": "Sin palabra de activación — pulsa el atajo de Llamada para iniciar una sesión de voz.",
+ "selected": "Seleccionado",
+ "shortcut_note": "Activarás {name} con el atajo de Llamada en lugar de una palabra de activación. Puedes configurarlo en Ajustes → Atajos de voz.",
+ "word_label": "Tu palabra",
+ "body": "«Hey» se mantiene fijo — tú eliges el resto.",
"prefix": "Hey",
"input_label": "Tu palabra de activación",
"placeholder": "p. ej. Nova",
- "notice": "Elige cualquier palabra — solo asegúrate de que no sea la marca de otra persona.",
+ "notice": "Elige cualquier palabra — solo asegúrate de que no sea una marca registrada de otra persona.",
"learn_more": "Cómo comprobarlo",
"references_title": "Dónde comprobar nombres protegidos",
- "references_caveat": "Estas referencias son informativas y pueden estar incompletas o desactualizadas; no sustituyen tu propia comprobación.",
+ "references_caveat": "Estas referencias son informativas y pueden estar incompletas o desactualizadas — no sustituyen tu propia comprobación.",
"ack_label": "Soy responsable de la palabra de activación que elijo.",
- "cta": "Guardar palabra de activación",
+ "cta": "Guardar y continuar",
"saving": "Guardando…",
- "derived_name": "Tu asistente se llamará: {0}",
+ "derived_name": "Tu asistente se llamará {0}",
"continue_anyway": "Continuar de todos modos",
+ "summary_shortcut": "Atajo de teclado",
"mic_check": {
- "title": "Comprobación del micrófono",
- "test_button": "Probar micrófono",
- "say_once_button": "Di tu palabra de activación una vez",
+ "title": "Micrófono",
+ "test_button": "Probar el micrófono",
"checking": "Escuchando…",
- "listening": "Escuchando — habla ahora…",
+ "listening": "Escuchando — di tu palabra ahora.",
"good": "Suena bien — tu micrófono captó tu voz con claridad.",
- "too_quiet": "Eso sonó muy bajo. Sube el volumen del micrófono o acércate y vuelve a intentarlo.",
- "no_device": "No se detectó ningún micrófono — puedes terminar la configuración igualmente y solucionarlo más tarde en Ajustes.",
- "permission_required": "Concede acceso al micrófono en Permisos antes de ejecutar esta comprobación.",
+ "too_quiet": "Eso fue muy bajo. Sube el volumen del micrófono o acércate e inténtalo de nuevo.",
+ "no_device": "No se detectó ningún micrófono — puedes terminar la configuración y arreglarlo después en Ajustes.",
+ "permission_required": "Concede acceso al Micrófono en Permisos antes de ejecutar esta prueba.",
"error": "No se pudo comprobar el micrófono en este momento."
}
},
- "api_keys": {
- "title": "Configura las claves API después de la introducción",
- "body": "Termina primero la introducción. Después abre Claves API y proveedores. No necesitas rellenar todos los campos de claves API.",
- "screenshot_alt": "Vista de Claves API de Personal Jarvis con la navegación de Claves API y el selector Realtime o Pipeline resaltados",
- "api_location_title": "Abre Claves API",
- "api_location_body": "Después de la introducción, selecciona Claves API en la barra lateral izquierda. Pega las claves de proveedor únicamente en esta vista segura.",
- "voice_mode_title": "Elige el modo de voz",
- "realtime_label": "Realtime (recomendado, research preview):",
- "realtime_body": "Añade una clave de OpenAI o Gemini para escucha, razonamiento y voz en un solo modelo.",
- "pipeline_label": "Pipeline (no recomendado):",
- "pipeline_body": "Añade claves únicamente para los proveedores de razonamiento, salida de voz y entrada de voz que elijas.",
- "security_note": "Pega las claves únicamente en la vista segura de Claves API, nunca en el chat ni por voz.",
- "local_title": "¿Sin clave API? Funciona totalmente en local",
- "local_checking": "Buscando un Ollama local…",
- "local_detected": "Ollama detectado en este equipo: Jarvis puede pensar totalmente en local, sin clave.",
- "local_detected_empty": "Ollama está en marcha pero aún no tiene ningún modelo: descarga uno primero (p. ej. ollama pull qwen3.5).",
- "local_use_button": "Usar modelo local",
- "local_active": "Cerebro local activo: Ollama responde desde este equipo y la voz queda en Pipeline para que se use de verdad.",
- "local_missing": "¿Sin clave API a mano? Instala Ollama y Jarvis funciona totalmente en local, sin cuenta en la nube.",
- "local_missing_link": "Obtener Ollama",
- "continue": "Continuar la introducción"
- },
- "mic_test": {
- "title": "Comprobación del micrófono",
- "body": "Asegurémonos de que tu asistente pueda oírte.",
- "no_mic": "No se detectó ningún micrófono. Aún puedes hablar por texto o a través de un canal como Telegram.",
- "skip": "Omitir la comprobación del micrófono"
- },
- "system_style": {
- "title": "Elige tu estilo",
- "body": "¿Cómo debería aparecer tu asistente en pantalla? Puedes cambiarlo cuando quieras en Ajustes.",
- "recommended": "Recomendado",
- "options": {
- "jarvis_bar": "Barra de Jarvis",
- "mascot": "Mascota",
- "voice_orb": "Orbe de voz",
- "none": "Sin superposición"
- },
- "captions": {
- "jarvis_bar": "Una barra de voz flotante y delgada, siempre a mano.",
- "mascot": "Un acompañante flotante que reacciona cuando hablas.",
- "voice_orb": "Una esfera luminosa de luz en movimiento — arrástrala a cualquier pantalla.",
- "none": "Solo la ventana de la app — sin elementos flotantes en pantalla."
- },
- "needs_restart": "Casi listo — este estilo se aplica tras un breve reinicio.",
- "restart_now": "Reiniciar ahora",
- "restarting": "Reiniciando…",
- "save_error": "No se pudo guardar — se mantiene la opción recomendada. Puedes cambiarlo más tarde en Ajustes.",
- "skip": "Omitir — mantener la Barra de Jarvis"
- },
"finish": {
- "title": "¡Todo listo!",
- "body": "Tu asistente está listo. Di tu palabra de activación o escribe un comando para empezar.",
- "skipped_title": "Omitiste — configúralo cuando quieras en Ajustes:",
- "start_cta": "Empezar",
- "boot_notice": "Nota: el primer inicio tarda unos 10 segundos mientras tu asistente se inicia — es completamente normal.",
- "autostart_label": "Iniciar Jarvis automáticamente al iniciar sesión"
+ "summary_label": "Tu configuración",
+ "skipped": "Omitido — configúralo cuando quieras en Ajustes",
+ "autostart_label": "Iniciar {name} al iniciar sesión",
+ "autostart_hint": "Se ejecuta en silencio en segundo plano tras iniciar sesión.",
+ "tour_label": "¿Nuevo por aquí?",
+ "tour_title": "Ver el recorrido de 2 minutos",
+ "tour_body": "Se abre en YouTube en tu navegador.",
+ "boot_notice": "El primer inicio tarda unos 10 segundos mientras {name} se prepara — es normal.",
+ "start_cta": "Iniciar {name}",
+ "starting": "Iniciando…",
+ "start_failed": "No se pudo terminar la configuración. Comprueba que la aplicación esté en marcha e inténtalo de nuevo."
}
},
"language_select": {
@@ -4305,21 +4394,45 @@
"coding_mode_on_open": "Se activa al abrir",
"terminal_plan": "Plan de terminales",
"steps": {
- "folder": { "label": "Carpeta", "title": "Elige la carpeta del proyecto", "hint": "Todo lo que hagan los agentes permanece dentro de esta carpeta." },
- "layout": { "label": "Diseño", "title": "Diseña el espacio de trabajo", "hint": "Elige cuántos paneles de terminal independientes deben abrirse." },
- "agents": { "label": "Agentes" },
- "view": { "label": "Vista", "title": "Elige cómo leer el espacio", "hint": "Después ambas quedan a un clic: el conmutador está en la barra del espacio de trabajo." },
- "review": { "label": "Revisar", "title": "Revisa antes de abrir", "hint": "Nada empieza hasta que abras el espacio de trabajo." }
+ "folder": {
+ "label": "Carpeta",
+ "title": "Elige la carpeta del proyecto",
+ "hint": "Todo lo que hagan los agentes permanece dentro de esta carpeta."
+ },
+ "layout": {
+ "label": "Diseño",
+ "title": "Diseña el espacio de trabajo",
+ "hint": "Elige cuántos paneles de terminal independientes deben abrirse."
+ },
+ "agents": {
+ "label": "Agentes"
+ },
+ "view": {
+ "label": "Vista",
+ "title": "Elige cómo leer el espacio",
+ "hint": "Después ambas quedan a un clic: el conmutador está en la barra del espacio de trabajo."
+ },
+ "review": {
+ "label": "Revisar",
+ "title": "Revisa antes de abrir",
+ "hint": "Nada empieza hasta que abras el espacio de trabajo."
+ }
},
"views": {
- "grid": { "title": "Cuadrícula de terminales", "description": "Todos los paneles a la vez, uno junto a otro: la pared completa de terminales." },
- "chat": { "title": "Chat", "description": "El chat de agentes, en la carpeta de este espacio de trabajo: escribe en lugar de mirar terminales." }
+ "grid": {
+ "title": "Cuadrícula de terminales",
+ "description": "Todos los paneles a la vez, uno junto a otro: la pared completa de terminales."
+ },
+ "chat": {
+ "title": "Chat",
+ "description": "El chat de agentes, en la carpeta de este espacio de trabajo: escribe en lugar de mirar terminales."
+ }
}
},
"crowded": {
- "warning": "{0} terminales son muchos para una sola pantalla: a cada uno le queda poco sitio. En una pantalla grande no hay problema; en un portátil, con menos se sigue mejor. Siempre puedes maximizar un panel para leerlo.",
- "measured": "{0} terminales salen a unas {1} columnas cada uno en esta ventana: estrecho para la salida de un agente. En esta ventana caben {2} en paralelo con comodidad con tu tamaño de texto. Maximiza un panel cuando quieras leerlo a tamaño completo."
- },
+ "warning": "{0} terminales son muchos para una sola pantalla: a cada uno le queda poco sitio. En una pantalla grande no hay problema; en un portátil, con menos se sigue mejor. Siempre puedes maximizar un panel para leerlo.",
+ "measured": "{0} terminales salen a unas {1} columnas cada uno en esta ventana: estrecho para la salida de un agente. En esta ventana caben {2} en paralelo con comodidad con tu tamaño de texto. Maximiza un panel cuando quieras leerlo a tamaño completo."
+ },
"resume": {
"eyebrow": "Espacio de trabajo anterior",
"title": "Recupera el espacio de trabajo, no solo las ventanas",