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(ui): engine toggle no longer claims 'needs an API key' while the status is simply unloaded

Ruben Lütkee114880089cf
diff --git a/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts b/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts
index 1a93296713..d60605eb97 100644
--- a/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts
@@ -83,6 +83,11 @@ export function useVoiceMode() {
return {
mode: q.data?.mode ?? "pipeline",
realtimeAvailable: q.data?.realtime_available ?? false,
+ // Distinguishes "the server SAID no realtime key" from "we never heard
+ // back" (timeout/loading). Without it a failed status fetch showed the
+ // false claim "Realtime needs an API key" and looked like a locked
+ // toggle on a machine that merely had a slow/broken backend moment.
+ statusKnown: q.isSuccess,
sessionActive: q.data?.session_active ?? false,
activeSessionMode: q.data?.active_session_mode ?? null,
activeSessionProvider: q.data?.active_session_provider ?? "",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 7e4265e002..03ac3f51cb 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -935,7 +935,8 @@
"guide_realtime_title": "Welches Modell soll ich nehmen?",
"guide_realtime_body": "OpenAI: GPT Realtime (der Anbieter-Standard) klingt am natürlichsten; GPT Realtime Mini ist die günstige Wahl. Google: Gemini 3.1 Flash Live ist das aktuelle Live-Flaggschiff. „Anbieter-Standard“ löst immer auf das empfohlene Modell auf — du kannst es einfach so lassen.",
"guide_computer_use_title": "Welcher Provider soll das Tool Model antreiben?",
- "guide_computer_use_body": "Das Tool Model übernimmt jede Aktion, die Jarvis für dich ausführt — auch Computer-Use, das Screenshots deines Bildschirms liest und deshalb ein Modell braucht, das Bilder versteht; die Auswahl blendet reine Text-Modelle aus. Im Zweifel: beim Haupt-Brain-Provider und seinem Standard-Modell bleiben."
+ "guide_computer_use_body": "Das Tool Model übernimmt jede Aktion, die Jarvis für dich ausführt — auch Computer-Use, das Screenshots deines Bildschirms liest und deshalb ein Modell braucht, das Bilder versteht; die Auswahl blendet reine Text-Modelle aus. Im Zweifel: beim Haupt-Brain-Provider und seinem Standard-Modell bleiben.",
+ "mode_status_unknown": "Der Engine-Status ist noch nicht geladen - der Schalter wird frei, sobald das Backend antwortet. Bleibt das so, starte die App neu."
},
"apikeys_test": {
"button": "Testen",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 2c1868ed27..7fed21d400 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -936,7 +936,8 @@
"guide_realtime_title": "Which model should I pick?",
"guide_realtime_body": "OpenAI: GPT Realtime (the provider default) sounds the most natural; GPT Realtime Mini is the budget pick. Google: Gemini 3.1 Flash Live is the current Live flagship. \"Provider default\" always resolves to the recommended model, so you can simply leave it.",
"guide_computer_use_title": "Which provider should power the Tool Model?",
- "guide_computer_use_body": "The Tool Model handles every action Jarvis takes for you — including Computer-Use, which reads screenshots of your screen, so it needs a model that understands images; the picker hides text-only models. If unsure, keep your main Brain provider and its default model."
+ "guide_computer_use_body": "The Tool Model handles every action Jarvis takes for you — including Computer-Use, which reads screenshots of your screen, so it needs a model that understands images; the picker hides text-only models. If unsure, keep your main Brain provider and its default model.",
+ "mode_status_unknown": "Engine status has not loaded yet - the switch unlocks as soon as the backend answers. If this persists, restart the app."
},
"apikeys_test": {
"button": "Test",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index e64646bc19..ae0f785ec6 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -935,7 +935,8 @@
"guide_realtime_title": "¿Qué modelo debería elegir?",
"guide_realtime_body": "OpenAI: GPT Realtime (el predeterminado del proveedor) suena más natural; GPT Realtime Mini es la opción económica. Google: Gemini 3.1 Flash Live es el buque insignia actual de Live. «Predeterminado del proveedor» siempre resuelve al modelo recomendado, así que puedes dejarlo tal cual.",
"guide_computer_use_title": "¿Qué proveedor debería impulsar el Tool Model?",
- "guide_computer_use_body": "El Tool Model se encarga de cada acción que Jarvis realiza por ti — incluido Computer-Use, que lee capturas de tu pantalla y necesita un modelo que entienda imágenes; el selector oculta los modelos de solo texto. En caso de duda, quédate con tu proveedor Brain principal y su modelo predeterminado."
+ "guide_computer_use_body": "El Tool Model se encarga de cada acción que Jarvis realiza por ti — incluido Computer-Use, que lee capturas de tu pantalla y necesita un modelo que entienda imágenes; el selector oculta los modelos de solo texto. En caso de duda, quédate con tu proveedor Brain principal y su modelo predeterminado.",
+ "mode_status_unknown": "El estado del motor aún no se ha cargado: el selector se desbloquea en cuanto el backend responda. Si persiste, reinicia la aplicación."
},
"apikeys_test": {
"button": "Probar",
diff --git a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
index c8a17bac66..945b743509 100644
--- a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
+++ b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
@@ -156,6 +156,7 @@ export function ApiKeysView() {
const {
mode: liveMode,
realtimeAvailable,
+ statusKnown,
sessionActive,
activeSessionMode,
activeSessionProvider,
@@ -196,6 +197,7 @@ export function ApiKeysView() {
mode={engineMode}
liveMode={liveMode}
realtimeAvailable={realtimeAvailable}
+ statusKnown={statusKnown}
sessionActive={sessionActive}
activeSessionMode={activeSessionMode}
activeSessionProvider={activeSessionProvider}
@@ -281,6 +283,7 @@ function EngineModeSwitch({
mode,
liveMode,
realtimeAvailable,
+ statusKnown,
sessionActive,
activeSessionMode,
activeSessionProvider,
@@ -294,6 +297,10 @@ function EngineModeSwitch({
liveMode: string;
/** Whether SOME realtime family (OpenAI/Gemini) has a key configured. */
realtimeAvailable: boolean;
+ /** False while the voice-mode status fetch has not succeeded yet: the
+ * availability is UNKNOWN then, and the hint must say so instead of
+ * falsely claiming "needs an API key" on a slow/broken backend moment. */
+ statusKnown: boolean;
/** What the currently open voice session actually uses. */
sessionActive: boolean;
activeSessionMode: "pipeline" | "realtime" | null;
@@ -415,7 +422,11 @@ function EngineModeSwitch({
</div>
<p className="mt-1.5 max-w-64 text-right text-[11px] leading-snug text-muted-foreground">
{mode === "realtime" && !realtimeAvailable
- ? t("apikeys_view.mode_needs_key")
+ ? t(
+ statusKnown
+ ? "apikeys_view.mode_needs_key"
+ : "apikeys_view.mode_status_unknown",
+ )
: mode === "realtime"
? t("apikeys_view.mode_desc_realtime")
: t("apikeys_view.mode_desc_pipeline")}