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.

fix(onboarding): let Continue through once a wake word is saved

rubenluetke10-beep8b2e384aab42
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.test.tsx b/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.test.tsx
index 6509aacd95..82ac28a27b 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.test.tsx
@@ -176,6 +176,18 @@ it("goes on from the wake word once one is saved", async () => {
expect(screen.queryByTestId("setup-voice-later")).toBeNull();
});
+it("goes on once a wake word is saved even while always-listen stays off", async () => {
+ wakeWord = { phrase: "Hey Jarvis", enabled: false };
+ render(<SetupTour onb={fakeOnb({ ...accepted, current_step: "voice" })} preview={false} onFinished={vi.fn()} />);
+ await screen.findByTestId("setup-voice-later");
+ expect((screen.getByTestId("onboarding-primary") as HTMLButtonElement).disabled).toBe(true);
+ wakeWord = { phrase: "Hey George", enabled: false };
+ window.dispatchEvent(new CustomEvent("jarvis:wake-word-changed"));
+ await waitFor(() => expect(screen.getByTestId("setup-voice-status").textContent).toContain("Hey George"));
+ expect((screen.getByTestId("onboarding-primary") as HTMLButtonElement).disabled).toBe(false);
+ expect(screen.queryByTestId("setup-voice-later")).toBeNull();
+});
+
it("switches on the plan a key saved during the step completes", async () => {
render(<SetupTour onb={fakeOnb({ ...accepted, current_step: "keys" })} preview={false} onFinished={vi.fn()} />);
await screen.findByTestId("setup-keys-waiting");
diff --git a/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.tsx b/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.tsx
index 9a3cea2df5..38c4191c0a 100644
--- a/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.tsx
+++ b/jarvis/ui/web/frontend/src/components/onboarding/setup/SetupTour.tsx
@@ -450,21 +450,35 @@ function useConnectedSubscriptions(pollMs: number): string[] {
/**
* The wake-word group of Settings is open behind the card. Continue waits
* for a saved wake word; without one the Call shortcut is the way in, so the
- * step can still be left for later.
+ * step can still be left for later. Saving a word does not flip the
+ * always-listen switch (that needs a local model), so a save made during this
+ * step counts on its own — otherwise Continue stayed locked after a save.
*/
function VoiceStep({ next, later }: { next: () => void; later: () => void }) {
const t = useT();
const { config } = useWakeWord();
- const on = Boolean(config?.enabled && config.phrase.trim());
+ const [savedHere, setSavedHere] = useState(false);
+ useEffect(() => {
+ const onChanged = () => setSavedHere(true);
+ window.addEventListener("jarvis:wake-word-changed", onChanged);
+ return () => window.removeEventListener("jarvis:wake-word-changed", onChanged);
+ }, []);
+ const phrase = config?.phrase.trim() ?? "";
+ const on = Boolean(config?.enabled && phrase);
+ const saved = on || (savedHere && Boolean(phrase));
return (
<div className="space-y-3">
- <Status tone={on ? "ok" : "muted"} testId="setup-voice-status">
- {on ? fill(t("first_run.voice.on"), { phrase: config!.phrase }) : t("first_run.voice.off")}
+ <Status tone={saved ? "ok" : "muted"} testId="setup-voice-status">
+ {on
+ ? fill(t("first_run.voice.on"), { phrase })
+ : saved
+ ? fill(t("first_run.voice.saved"), { phrase })
+ : t("first_run.voice.off")}
</Status>
- <PrimaryAction onClick={next} disabled={!on}>
+ <PrimaryAction onClick={next} disabled={!saved}>
{t("first_run.continue")}
</PrimaryAction>
- {!on && (
+ {!saved && (
<div className="text-center">
<QuietAction onClick={later} testId="setup-voice-later" className="text-xs">
{t("first_run.voice.later")}
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/onboarding/de.json b/jarvis/ui/web/frontend/src/i18n/locales/onboarding/de.json
index 0139b46c7e..3e59669aca 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/onboarding/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/onboarding/de.json
@@ -66,6 +66,7 @@
"title": "Wähle dein Weckwort",
"lede": "Tippe hier dein Wort nach „Hey“ ein und speichere es. Das Wort wird auch der Name deines Assistenten. Kein Weckwort? Das Anruf-Kürzel funktioniert immer.",
"on": "„{phrase}“ ist an. Sag es jederzeit.",
+ "saved": "„{phrase}“ ist gespeichert. Schalte oben „Aktivierungswort einschalten“ an, damit es immer gehört wird; bis dahin funktioniert das Anruf-Kürzel.",
"off": "Noch kein Weckwort. Bis dahin funktioniert das Anruf-Kürzel.",
"later": "Überspringen, ich nutze das Anruf-Kürzel"
},
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/onboarding/en.json b/jarvis/ui/web/frontend/src/i18n/locales/onboarding/en.json
index dadc8a0dcb..6c56a4ec58 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/onboarding/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/onboarding/en.json
@@ -66,6 +66,7 @@
"title": "Choose your wake word",
"lede": "Type your word after \"Hey\" here and save it. The word also becomes the assistant's name. No wake word? The Call shortcut works anytime.",
"on": "\"{phrase}\" is on. Say it anytime.",
+ "saved": "\"{phrase}\" is saved. Turn on \"Activate wake word\" above to have it heard all the time; until then the Call shortcut works.",
"off": "No wake word yet. The Call shortcut works meanwhile.",
"later": "Skip, I'll use the Call shortcut"
},
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/onboarding/es.json b/jarvis/ui/web/frontend/src/i18n/locales/onboarding/es.json
index fd6603ebd5..748a7388a2 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/onboarding/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/onboarding/es.json
@@ -66,6 +66,7 @@
"title": "Elige tu palabra de activación",
"lede": "Escribe aquí tu palabra después de «Hey» y guárdala. La palabra también será el nombre de tu asistente. ¿Sin palabra? El atajo de llamada funciona siempre.",
"on": "«{phrase}» está activada. Dila cuando quieras.",
+ "saved": "«{phrase}» está guardada. Enciende «Activar palabra de activación» arriba para que se escuche siempre; mientras tanto funciona el atajo de llamada.",
"off": "Aún no hay palabra de activación. Mientras tanto funciona el atajo de llamada.",
"later": "Omitir, usaré el atajo de llamada"
},