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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(ui): show the selected voice engine on the mission deck
Harald0ef21722571a
diff --git a/jarvis/ui/web/frontend/src/components/deck/DeckOrb.tsx b/jarvis/ui/web/frontend/src/components/deck/DeckOrb.tsxindex 0dbb619ea9..746a8362b6 100644--- a/jarvis/ui/web/frontend/src/components/deck/DeckOrb.tsx+++ b/jarvis/ui/web/frontend/src/components/deck/DeckOrb.tsx@@ -334,7 +334,11 @@ export function DeckOrb({<><Readout className="left-1 top-1 text-left" text={readouts.nw} /><Readout className="right-1 top-1 text-right" text={readouts.ne} />- <Readout className="bottom-1 left-1 text-left" text={readouts.sw} />+ <Readout+ className="bottom-1 left-1 text-left"+ text={readouts.sw}+ testId="deck-orb-provider"+ /><Readout className="bottom-1 right-1 text-right" text={readouts.se} /></>)}@@ -414,9 +418,18 @@ function OrbitLayer({);}-function Readout({ text, className }: { text: string; className?: string }) {+function Readout({+ text,+ className,+ testId,+}: {+ text: string;+ className?: string;+ testId?: string;+}) {return (<span+ data-testid={testId}className={cn("pointer-events-none absolute max-w-[42%] truncate px-1.5 font-mono text-[9px] uppercase tracking-[0.16em] text-primary/90",className,diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsxindex ab1b39cab5..f1ecf35d09 100644--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx@@ -320,6 +320,22 @@ describe("Sidebar footer in realtime voice mode", () => {"google/gemini-3.5-flash",);});++ test("Vertex AI Live is named as such, not as the pipeline brain", () => {+ voiceModeMock.value = {+ ...voiceModeMock.value,+ mode: "realtime",+ activeProvider: "vertex-live",+ activeProviderLabel: "Vertex AI Live",+ activeModel: "gemini-live-2.5-flash-preview-native-audio-dialog",+ };++ renderSidebar();++ expect(screen.getByTestId("sidebar-footer-tier").textContent).toBe("Realtime");+ expect(screen.getByText("Vertex AI Live")).toBeTruthy();+ expect(screen.queryByText("OpenRouter")).toBeNull();+ });});describe("Sidebar assistant name header", () => {diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsxindex 59f1a2c20a..5ac73423cc 100644--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx@@ -15,6 +15,7 @@ import { useVoiceReadiness } from "@/hooks/useVoiceReadiness";import { useVoiceMode } from "@/hooks/useVoiceMode";import { useSectionHealth } from "@/hooks/useProviders";import { usePluginAttention } from "@/hooks/usePluginAttention";+import { useVoiceEngineDisplay } from "@/hooks/useVoiceEngineDisplay";import { cn } from "@/lib/utils";import { useMemo, useState } from "react";import { useT } from "@/i18n";@@ -102,8 +103,7 @@ export function Sidebar({const transcriptionFinal = useEventStore((s) => s.transcriptionFinal);// Shared readiness derivation (same source the banner + chat empty-state use).const { connected, voiceWarming, bootWarming, warming } = useVoiceReadiness();- const brainProvider = useEventStore((s) => s.brainProvider);- const brainModel = useEventStore((s) => s.brainModel);+// Per-section provider health (same source as the API-Keys tab dots). The// sidebar surfaces only a hard "error" — a provider that is set up but failing// — so a broken key is visible from anywhere without opening the page. The@@ -133,11 +133,11 @@ export function Sidebar({// follows the VOICE MODE rather than the pipeline brain (in realtime mode the// pipeline brain is dormant, and showing it there misled the user —// "OpenRouter" while Gemini Live was doing all the talking), and the status- // line needs its connecting phase. A RUNNING realtime session's live- // provider/model outrank the configured pick (a mid-call cross-family- // fallback must be visible, AP-22); when idle the resolved provider + its- // pinned/default model are shown.+ // line needs its connecting phase. Same resolver as the mission-deck header+ // and orb (`useVoiceEngineDisplay`): a live session outranks the configured+ // pick so a mid-call cross-family fallback is visible (AP-22).const voiceMode = useVoiceMode();+ const engine = useVoiceEngineDisplay();// The window connects in ~1s but the voice feature warms up ~20s in the// background. During that gap show a "Voice starting…" spinner instead of the@@ -162,30 +162,15 @@ export function Sidebar({? t("voice_state.connecting"): t(`voice_state.${voiceState}`);- const providerLabel = useMemo(() => prettyProviderName(brainProvider), [brainProvider]);-- const realtimeFooter = voiceMode.mode === "realtime";- const liveRealtimeSession =- realtimeFooter &&- voiceMode.sessionActive &&- voiceMode.activeSessionMode === "realtime";+ const realtimeFooter = engine.tier === "realtime";const footerLabel = realtimeFooter? t("sidebar.realtime_label"): t("sidebar.brain_label");const footerTooltip = realtimeFooter? t("sidebar.realtime_tooltip"): t("sidebar.brain_tooltip");- const footerProvider = realtimeFooter- ? liveRealtimeSession && voiceMode.activeSessionProvider- ? prettyProviderName(voiceMode.activeSessionProvider)- : voiceMode.activeProviderLabel ??- prettyProviderName(voiceMode.activeProvider ?? "unknown")- : providerLabel;- const footerModel = realtimeFooter- ? liveRealtimeSession && voiceMode.activeSessionModel- ? voiceMode.activeSessionModel- : voiceMode.activeModel ?? ""- : brainModel;+ const footerProvider = engine.providerLabel;+ const footerModel = engine.model;const [logoRetry, setLogoRetry] = useState(0);@@ -525,22 +510,3 @@ function tailTruncate(s: string, n: number): string {return "…" + s.slice(s.length - (n - 1));}-function prettyProviderName(id: string): string {- const map: Record<string, string> = {- "claude-api": "Claude (API)",- "openrouter": "OpenRouter",- "ollama-local": "Ollama (local)",- "ollama-cloud": "Ollama (Cloud)",- "gemini": "Gemini",- "openai": "OpenAI",- "codex": "Codex",- "mock": "Mock-Brain",- // Realtime tier — used by the footer card in realtime voice mode when the- // backend's pretty label is unavailable (cosmetic fallback only).- "openai-realtime": "OpenAI Realtime",- "gemini-live": "Gemini Live",- "local-realtime": "Self-hosted realtime",- "unknown": "—",- };- return map[id] ?? id;-}diff --git a/jarvis/ui/web/frontend/src/hooks/useVoiceEngineDisplay.ts b/jarvis/ui/web/frontend/src/hooks/useVoiceEngineDisplay.tsnew file mode 100644index 0000000000..a4d32837c6--- /dev/null+++ b/jarvis/ui/web/frontend/src/hooks/useVoiceEngineDisplay.ts@@ -0,0 +1,46 @@+import { useMemo } from "react";++import { useVoiceMode } from "@/hooks/useVoiceMode";+import {+ resolveVoiceEngineDisplay,+ type VoiceEngineDisplay,+} from "@/lib/voiceEngineDisplay";+import { useEventStore } from "@/store/events";++/**+ * The provider + model the current voice engine will use on the next spoken+ * turn. Same rule as the sidebar footer: realtime names the realtime pick+ * (and a live session outranks it); pipeline names the classic brain.+ */+export function useVoiceEngineDisplay(): VoiceEngineDisplay {+ const voiceMode = useVoiceMode();+ const brainProvider = useEventStore((s) => s.brainProvider);+ const brainModel = useEventStore((s) => s.brainModel);+ return useMemo(+ () =>+ resolveVoiceEngineDisplay({+ mode: voiceMode.mode,+ activeProvider: voiceMode.activeProvider,+ activeProviderLabel: voiceMode.activeProviderLabel,+ activeModel: voiceMode.activeModel,+ sessionActive: voiceMode.sessionActive,+ activeSessionMode: voiceMode.activeSessionMode,+ activeSessionProvider: voiceMode.activeSessionProvider,+ activeSessionModel: voiceMode.activeSessionModel,+ brainProvider,+ brainModel,+ }),+ [+ voiceMode.mode,+ voiceMode.activeProvider,+ voiceMode.activeProviderLabel,+ voiceMode.activeModel,+ voiceMode.sessionActive,+ voiceMode.activeSessionMode,+ voiceMode.activeSessionProvider,+ voiceMode.activeSessionModel,+ brainProvider,+ brainModel,+ ],+ );+}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex 591b0fb5e1..bd8ec290bb 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -4370,6 +4370,7 @@"mood_fail": "gestört","mood_offline": "getrennt","stat_brain": "Hirn",+ "stat_realtime": "Realtime","stat_model": "Modell","stat_running": "Läuft","switch_to_classic": "Klassischer Chat",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex 908744279d..6e0629fb3e 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -4370,6 +4370,7 @@"mood_fail": "trouble","mood_offline": "offline","stat_brain": "Brain",+ "stat_realtime": "Realtime","stat_model": "Model","stat_running": "Running","switch_to_classic": "Classic chat",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex d09587343f..eb1aecddd3 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -4370,6 +4370,7 @@"mood_fail": "con fallos","mood_offline": "sin conexión","stat_brain": "Cerebro",+ "stat_realtime": "Tiempo real","stat_model": "Modelo","stat_running": "Activos","switch_to_classic": "Chat clásico",diff --git a/jarvis/ui/web/frontend/src/lib/prettyProviderName.test.ts b/jarvis/ui/web/frontend/src/lib/prettyProviderName.test.tsnew file mode 100644index 0000000000..6e22db4b03--- /dev/null+++ b/jarvis/ui/web/frontend/src/lib/prettyProviderName.test.ts@@ -0,0 +1,32 @@+import { describe, expect, it } from "vitest";++import { prettyProviderName } from "@/lib/prettyProviderName";++describe("prettyProviderName", () => {+ it("names the Vertex realtime transport the API-Keys card uses", () => {+ expect(prettyProviderName("vertex-live")).toBe("Vertex AI Live");+ expect(prettyProviderName("vertex")).toBe("Vertex AI");+ });++ it("keeps the names the sidebar footer already pins", () => {+ expect(prettyProviderName("openrouter")).toBe("OpenRouter");+ expect(prettyProviderName("claude-api")).toBe("Claude (API)");+ });++ it("names every realtime transport the deck can show", () => {+ expect(prettyProviderName("openai-realtime")).toBe("OpenAI Realtime");+ expect(prettyProviderName("gemini-live")).toBe("Gemini Live");+ expect(prettyProviderName("vertex-live")).toBe("Vertex AI Live");+ expect(prettyProviderName("local-realtime")).toBe("Self-hosted realtime");+ });++ it("does not invent a blank for an unknown id", () => {+ expect(prettyProviderName("future-provider")).toBe("future-provider");+ });++ it("renders unset / unknown as an em dash", () => {+ expect(prettyProviderName("")).toBe("—");+ expect(prettyProviderName("unknown")).toBe("—");+ expect(prettyProviderName(" ")).toBe("—");+ });+});diff --git a/jarvis/ui/web/frontend/src/lib/prettyProviderName.ts b/jarvis/ui/web/frontend/src/lib/prettyProviderName.tsnew file mode 100644index 0000000000..6f5c5ec7d6--- /dev/null+++ b/jarvis/ui/web/frontend/src/lib/prettyProviderName.ts@@ -0,0 +1,35 @@+/**+ * Cosmetic fallback when a backend pretty-label has not arrived yet.+ *+ * The registry (`provider_spec.py`) is the source of the names the API-Keys+ * cards use. This map is only for surfaces that already have a provider *id*+ * (sidebar footer, mission-deck header/orb) and must not flash the raw id+ * while `/api/settings/voice-mode` is still in flight. Unknown ids pass+ * through unchanged so a newly added provider never renders as a blank.+ */+const PROVIDER_NAMES: Record<string, string> = {+ "claude-api": "Claude (API)",+ openrouter: "OpenRouter",+ ollama: "Ollama (local)",+ "ollama-local": "Ollama (local)",+ "ollama-cloud": "Ollama (Cloud)",+ gemini: "Gemini",+ vertex: "Vertex AI",+ openai: "OpenAI",+ grok: "Grok",+ nvidia: "NVIDIA NIM",+ codex: "Codex",+ mock: "Mock-Brain",+ // Realtime tier — used when the backend's pretty label is unavailable.+ "openai-realtime": "OpenAI Realtime",+ "gemini-live": "Gemini Live",+ "vertex-live": "Vertex AI Live",+ "local-realtime": "Self-hosted realtime",+ unknown: "—",+};++export function prettyProviderName(id: string): string {+ const key = id.trim();+ if (!key) return "—";+ return PROVIDER_NAMES[key] ?? key;+}diff --git a/jarvis/ui/web/frontend/src/lib/voiceEngineDisplay.test.ts b/jarvis/ui/web/frontend/src/lib/voiceEngineDisplay.test.tsnew file mode 100644index 0000000000..b651586e3c--- /dev/null+++ b/jarvis/ui/web/frontend/src/lib/voiceEngineDisplay.test.ts@@ -0,0 +1,107 @@+import { describe, expect, it } from "vitest";++import { resolveVoiceEngineDisplay, type VoiceEngineDisplayInput } from "@/lib/voiceEngineDisplay";++const PIPELINE: VoiceEngineDisplayInput = {+ mode: "pipeline",+ activeProvider: "vertex-live",+ activeProviderLabel: "Vertex AI Live",+ activeModel: "gemini-live-2.5-flash-preview-native-audio-dialog",+ sessionActive: false,+ activeSessionMode: null,+ activeSessionProvider: "",+ activeSessionModel: "",+ brainProvider: "openrouter",+ brainModel: "google/gemini-3.5-flash",+};++describe("resolveVoiceEngineDisplay", () => {+ it("pipeline mode keeps the classic brain even when a realtime provider is fully configured", () => {+ const got = resolveVoiceEngineDisplay(PIPELINE);+ expect(got.tier).toBe("pipeline");+ expect(got.providerLabel).toBe("OpenRouter");+ expect(got.model).toBe("google/gemini-3.5-flash");+ });++ it("realtime mode names the realtime pick, not the dormant pipeline brain", () => {+ // The bug on the mission deck: header and orb said "openrouter" while+ // Vertex AI Live was the selected (and running) voice engine.+ const got = resolveVoiceEngineDisplay({ ...PIPELINE, mode: "realtime" });+ expect(got.tier).toBe("realtime");+ expect(got.providerId).toBe("vertex-live");+ expect(got.providerLabel).toBe("Vertex AI Live");+ expect(got.model).toBe("gemini-live-2.5-flash-preview-native-audio-dialog");+ });++ it("a running realtime session's live provider/model outrank the configured pick", () => {+ const got = resolveVoiceEngineDisplay({+ ...PIPELINE,+ mode: "realtime",+ sessionActive: true,+ activeSessionMode: "realtime",+ activeSessionProvider: "openai-realtime",+ activeSessionModel: "gpt-realtime-2.1",+ });+ expect(got.providerLabel).toBe("OpenAI Realtime");+ expect(got.model).toBe("gpt-realtime-2.1");+ });++ it("falls back to a pretty id when the backend label has not landed", () => {+ const got = resolveVoiceEngineDisplay({+ ...PIPELINE,+ mode: "realtime",+ activeProvider: "vertex-live",+ activeProviderLabel: null,+ activeModel: null,+ });+ expect(got.providerLabel).toBe("Vertex AI Live");+ expect(got.model).toBe("");+ });++ it("renders an em dash when realtime is on but no provider is resolved yet", () => {+ const got = resolveVoiceEngineDisplay({+ ...PIPELINE,+ mode: "realtime",+ activeProvider: null,+ activeProviderLabel: null,+ activeModel: null,+ });+ expect(got.providerLabel).toBe("—");+ });++ it("names Gemini Live and the self-hosted transport the same way", () => {+ expect(+ resolveVoiceEngineDisplay({+ ...PIPELINE,+ mode: "realtime",+ activeProvider: "gemini-live",+ activeProviderLabel: "Gemini Live",+ activeModel: "gemini-3.1-flash-live-preview",+ }).providerLabel,+ ).toBe("Gemini Live");+ expect(+ resolveVoiceEngineDisplay({+ ...PIPELINE,+ mode: "realtime",+ activeProvider: "local-realtime",+ activeProviderLabel: "Self-hosted realtime (OpenAI-compatible)",+ activeModel: "auto",+ }).providerLabel,+ ).toBe("Self-hosted realtime (OpenAI-compatible)");+ });++ it("keeps the registry label when a live session is still on the configured pick", () => {+ const got = resolveVoiceEngineDisplay({+ ...PIPELINE,+ mode: "realtime",+ activeProvider: "local-realtime",+ activeProviderLabel: "Self-hosted realtime (OpenAI-compatible)",+ activeModel: "auto",+ sessionActive: true,+ activeSessionMode: "realtime",+ activeSessionProvider: "local-realtime",+ activeSessionModel: "auto",+ });+ expect(got.providerLabel).toBe("Self-hosted realtime (OpenAI-compatible)");+ });+});diff --git a/jarvis/ui/web/frontend/src/lib/voiceEngineDisplay.ts b/jarvis/ui/web/frontend/src/lib/voiceEngineDisplay.tsnew file mode 100644index 0000000000..7d4610d57a--- /dev/null+++ b/jarvis/ui/web/frontend/src/lib/voiceEngineDisplay.ts@@ -0,0 +1,92 @@+import { prettyProviderName } from "@/lib/prettyProviderName";++/**+ * Which provider + model the voice surfaces should name right now.+ *+ * Pipeline and realtime are independent picks: someone can run OpenRouter as+ * the classic brain and Vertex AI Live on the duplex socket. Showing the+ * dormant one is the lie the mission deck told (OpenRouter on the header and+ * the orb while Vertex was doing the talking).+ *+ * One display, one rule, shared by the sidebar footer and the deck:+ *+ * - Pipeline mode names the classic brain and its model.+ * - Realtime mode names the realtime provider. A live session outranks the+ * configured pick so a mid-call cross-family fallback (AP-22) is visible.+ * - Never both. The compact header has room for the engine that will answer+ * the next spoken turn; both picks stay on API Keys.+ */++export type VoiceEngineTier = "pipeline" | "realtime";++export interface VoiceEngineDisplay {+ tier: VoiceEngineTier;+ providerId: string;+ providerLabel: string;+ model: string;+}++export interface VoiceEngineDisplayInput {+ mode: string;+ activeProvider: string | null;+ activeProviderLabel: string | null;+ activeModel: string | null;+ sessionActive: boolean;+ activeSessionMode: "pipeline" | "realtime" | null;+ activeSessionProvider: string;+ activeSessionModel: string;+ brainProvider: string;+ brainModel: string;+}++export function resolveVoiceEngineDisplay(+ input: VoiceEngineDisplayInput,+): VoiceEngineDisplay {+ const realtime = input.mode === "realtime";+ const liveSession =+ realtime &&+ input.sessionActive &&+ input.activeSessionMode === "realtime" &&+ Boolean(input.activeSessionProvider);++ if (realtime) {+ const providerId = liveSession+ ? input.activeSessionProvider+ : input.activeProvider ?? "";+ const providerLabel = realtimeProviderLabel(input, liveSession, providerId);+ const model = liveSession+ ? input.activeSessionModel+ : input.activeModel ?? "";+ return {+ tier: "realtime",+ providerId,+ providerLabel: providerLabel || "—",+ model,+ };+ }++ return {+ tier: "pipeline",+ providerId: input.brainProvider,+ providerLabel: prettyProviderName(input.brainProvider),+ model: input.brainModel,+ };+}++/** Registry label when we have it; pretty-id fallback when the session crossed families. */+function realtimeProviderLabel(+ input: VoiceEngineDisplayInput,+ liveSession: boolean,+ providerId: string,+): string {+ if (liveSession) {+ if (+ input.activeSessionProvider === input.activeProvider &&+ input.activeProviderLabel?.trim()+ ) {+ return input.activeProviderLabel.trim();+ }+ return prettyProviderName(input.activeSessionProvider);+ }+ return input.activeProviderLabel?.trim() || prettyProviderName(providerId);+}diff --git a/jarvis/ui/web/frontend/src/views/MissionDeckView.engine.test.tsx b/jarvis/ui/web/frontend/src/views/MissionDeckView.engine.test.tsxnew file mode 100644index 0000000000..424af30214--- /dev/null+++ b/jarvis/ui/web/frontend/src/views/MissionDeckView.engine.test.tsx@@ -0,0 +1,172 @@+import { cleanup, fireEvent, render, screen } from "@testing-library/react";+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";++/**+ * The mission-deck header and orb name the voice engine that will answer+ * the next spoken turn. Pipeline and realtime are independent picks; showing+ * the dormant classic brain while Vertex AI Live is selected is the bug+ * this file pins.+ */+vi.mock("@/components/layout/DockRail", () => ({ DockRail: () => <nav data-testid="dock" /> }));+vi.mock("@/components/deck/DeckWiki", () => ({+ WikiCard: ({ className }: { className?: string }) => <section className={className}>wiki</section>,+}));+vi.mock("@/components/deck/DeckActivityCards", () => ({+ IdeGridCard: () => <section>ide</section>,+ OutputsCard: () => <section>outputs</section>,+ RunsCard: () => <section>runs</section>,+ TerminalsCard: () => <section>terminals</section>,+}));+vi.mock("@/components/deck/DeckSignalCards", () => ({+ ApiStatsCard: () => <section>api</section>,+ CaptureCard: () => <section>capture</section>,+ LiveCounter: () => <div>counter</div>,+}));+vi.mock("@/components/deck/DeckTurnCard", () => ({ TurnCard: () => <section>turn</section> }));+vi.mock("@/components/deck/DeckLogCard", async () => {+ const actual = await vi.importActual<typeof import("@/components/deck/DeckLogCard")>(+ "@/components/deck/DeckLogCard",+ );+ return { ...actual, LogCard: () => <section>log</section> };+});+vi.mock("@/hooks/useWakeWord", () => ({+ useWakeWord: () => ({+ config: {+ phrase: "Hey Nova",+ engine: "openwakeword",+ custom_model_path: "",+ fuzzy_match_ratio: 0.8,+ language: "auto",+ engines: ["openwakeword"],+ instant_phrases: [],+ local_whisper_available: false,+ enabled: true,+ },+ loading: false,+ error: null,+ refetch: async () => {},+ saveWakeWord: async () => ({}),+ setWakeLanguage: async () => {},+ setWakeActivation: async () => ({}),+ }),+}));+vi.mock("@/lib/voiceApi", () => ({+ requestVoiceCall: async () => ({ armed: true }),+ requestVoiceHangup: async () => {},+}));+vi.mock("@/components/MascotGigi", () => ({+ MascotGigi: () => <div data-testid="mascot-gigi" />,+}));+vi.mock("@/components/layout/TopBar", () => ({+ TopBarActions: () => null,+}));+vi.mock("@/components/layout/CodingModeBadge", () => ({+ CodingModeBadge: () => null,+}));++const voiceModeMock = vi.hoisted(() => ({+ value: {+ mode: "pipeline" as "pipeline" | "realtime",+ activeProvider: null as string | null,+ activeProviderLabel: null as string | null,+ activeModel: null as string | null,+ sessionActive: false,+ activeSessionMode: null as "pipeline" | "realtime" | null,+ activeSessionProvider: "",+ activeSessionModel: "",+ },+}));+vi.mock("@/hooks/useVoiceMode", () => ({+ useVoiceMode: () => voiceModeMock.value,+}));++import { MissionDeckView } from "@/views/MissionDeckView";+import { useDeckStore } from "@/store/deck";+import { useEventStore } from "@/store/events";++function resetVoiceMode() {+ voiceModeMock.value = {+ mode: "pipeline",+ activeProvider: null,+ activeProviderLabel: null,+ activeModel: null,+ sessionActive: false,+ activeSessionMode: null,+ activeSessionProvider: "",+ activeSessionModel: "",+ };+}++function readyBoard() {+ useEventStore.setState({+ connected: true,+ voiceReady: true,+ wsWarming: false,+ voiceState: "idle",+ brainProvider: "openrouter",+ brainModel: "google/gemini-3.5-flash",+ assistantName: "Nova",+ messages: [{ id: "m1", role: "assistant", content: "Hallo.", ts: Date.now() }],+ thinkingSteps: [],+ chatThinking: false,+ activeSection: "chats",+ });+ useDeckStore.getState().openBoard();+}++describe("MissionDeckView — voice-engine header and orb", () => {+ beforeEach(() => {+ useDeckStore.getState().resetDeck();+ resetVoiceMode();+ readyBoard();+ });+ afterEach(() => cleanup());++ test("pipeline mode names the classic brain on the header and the orb", () => {+ render(<MissionDeckView />);+ expect(screen.getByTestId("deck-stat-engine").textContent).toBe("BrainOpenRouter");+ expect(screen.getByTestId("deck-stat-model").textContent).toBe("Modelgoogle/gemini-3.5-flash");+ expect(screen.getByTestId("deck-orb-provider").textContent).toBe("OpenRouter");+ });++ test("realtime mode names Vertex AI Live, not the dormant OpenRouter brain", () => {+ voiceModeMock.value = {+ ...voiceModeMock.value,+ mode: "realtime",+ activeProvider: "vertex-live",+ activeProviderLabel: "Vertex AI Live",+ activeModel: "gemini-live-2.5-flash-preview-native-audio-dialog",+ };+ render(<MissionDeckView />);+ expect(screen.getByTestId("deck-stat-engine").textContent).toBe("RealtimeVertex AI Live");+ expect(screen.getByTestId("deck-stat-model").textContent).toBe(+ "Modelgemini-live-2.5-flash-preview-native-audio-dialog",+ );+ expect(screen.getByTestId("deck-orb-provider").textContent).toBe("Vertex AI Live");+ expect(screen.queryByText("OpenRouter")).toBeNull();+ });++ test("a running realtime session outranks the configured realtime pick", () => {+ voiceModeMock.value = {+ ...voiceModeMock.value,+ mode: "realtime",+ activeProvider: "vertex-live",+ activeProviderLabel: "Vertex AI Live",+ activeModel: "gemini-live-2.5-flash-preview-native-audio-dialog",+ sessionActive: true,+ activeSessionMode: "realtime",+ activeSessionProvider: "openai-realtime",+ activeSessionModel: "gpt-realtime-2.1",+ };+ render(<MissionDeckView />);+ expect(screen.getByTestId("deck-stat-engine").textContent).toBe("RealtimeOpenAI Realtime");+ expect(screen.getByTestId("deck-stat-model").textContent).toBe("Modelgpt-realtime-2.1");+ expect(screen.getByTestId("deck-orb-provider").textContent).toBe("OpenAI Realtime");+ });++ test("clicking the engine stat opens API Keys", () => {+ render(<MissionDeckView />);+ fireEvent.click(screen.getByTestId("deck-stat-engine"));+ expect(useEventStore.getState().activeSection).toBe("apikeys");+ });+});diff --git a/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsx b/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsxindex 634b51802f..5eddee878b 100644--- a/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsx+++ b/jarvis/ui/web/frontend/src/views/MissionDeckView.phases.test.tsx@@ -72,6 +72,17 @@ vi.mock("@/components/layout/TopBar", () => ({vi.mock("@/components/layout/CodingModeBadge", () => ({CodingModeBadge: () => null,}));+// Phase tests are not about which provider is named. Stub the display so+// this file never pulls /api/settings/voice-mode (the real hook needs a+// QueryClient). The engine-display file covers Vertex vs OpenRouter.+vi.mock("@/hooks/useVoiceEngineDisplay", () => ({+ useVoiceEngineDisplay: () => ({+ tier: "pipeline",+ providerId: "openrouter",+ providerLabel: "OpenRouter",+ model: "",+ }),+}));import { MissionDeckView } from "@/views/MissionDeckView";import { useDeckStore } from "@/store/deck";@@ -93,7 +104,7 @@ function ready() {});}-describe("MissionDeckView — the three acts", () => {+describe("MissionDeckView — the three acts", { timeout: 15_000 }, () => {beforeEach(() => {useDeckStore.getState().resetDeck();ready();@@ -166,8 +177,8 @@ describe("MissionDeckView — the three acts", () => {// A dropped link does not send the person back to the start screen.act(() => useEventStore.setState({ connected: false }));expect(screen.getByTestId("deck-board")).toBeTruthy();- await waitFor(() => expect(screen.queryByTestId("deck-standby")).toBeNull(), { timeout: 3000 });- });+ await waitFor(() => expect(screen.queryByTestId("deck-standby")).toBeNull(), { timeout: 4000 });+ }, 10_000);test("pressing the orb reaches for the voice AND opens the board at once", () => {render(<MissionDeckView />);diff --git a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsxindex c1cd974c67..b4a1480d54 100644--- a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx+++ b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx@@ -23,6 +23,7 @@ import { ApiStatsCard, CaptureCard, LiveCounter } from "@/components/deck/DeckSiimport { LogCard } from "@/components/deck/DeckLogCard";import { TurnCard } from "@/components/deck/DeckTurnCard";import { WikiCard, warmWikiScene } from "@/components/deck/DeckWiki";+import { useVoiceEngineDisplay } from "@/hooks/useVoiceEngineDisplay";import { useVoiceReadiness } from "@/hooks/useVoiceReadiness";import { useWakeWord } from "@/hooks/useWakeWord";import { useVoiceCall } from "@/components/agentic/useVoiceCall";@@ -89,8 +90,6 @@ export function MissionDeckView({}) {const t = useT();const assistantName = useEventStore((s) => s.assistantName);- const brainProvider = useEventStore((s) => s.brainProvider);- const brainModel = useEventStore((s) => s.brainModel);const connected = useEventStore((s) => s.connected);const voiceReady = useEventStore((s) => s.voiceReady);const voiceState = useEventStore((s) => s.voiceState);@@ -105,6 +104,11 @@ export function MissionDeckView({const boardOpen = useDeckStore((s) => s.boardOpen);const openBoard = useDeckStore((s) => s.openBoard);const { warming } = useVoiceReadiness();+ // Header + orb name the engine that will answer the next spoken turn, not+ // the dormant sibling. Pipeline and realtime are independent picks; the+ // sidebar footer already followed this rule and the deck was still showing+ // the classic brain (OpenRouter) while Vertex AI Live was talking.+ const engine = useVoiceEngineDisplay();// The orb is the click-shaped wake word: the same start/stop path the// classic surface's voice bubble uses, so both do exactly one thing.const { active: callActive, busy: callBusy, connecting, toggleCall } = useVoiceCall();@@ -196,7 +200,7 @@ export function MissionDeckView({const readouts: OrbReadouts = {nw: t(`deck.mood_${mood}`),ne: `${running.length} ${t("deck.orb_steps")}`,- sw: brainProvider || "—",+ sw: engine.providerLabel,se: `${wordsSession} ${t("deck.orb_words")}`,};// Pressing the orb reaches for the voice — the board opens on the press@@ -242,7 +246,10 @@ export function MissionDeckView({<div className="flex items-center gap-3 font-mono text-[9px] uppercase tracking-[0.14em] text-muted-foreground"><Lamp on={connected} label={t("deck.lamp_link")} /><Lamp on={voiceReady} label={t("deck.lamp_voice")} />- <Lamp on={Boolean(brainProvider)} label={t("deck.lamp_brain")} />+ <Lamp+ on={engine.providerLabel !== "—"}+ label={t(engine.tier === "realtime" ? "deck.stat_realtime" : "deck.lamp_brain")}+ /><Lamp on={cuActive} label={t("deck.lamp_cu")} /></div>@@ -253,14 +260,16 @@ export function MissionDeckView({{assistantName}</span><HeaderStat- label={t("deck.stat_brain")}- value={brainProvider || "—"}+ label={t(engine.tier === "realtime" ? "deck.stat_realtime" : "deck.stat_brain")}+ value={engine.providerLabel}hot+ testId="deck-stat-engine"onClick={() => setActiveSection("apikeys")}/><HeaderStatlabel={t("deck.stat_model")}- value={brainModel || "—"}+ value={engine.model || "—"}+ testId="deck-stat-model"onClick={() => setActiveSection("apikeys")}/>{headerAccessory}@@ -548,11 +557,13 @@ function HeaderStat({value,hot,onClick,+ testId,}: {label: string;value: string;hot?: boolean;onClick?: () => void;+ testId?: string;}) {const body = (<>@@ -564,10 +575,17 @@ function HeaderStat({</span></>);- if (!onClick) return <div className="flex items-baseline gap-1.5 whitespace-nowrap">{body}</div>;+ if (!onClick) {+ return (+ <div data-testid={testId} className="flex items-baseline gap-1.5 whitespace-nowrap">+ {body}+ </div>+ );+ }return (<buttontype="button"+ data-testid={testId}onClick={onClick}className="flex items-baseline gap-1.5 whitespace-nowrap transition-colors hover:[&>span]:text-primary">