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(local-models): speech gets a card, embeddings moves to the side row
rubenluetke10-beepbe024bbe4ed3
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/local_models/de.json b/jarvis/ui/web/frontend/src/i18n/locales/local_models/de.jsonindex ed41c8f918..1f87fb9f65 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/local_models/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/local_models/de.json@@ -4,9 +4,8 @@"chat_purpose": "Antwortet, wenn du tippst.","tools_screen_purpose": "Liest den Bildschirm und bedient die Werkzeuge.","deep_purpose": "Übernimmt die langen Aufgaben: Code, Planung, Recherche.",- "embedding_purpose": "Macht deine Notizen durchsuchbar.",- "voice_purpose": "Antwortet im Gespräch. Wird im Sprachserver gesetzt.",- "voice_absent": "Noch kein Sprachserver — ein Anruf wird vom Chat-Modell beantwortet.",+ "embedding_purpose": "Indexiert dein Wiki im Hintergrund. Einmal gewählt, dann vergessen.",+ "voice_purpose": "Antwortet, wenn du sprichst. Ein Anruf will ein kleines, schnelles Modell.","empty": "Noch kein Modell","not_on_disk": "Gesetzt, aber nicht heruntergeladen","no_facts": "Größe unbekannt",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/local_models/en.json b/jarvis/ui/web/frontend/src/i18n/locales/local_models/en.jsonindex 8a9f960f8c..714c9a5ac8 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/local_models/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/local_models/en.json@@ -4,9 +4,8 @@"chat_purpose": "Answers when you type.","tools_screen_purpose": "Reads the screen and works the tools.","deep_purpose": "Takes the long jobs: coding, planning, research.",- "embedding_purpose": "Turns your notes into something searchable.",- "voice_purpose": "Answers a call. Set in the voice server.",- "voice_absent": "No voice server yet — a call is answered by the chat model.",+ "embedding_purpose": "Indexes your wiki in the background. Picked once, then forgotten.",+ "voice_purpose": "Answers when you talk. A call wants a small, quick model.","empty": "No model yet","not_on_disk": "Set, but not downloaded","no_facts": "Size unknown",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/local_models/es.json b/jarvis/ui/web/frontend/src/i18n/locales/local_models/es.jsonindex 49ce18242c..4098550ced 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/local_models/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/local_models/es.json@@ -4,9 +4,8 @@"chat_purpose": "Responde cuando escribes.","tools_screen_purpose": "Lee la pantalla y maneja las herramientas.","deep_purpose": "Se ocupa de las tareas largas: código, planificación, investigación.",- "embedding_purpose": "Convierte tus notas en algo que se puede buscar.",- "voice_purpose": "Responde en una llamada. Se define en el servidor de voz.",- "voice_absent": "Aún no hay servidor de voz: la llamada la responde el modelo de chat.",+ "embedding_purpose": "Indexa tu wiki en segundo plano. Se elige una vez y se olvida.",+ "voice_purpose": "Responde cuando hablas. Una llamada quiere un modelo pequeño y rápido.","empty": "Aún sin modelo","not_on_disk": "Definido, pero no descargado","no_facts": "Tamaño desconocido",diff --git a/jarvis/ui/web/frontend/src/views/local-models/ModelCard.tsx b/jarvis/ui/web/frontend/src/views/local-models/ModelCard.tsxindex c2eb11e8f4..9cba8e417c 100644--- a/jarvis/ui/web/frontend/src/views/local-models/ModelCard.tsx+++ b/jarvis/ui/web/frontend/src/views/local-models/ModelCard.tsx@@ -47,6 +47,11 @@ export interface ModelCardProps {advanced?: boolean;}+/** Human window size: 16384 -> "16k". */+function contextLabel(numCtx: number): string {+ return numCtx >= 1024 ? `${Math.round(numCtx / 1024)}k` : String(numCtx);+}+/** The capabilities a job is gated on, as one short phrase. */function capabilityLine(row: LocalModelRow | null): string {if (!row || !row.probed) return "";@@ -54,8 +59,10 @@ function capabilityLine(row: LocalModelRow | null): string {}export function cardState(row: RoleRow): ModelCardState {- // A job served by something other than Ollama says so and offers nothing.- if (!row.writable) return "blocked";+ // A job served by something other than Ollama, or whose own server is not+ // installed yet, says so and offers nothing: a picker whose write is going+ // to be refused is worse than a sentence naming what is missing.+ if (!row.writable || (row.note !== "" && row.current === "")) return "blocked";if (!row.current) return "empty";return row.installed ? "ready" : "missing";}@@ -148,15 +155,30 @@ export function ModelCard({</>) : (<p className="text-sm text-muted-foreground">- {row.writable- ? t("local_models.jobs.empty")- : row.note || t("local_models.roles.read_only")}+ {state === "blocked"+ ? row.note || t("local_models.roles.read_only")+ : t("local_models.jobs.empty")}</p>)}</div>+ {/* Speech runs with a window sized for this machine; a call is judged+ by its first word, so that number belongs on the card. */}+ {row.id === "voice" && row.context_tokens ? (+ <p className="mt-1.5 text-[11px] text-muted-foreground" data-testid="voice-context">+ {fill(+ t(+ row.context_source === "manual"+ ? "local_models.roles.voice_context_manual"+ : "local_models.roles.voice_context_auto",+ ),+ { context: contextLabel(row.context_tokens) },+ )}+ </p>+ ) : null}+{/* The memory bar: this model against this machine's graphics memory. */}- {row.writable && (+ {state !== "blocked" && (<div className="mt-2.5" data-testid={`model-card-memory-${row.id}`}><divclassName="h-1.5 overflow-hidden rounded-full bg-sheen/[0.08]"@@ -195,7 +217,7 @@ export function ModelCard({{/* The control. Always present, always the same shape. */}<div className="mt-3.5 space-y-2">- {row.writable ? (+ {state !== "blocked" ? (<RolePickerrow={row}models={models}diff --git a/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.test.tsx b/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.test.tsxindex dfe165d0fe..cbe6ec56e5 100644--- a/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.test.tsx+++ b/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.test.tsx@@ -431,11 +431,12 @@ describe("OverviewPanel grid", () => {);expect(cards.map((c) => c.getAttribute("data-testid"))).toEqual(["model-card-chat",+ "model-card-voice","model-card-tools_screen","model-card-deep",- "model-card-embedding",]);- for (const job of ["chat", "tools_screen", "deep", "embedding"])+ // Every job on the page can be changed, side row included.+ for (const job of ["chat", "voice", "tools_screen", "deep", "embedding"])expect(screen.getByTestId(`role-picker-${job}`)).toBeDefined();});@@ -450,7 +451,7 @@ describe("OverviewPanel grid", () => {await screen.findByTestId("model-card-chat");expect(screen.getByTestId("model-card-chat").dataset.state).toBe("ready");expect(screen.getByTestId("model-card-deep").dataset.state).toBe("missing");- expect(screen.getByTestId("model-card-embedding").dataset.state).toBe(+ expect(screen.getByTestId("model-card-tools_screen").dataset.state).toBe("empty",);expect(screen.getByTestId("model-card-deep").textContent).toContain(@@ -535,15 +536,58 @@ describe("OverviewPanel grid", () => {expect(urls).toContain(`PUT ${BASE}/models/qwen3.8%3A27b/options`);});- it("keeps speech out of the grid and says where it is set", async () => {+ it("gives speech a card of its own, with the window it runs on", async () => {+ installFetchMock({+ roles: ROLES.map((r) =>+ r.id === "voice"+ ? { ...r, context_tokens: 32768, context_source: "automatic" }+ : r,+ ),+ });+ renderPanel();++ const card = await screen.findByTestId("model-card-voice");+ expect(card.textContent).toContain("local_models.jobs.voice_purpose");+ expect(screen.getByTestId("role-picker-voice")).toBeDefined();+ expect(screen.getByTestId("voice-context").textContent).toContain(+ "local_models.roles.voice_context_auto32k",+ );+ });++ it("blocks the card, rather than offering a doomed picker, when a job has no server", async () => {+ installFetchMock({+ roles: ROLES.map((r) =>+ r.id === "voice"+ ? {+ ...r,+ current: "",+ installed: false,+ note: "The managed voice server is not installed.",+ }+ : r,+ ),+ });+ renderPanel();++ const card = await screen.findByTestId("model-card-voice");+ expect(card.dataset.state).toBe("blocked");+ expect(card.textContent).toContain(+ "The managed voice server is not installed.",+ );+ expect(screen.queryByTestId("role-picker-voice")).toBeNull();+ });++ it("keeps embeddings settable in the side row instead of the grid", async () => {installFetchMock();renderPanel();await screen.findByTestId("model-card-chat");- expect(screen.queryByTestId("model-card-voice")).toBeNull();- const voice = await screen.findByTestId("voice-row");- expect(voice.textContent).toContain("local_models.role_voice");- expect(voice.textContent).toContain("local_models.jobs.voice_purpose");+ expect(screen.queryByTestId("model-card-embedding")).toBeNull();+ const side = await screen.findByTestId("side-job-embedding");+ expect(side.textContent).toContain("local_models.role_embedding");+ expect(side.textContent).toContain("local_models.jobs.embedding_purpose");+ // The setting has nowhere else to live, so the row keeps the picker.+ expect(within(side).getByTestId("role-picker-embedding")).toBeDefined();});it("the detail level adds detail, never takes the picker away", async () => {@@ -580,7 +624,7 @@ describe("OverviewPanel launch bar", () => {],accelerator_gb: 16,roles: ROLES.map((r) =>- r.id === "embedding"+ r.id === "voice"? { ...r, current: "qwen3-embedding:4b", installed: true }: r.id === "tools_screen" || r.id === "deep"? { ...r, current: "qwen3.5:4b", installed: true }@@ -590,7 +634,7 @@ describe("OverviewPanel launch bar", () => {renderPanel();const facts = await screen.findByTestId("launch-facts");- // chat + tools + deep share qwen3.5:4b, embedding adds 2 GB -> 5 GB.+ // chat + tools + deep share qwen3.5:4b, voice adds 2 GB -> 5 GB.await waitFor(() =>expect(facts.textContent).toContain("local_models.launch.total_on_disk5.0 GB",@@ -609,10 +653,10 @@ describe("OverviewPanel launch bar", () => {renderPanel();const launch = await screen.findByTestId("server-launch");- // Only chat is set in the fixture: 1 of 4.+ // chat and voice are set in the fixture, tools & deep are not: 2 of 4.await waitFor(() =>expect(launch.textContent).toContain(- "local_models.launch.partly_picked1|4",+ "local_models.launch.partly_picked2|4",),);const button = within(screen.getByTestId("launch-run")).getByRole("button");diff --git a/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.tsx b/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.tsxindex ae12a1cec7..bb0ae223bc 100644--- a/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.tsx+++ b/jarvis/ui/web/frontend/src/views/local-models/OverviewPanel.tsx@@ -2,13 +2,16 @@* Local models, front page: a grid of jobs, then the server that runs them.** The page answers one question — "which model does what on my machine" —- * and it answers it the way the machine is actually shaped. Chat, tools &- * screen, deep & coding and embeddings are four PEERS, not four steps: you- * can fill them in any order, and a number beside each would claim a- * sequence that does not exist. So they are a grid of equal cards- * (`ModelCard`), each carrying its own model, its own memory bar and its own- * picker. Speech sits below them, on its own, because it is the one job- * served by a different server and cannot be filled from here.+ * and it answers it the way the machine is actually shaped. Chat, speech,+ * tools & screen and deep & coding are four PEERS, not four steps: you can+ * fill them in any order, and a number beside each would claim a sequence+ * that does not exist. So they are a grid of equal cards (`ModelCard`), each+ * carrying its own model, its own memory bar and its own picker.+ *+ * All four answer the user directly, which is what earns a card. Embeddings+ * does not — it indexes the wiki in the background, is picked once and then+ * forgotten — so it keeps its picker in the side row below instead of taking+ * a quarter of the page.** Under the grid, `ServerLaunch` adds up what the picks cost and offers the* one button that puts a working server behind them.@@ -27,6 +30,7 @@ import { SoftButton, StatusDot } from "@/components/extensions/primitives";import {useOverview,type LocalModelRole,+ type LocalModelRow,type RoleRow,} from "@/hooks/useLocalModels";import { switchBrainProvider, useProviders } from "@/hooks/useProviders";@@ -41,6 +45,7 @@ import { InstalledPanel } from "./InstalledPanel";import { canonical } from "./localSetup";import type { SetupStep, SetupSummary } from "./localSetup";import { ModelCard } from "./ModelCard";+import { RolePicker } from "./RolePicker";import { ServerLaunch } from "./ServerLaunch";import { useLocalSetup } from "./useLocalSetup";import { useRoleActions, IDLE } from "./useRoleActions";@@ -62,17 +67,24 @@ export interface OverviewPanelProps {}/**- * The jobs the grid shows, in reading order. Four, because these are the- * four a local server can fill on its own — speech needs the managed voice- * server and is handled apart, and `ack`/`polish` follow other cards.+ * The jobs the grid shows, in the order you meet them: type, talk, let it+ * work the screen, hand it something long.+ *+ * All four answer YOU. Embeddings does not — it indexes the wiki in the+ * background, is picked once and then forgotten — so it sits in the side row+ * below with its own picker rather than taking a quarter of the page.+ * `ack`/`polish` follow other cards and are read-only.*/export const GRID_JOBS: readonly LocalModelRole[] = ["chat",+ "voice","tools_screen","deep",- "embedding",];+/** The jobs below the grid: set here too, just not part of the conversation. */+export const SIDE_JOBS: readonly LocalModelRole[] = ["embedding"];+/** Bytes to a short gigabyte figure ("12.4 GB"); "0 GB" below a megabyte. */export function formatGigabytes(bytes: number): string {const gb = bytes / 1024 ** 3;@@ -124,10 +136,13 @@ export function OverviewPanel({() => GRID_JOBS.map((id) => byId.get(id)).filter((r): r is RoleRow => !!r),[byId],);- const voiceRow = byId.get("voice") ?? null;- // Speech has its own row above; whatever else is advanced follows another- // card's pick and belongs in the quiet list at the bottom.- const followerRows = allRows.filter((r) => r.advanced && r.id !== "voice");+ const sideRows = useMemo(+ () => SIDE_JOBS.map((id) => byId.get(id)).filter((r): r is RoleRow => !!r),+ [byId],+ );+ // Whatever is advanced follows another card's pick and belongs in the quiet+ // list at the bottom.+ const followerRows = allRows.filter((r) => r.advanced);const serverLabel =providers.find((p) => p.id === providerId)?.label ||@@ -223,14 +238,18 @@ export function OverviewPanel({<p className="text-sm text-destructive">{actions.writeError}</p>)}- {/* Speech: its own row, because it is served by its own server. */}- {voiceRow && (- <VoiceRow- row={voiceRow}+ {/* Set here, but not part of the conversation. */}+ {sideRows.map((row) => (+ <SideJobRow+ key={row.id}+ row={row}+ models={models}+ busy={actions.isBusy(row.id)}+ onPick={(model) => actions.pick(row.id, model)}onTune={advanced ? onTune : undefined}t={t}/>- )}+ ))}<ServerLaunchrows={gridRows}@@ -283,55 +302,63 @@ function CardSkeleton() {}/**- * Speech. Read-only from here: the model is baked into the voice server's- * launch command, so the row says what answers a call and where to change it- * rather than offering a picker that would fail.+ * A job that is set here but is not part of the conversation — today just+ * embeddings, which indexes the wiki in the background.+ *+ * One line, not a card: it carries the same picker (dropping it would take a+ * setting away with nowhere else to reach it) but none of the card's weight,+ * because it is picked once and then forgotten.*/-function VoiceRow({+function SideJobRow({row,+ models,+ busy,+ onPick,onTune,t,}: {row: RoleRow;+ models: LocalModelRow[];+ busy: boolean;+ onPick: (model: string) => void;onTune?: (model: string) => void;t: (key: string) => string;}) {const missing = row.current !== "" && !row.installed;+ const blocked = !row.writable || (row.note !== "" && row.current === "");return (<div- className="flex flex-wrap items-center justify-between gap-x-4 gap-y-2 rounded-xl border border-border/70 bg-card/40 px-4 py-3"- data-testid="voice-row"+ className="grid gap-3 rounded-xl border border-border/70 bg-card/40 px-4 py-3 lg:grid-cols-[minmax(0,1fr)_minmax(0,20rem)_auto] lg:items-center"+ data-testid={`side-job-${row.id}`}><div className="min-w-0"><p className="text-[11px] font-medium uppercase tracking-[0.18em] text-muted-foreground">{t(row.label_key)}</p>- <div className="mt-1">- {row.current ? (- <StatusDot- tone={missing ? "warn" : "ok"}- label={- <span className="font-mono text-xs text-foreground/85">- {row.current}- {missing && (- <span className="ml-2 font-sans text-muted-foreground">- {t("local_models.roles.not_installed")}- </span>- )}- </span>- }- />- ) : (- <span className="text-sm text-muted-foreground">- {row.note || t("local_models.jobs.voice_absent")}- </span>- )}- </div>- </div>- <div className="flex items-center gap-3">- <p className="text-xs text-muted-foreground">- {t("local_models.jobs.voice_purpose")}+ <p className="mt-0.5 text-xs text-muted-foreground">+ {row.note || t(`local_models.jobs.${row.id}_purpose`)}</p>+ </div>+ <div className="min-w-0">+ {blocked ? (+ <span className="text-xs text-muted-foreground">+ {t("local_models.roles.read_only")}+ </span>+ ) : (+ <RolePicker+ row={row}+ models={models}+ disabled={busy}+ onPick={onPick}+ />+ )}+ </div>+ <div className="flex items-center gap-2 lg:justify-end">+ {missing && (+ <span className="text-xs text-amber-700 dark:text-amber-400">+ {t("local_models.jobs.not_on_disk")}+ </span>+ )}{onTune && row.current && row.installed && (<SoftButton onClick={() => onTune(row.current)} className="h-8">{t("local_models.roles.tune")}