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.

refactor(ui): redesign the Pipeline|Realtime voice-engine switch

Ruben Lütke4bf4591d454c
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 4aa79075da..942995640a 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -879,6 +879,9 @@
"mode_pipeline": "Pipeline",
"mode_realtime": "Realtime",
"mode_active_badge": "Aktiv",
+ "voice_engine_label": "Sprach-Engine",
+ "voice_engine_desc": "Wie Jarvis zuhört und spricht — die klassische Pipeline oder ein einzelnes Realtime-Modell.",
+ "mode_needs_key": "Schlüssel nötig",
"cat_brain_desc": "Das Modell, das Chat, Routing und Computer-Use antreibt.",
"cat_tts_desc": "Die Stimme, mit der Jarvis spricht.",
"cat_stt_desc": "Wie Jarvis deine Sprache in Text umwandelt.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index d3f601cf78..f7c83bb2bf 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -879,6 +879,9 @@
"mode_pipeline": "Pipeline",
"mode_realtime": "Realtime",
"mode_active_badge": "Active",
+ "voice_engine_label": "Voice engine",
+ "voice_engine_desc": "How Jarvis listens and talks — the classic pipeline, or a single realtime model.",
+ "mode_needs_key": "add a key",
"cat_brain_desc": "The model that powers chat, routing, and Computer-Use.",
"cat_tts_desc": "The voice Jarvis speaks with.",
"cat_stt_desc": "How Jarvis turns your speech into text.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 2480de5598..133e05db71 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -879,6 +879,9 @@
"mode_pipeline": "Pipeline",
"mode_realtime": "Tiempo real",
"mode_active_badge": "Activo",
+ "voice_engine_label": "Motor de voz",
+ "voice_engine_desc": "Cómo escucha y habla Jarvis: la pipeline clásica o un único modelo en tiempo real.",
+ "mode_needs_key": "falta una clave",
"cat_brain_desc": "El modelo que impulsa el chat, el enrutamiento y Computer-Use.",
"cat_tts_desc": "La voz con la que habla Jarvis.",
"cat_stt_desc": "Cómo convierte Jarvis tu voz en texto.",
diff --git a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
index 8327ef6699..c606eeec0f 100644
--- a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
+++ b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
@@ -209,8 +209,17 @@ export function ApiKeysView() {
* when `realtimeAvailable` (a key is present for some realtime family);
* otherwise the click just switches the view so the user can add a key from
* the Realtime tab without silently pinning the boot default to a dead
- * engine. The segment whose value matches the LIVE `[voice].mode` (from
- * `useVoiceMode`) shows a small "Active" badge.
+ * engine.
+ *
+ * Visual system (one system, two legible states — replaces the old
+ * two-color gold-ring + emerald-badge combo):
+ * - The segment matching the LIVE `[voice].mode` is the filled solid
+ * segment (`bg-primary`) with a leading "●" — unmistakably "this is on".
+ * - The segment currently being VIEWED but not live gets a subtle outline
+ * only (no fill) — it's a transient look, not "on".
+ * - Realtime with no key configured anywhere (`!realtimeAvailable`) reads
+ * muted with an inline "add a key" hint; it stays clickable (opens the
+ * Realtime tab so the user can add one) but never gets the fill.
*/
function EngineModeSwitch({
mode,
@@ -220,7 +229,7 @@ function EngineModeSwitch({
onSetVoiceMode,
}: {
mode: VoiceEngineMode;
- /** The live `[voice].mode` value, for the "Active" badge. */
+ /** The live `[voice].mode` value — determines the filled/active segment. */
liveMode: string;
/** Whether SOME realtime family (OpenAI/Gemini) has a key configured. */
realtimeAvailable: boolean;
@@ -242,29 +251,49 @@ function EngineModeSwitch({
}
return (
- <div className="border-b border-border px-6 pt-4">
+ <div className="border-b border-border px-6 pt-4 pb-4">
+ <div className="mb-2.5">
+ <h2 className="text-sm font-semibold text-foreground">{t("apikeys_view.voice_engine_label")}</h2>
+ <p className="text-xs text-muted-foreground">{t("apikeys_view.voice_engine_desc")}</p>
+ </div>
<div className="inline-flex items-center gap-1 rounded-xl border border-border bg-card/40 p-1">
- {segments.map((seg) => (
- <button
- key={seg.key}
- type="button"
- onClick={() => handleSelect(seg.key)}
- aria-pressed={mode === seg.key}
- className={cn(
- "inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-sm font-medium transition-colors",
- mode === seg.key
- ? "bg-primary/10 text-primary ring-1 ring-primary/30"
- : "text-muted-foreground hover:bg-secondary/60 hover:text-foreground",
- )}
- >
- {seg.label}
- {liveMode === seg.key && (
- <span className="rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-emerald-600">
- {t("apikeys_view.mode_active_badge")}
- </span>
- )}
- </button>
- ))}
+ {segments.map((seg) => {
+ const isLive = liveMode === seg.key;
+ const isViewedOnly = mode === seg.key && !isLive;
+ const needsKey = seg.key === "realtime" && !realtimeAvailable;
+ return (
+ <div key={seg.key} className="inline-flex items-center gap-1.5">
+ <button
+ type="button"
+ onClick={() => handleSelect(seg.key)}
+ aria-pressed={mode === seg.key}
+ className={cn(
+ "inline-flex items-center gap-1.5 rounded-lg px-3.5 py-1.5 text-sm font-medium transition-colors",
+ isLive
+ ? "bg-primary text-primary-foreground shadow-sm"
+ : isViewedOnly
+ ? "text-foreground ring-1 ring-border"
+ : needsKey
+ ? "text-muted-foreground/60 hover:bg-secondary/40 hover:text-muted-foreground"
+ : "text-muted-foreground hover:bg-secondary/60 hover:text-foreground",
+ )}
+ >
+ {isLive && (
+ <span aria-hidden="true" className="text-[10px] leading-none">
+ ●
+ </span>
+ )}
+ {seg.label}
+ {isLive && <span className="sr-only">{t("apikeys_view.mode_active_badge")}</span>}
+ </button>
+ {needsKey && (
+ <span className="pr-2 text-[10px] text-muted-foreground/70">
+ {t("apikeys_view.mode_needs_key")}
+ </span>
+ )}
+ </div>
+ );
+ })}
</div>
</div>
);