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): replace native selects with the branded dropdown and fix stale frontend tests
rubenluetke10-beepc4775581ecda
diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsxindex 67b95dfa5b..e3f97c5117 100644--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticGrid.test.tsx@@ -36,7 +36,8 @@ const pushToast = vi.fn();vi.mock("@/store/events", () => {// Built on each call, never at factory time: this factory is hoisted above// the `const pushToast` above it, so reading it eagerly is a TDZ error.- const state = () => ({ pushToast, assistantName: "Jarvis" });+ // `events` too: the chat composer's appshot claim scans the event feed.+ const state = () => ({ pushToast, assistantName: "Jarvis", events: [] });const useEventStore = (selector: (s: Record<string, unknown>) => unknown) =>selector(state());useEventStore.getState = state;diff --git a/jarvis/ui/web/frontend/src/components/agentic/git/GitCheckoutPicker.tsx b/jarvis/ui/web/frontend/src/components/agentic/git/GitCheckoutPicker.tsxindex d06ecfbe0e..14ad67fb42 100644--- a/jarvis/ui/web/frontend/src/components/agentic/git/GitCheckoutPicker.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/git/GitCheckoutPicker.tsx@@ -1,6 +1,7 @@import { useEffect, useMemo, useState } from "react";import { ChevronDown, Dices, FolderGit2, FolderTree, GitBranch, GitBranchPlus, GitFork, Loader2, Sparkles } from "lucide-react";import { cn } from "@/lib/utils";+import { BrandedSelect } from "@/components/ui/select";import { folderName, inspectGit, type GitPlan, type GitPrepareMode, type GitRepoInfo } from "@/lib/gitApi";import { GitStatusLine } from "./GitStatusLine";@@ -177,12 +178,11 @@ export function GitCheckoutPicker({ folder, value, onChange, disabled, context,className="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50"><Dices className="h-4 w-4" /></button></span></label>- <label className="block text-xs text-muted-foreground">Based on- <select value={value.base} disabled={disabled || info.unborn} aria-label="Base branch"- onChange={(event) => onChange({ ...value, base: event.target.value })} className={cn(field, "mt-1")}>- {bases.map((name) => <option key={name} value={name}>{name}{name === info.branch ? " (current)" : name === info.default_branch ? " (default)" : ""}</option>)}- </select>- </label>+ <div className="block text-xs text-muted-foreground"><span>Based on</span>+ <BrandedSelect value={value.base} disabled={disabled || info.unborn} ariaLabel="Base branch"+ onValueChange={(base) => onChange({ ...value, base })} className="mt-1 h-9"+ options={bases.map((name) => ({ value: name, label: name, hint: name === info.branch ? "current" : name === info.default_branch ? "default" : undefined }))} />+ </div><p className="text-xs text-muted-foreground sm:col-span-2">{info.unborn ? "This repository has no commit yet — make a first commit before branching.": value.mode === "new_worktree" ? <>Creates <span className="font-mono text-foreground">{preview}</span>. Only committed work is copied; an existing branch is reused.</>@@ -190,19 +190,17 @@ export function GitCheckoutPicker({ folder, value, onChange, disabled, context,</p></div>}- {info?.is_repo && value.mode === "switch_branch" && <label className="block text-xs text-muted-foreground">Branch- <select value={value.branch} disabled={disabled} aria-label="Existing branch" onChange={(event) => onChange({ ...value, branch: event.target.value })} className={cn(field, "mt-1")}>- {switchable.map((branch) => <option key={branch.name} value={branch.name}>{branch.name}</option>)}- </select>- </label>}-- {info?.is_repo && value.mode === "open_worktree" && <label className="block text-xs text-muted-foreground">Worktree- <select value={value.base} disabled={disabled} aria-label="Existing worktree"- onChange={(event) => { const tree = linked.find((entry) => entry.path === event.target.value); onChange({ ...value, base: event.target.value, branch: tree?.branch ?? "" }); }}- className={cn(field, "mt-1")}>- {linked.map((tree) => <option key={tree.path} value={tree.path}>{folderName(tree.path)} · {tree.branch || "detached"}</option>)}- </select>- </label>}+ {info?.is_repo && value.mode === "switch_branch" && <div className="block text-xs text-muted-foreground"><span>Branch</span>+ <BrandedSelect value={value.branch} disabled={disabled} ariaLabel="Existing branch" onValueChange={(branch) => onChange({ ...value, branch })} className="mt-1 h-9"+ options={switchable.map((branch) => ({ value: branch.name, label: branch.name }))} />+ </div>}++ {info?.is_repo && value.mode === "open_worktree" && <div className="block text-xs text-muted-foreground"><span>Worktree</span>+ <BrandedSelect value={value.base} disabled={disabled} ariaLabel="Existing worktree"+ onValueChange={(path) => { const tree = linked.find((entry) => entry.path === path); onChange({ ...value, base: path, branch: tree?.branch ?? "" }); }}+ className="mt-1 h-9"+ options={linked.map((tree) => ({ value: tree.path, label: folderName(tree.path), hint: tree.branch || "detached", searchText: tree.path }))} />+ </div>}{value.mode === "init" && <p className="text-xs text-muted-foreground">Creates a repository on <span className="font-mono">main</span> with an empty first commit. Your files are not committed — you decide what goes in.</p>}</section>;diff --git a/jarvis/ui/web/frontend/src/components/society/office/MissionControlPanel.tsx b/jarvis/ui/web/frontend/src/components/society/office/MissionControlPanel.tsxindex 73c116c1f4..16265f31ec 100644--- a/jarvis/ui/web/frontend/src/components/society/office/MissionControlPanel.tsx+++ b/jarvis/ui/web/frontend/src/components/society/office/MissionControlPanel.tsx@@ -19,6 +19,7 @@ import {import { useEventStore } from "@/store/events";import { useWorkspacePanesStore } from "@/store/workspacePanes";import { AgentMark } from "@/components/agentic/AgentMark";+import { BrandedSelect } from "@/components/ui/select";import { paneOccupants, type PaneOccupant } from "./codingFloor";import "./missionControl.css";@@ -158,12 +159,12 @@ function StartAgent() {)}{workspaces.length > 1 && (- <label className="office-mc-row">+ <div className="office-mc-row"><span>{t("society.office.mission_workspace")}</span>- <select value={workspaceId} onChange={(e) => setWorkspaceId(e.target.value)} disabled={running}>- {workspaces.map((w) => <option key={w.id} value={w.id}>{w.name}{w.branch ? ` · ${w.branch}` : ""}</option>)}- </select>- </label>+ <BrandedSelect value={workspaceId} onValueChange={setWorkspaceId} disabled={running}+ ariaLabel={t("society.office.mission_workspace")} className="office-mc-select px-2 py-1.5 text-xs"+ options={workspaces.map((w) => ({ value: w.id, label: w.name, hint: w.branch || undefined }))} />+ </div>)}<textarea className="office-mc-task" rows={3} value={task} maxLength={8000} disabled={running}diff --git a/jarvis/ui/web/frontend/src/components/society/office/missionControl.css b/jarvis/ui/web/frontend/src/components/society/office/missionControl.cssindex e3324521f4..5503dfef7c 100644--- a/jarvis/ui/web/frontend/src/components/society/office/missionControl.css+++ b/jarvis/ui/web/frontend/src/components/society/office/missionControl.css@@ -38,7 +38,7 @@.office-mc-agents button:disabled { opacity:.5; cursor:not-allowed; }.office-mc-row { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12px; color:hsl(var(--muted-foreground)); }-.office-mc-row select { flex:0 1 60%; min-width:0; padding:6px 8px; border:1px solid hsl(var(--border)); border-radius:8px; background:hsl(var(--background)); color:hsl(var(--foreground)); font:inherit; font-size:12px; }+.office-mc-row .office-mc-select { flex:0 1 60%; width:auto; min-width:0; }.office-mc-task { width:100%; min-height:44px; resize:vertical; padding:9px 10px; border:1px solid hsl(var(--border)); border-radius:10px; background:hsl(var(--background)); color:hsl(var(--foreground)); font:inherit; font-size:13px; line-height:1.4; }.office-mc-task::placeholder { color:hsl(var(--muted-foreground)); }diff --git a/jarvis/ui/web/frontend/src/components/society/world/conversation.test.ts b/jarvis/ui/web/frontend/src/components/society/world/conversation.test.tsindex c3841e0083..07dfa2fd9c 100644--- a/jarvis/ui/web/frontend/src/components/society/world/conversation.test.ts+++ b/jarvis/ui/web/frontend/src/components/society/world/conversation.test.ts@@ -238,7 +238,7 @@ describe("the drift guard", () => {it("covers every talking type and both room brackets", () => {expect(new Set(WORLD_MSG_TYPES)).toEqual(- new Set(["SAY", "QUERY", "ANSWER", "PROPOSE", "ROOM_OPEN", "ROOM_SETTLE"]),+ new Set(["SAY", "QUERY", "ANSWER", "PROPOSE", "ASSIGN", "ROOM_OPEN", "ROOM_SETTLE"]),);});});diff --git a/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsx b/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsxindex 87c179a933..53881cc137 100644--- a/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsx@@ -87,6 +87,8 @@ describe("Agentic IDE project flow", () => {await screen.findByText("Choose a workspace");act(() => useIdeProjectsStore.getState().newWorkspace("p1"));const dialog = await screen.findByRole("dialog", { name: "New workspace" });+ // Keeping the checkout is the default, so the git choices sit folded behind one summary line.+ fireEvent.click(await within(dialog).findByRole("button", { name: /Git options/ }));fireEvent.click(await within(dialog).findByRole("radio", { name: /New worktree/ }));expect((within(dialog).getByLabelText("Branch name") as HTMLInputElement).value).toBe("agent/brave-river-0001");fireEvent.click(screen.getByRole("button", { name: "Create workspace" }));@@ -158,9 +160,12 @@ describe("Agentic IDE project flow", () => {fireEvent.click(await screen.findByRole("button", { name: "Pane add" }));const dialog = screen.getByRole("dialog", { name: "Add coding agent" });// Still the automatic grid, so that is what the dialog offers first.- expect((within(dialog).getByRole("combobox", { name: "Split next to" }) as HTMLSelectElement).value).toBe("");+ const anchor = within(dialog).getByRole("combobox", { name: "Split next to" });+ expect(anchor.getAttribute("data-value")).toBe("");expect(within(dialog).queryByRole("radio", { name: "Split left" })).toBeNull();- fireEvent.change(within(dialog).getByRole("combobox", { name: "Split next to" }), { target: { value: "T2" } });+ fireEvent.click(anchor);+ fireEvent.click(await within(dialog).findByRole("option", { name: "T2 · Codex" }));+ expect(anchor.getAttribute("data-value")).toBe("T2");fireEvent.click(within(dialog).getByRole("radio", { name: "Split left" }));fireEvent.click(within(dialog).getByRole("button", { name: "Codex" }));await waitFor(() => expect(api.addTerminal).toHaveBeenCalledWith({ workspace_id: "w1", agent: "codex", anchor: "T2", direction: "left" }));diff --git a/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx b/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsxindex 52d3569f12..66770bb4cb 100644--- a/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx+++ b/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx@@ -17,6 +17,7 @@ import { KEEP_CHECKOUT, prepareGit, type GitPlan } from "@/lib/gitApi";import { SplitRightIcon, SplitBelowIcon, SplitLeftIcon, SplitAboveIcon } from "@/components/agentic/splitIcons";import type { PaneSplitDirection } from "@/components/agentic/WorkspaceTerminalHeader";import { cn } from "@/lib/utils";+import { BrandedSelect } from "@/components/ui/select";import { useEventStore } from "@/store/events";import { useIdeChatStore } from "@/store/ideChat";import { useIdeProjectsStore } from "@/store/ideProjects";@@ -444,7 +445,7 @@ export function AgenticIdeView({ onScreen = true }: AgenticIdeViewProps) {<main className="min-h-0 flex-1"><IdeSidePanelFrame>- {session ? <WorkspaceTerminalGrid key={session.id} session={session} onChanged={(next) => setState((current) => current?.session?.id === next.id ? { ...current, session: next } : current)}+ {session ?<WorkspaceTerminalGrid key={session.id} session={session} onChanged={(next) => setState((current) => current?.session?.id === next.id ? { ...current, session: next } : current)}onAdd={openAgentPicker} onClose={closeAgent} onSelect={setSelected} selected={selected} maxPanes={maxPanes} fontSize={fontSize} appearance={appearance} disabled={busy}onMutationStart={beginGridMutation} onMutationEnd={endGridMutation} />: <div className="flex h-full flex-col items-center justify-center gap-3 px-6 text-center">@@ -474,14 +475,15 @@ export function AgenticIdeView({ onScreen = true }: AgenticIdeViewProps) {return <div className="mb-4 space-y-2.5 rounded-xl border border-border bg-muted/40 p-3"><div className="flex flex-wrap items-center justify-between gap-2"><span className="text-xs font-medium text-foreground">Where should it open?</span>- <label className="flex items-center gap-1.5 text-xs text-muted-foreground">- Next to- <select aria-label="Split next to" value={splitAnchor} disabled={busy} onChange={(event) => setSplitAnchor(event.target.value)}- className="h-7 rounded-md border border-input bg-background px-2 text-xs font-medium text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">- {session.terminals.map((terminal) => <option key={terminal.name} value={terminal.name}>{terminal.name} · {terminal.display_name}</option>)}- <option value="">Automatic even grid</option>- </select>- </label>+ <div className="flex items-center gap-1.5 text-xs text-muted-foreground">+ <span>Next to</span>+ <BrandedSelect ariaLabel="Split next to" value={splitAnchor} disabled={busy} onValueChange={setSplitAnchor}+ className="h-7 w-auto min-w-[11rem] px-2 py-1 text-xs font-medium"+ options={[+ ...session.terminals.map((terminal) => ({ value: terminal.name, label: `${terminal.name} · ${terminal.display_name}` })),+ { value: "", label: "Automatic even grid" },+ ]} />+ </div></div>{anchorTerminal ? <div className="grid grid-cols-4 gap-2" role="radiogroup" aria-label="Split direction">{SPLIT_DIRECTIONS.map((item) => {diff --git a/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsx b/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsxindex a23520842e..9c810dcdf1 100644--- a/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsx+++ b/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsx@@ -99,7 +99,7 @@ describe("ApiKeysView two-mode", () => {expect(screen.queryByRole("tab", { name: /tool model/i })).toBeNull();fireEvent.click(screen.getByRole("button", { name: /^realtime/i }));expect(screen.queryByRole("tab", { name: /tool model/i })).toBeNull();- expect(screen.getByText(/Text chat and background tasks use your selection in Agents/)).toBeTruthy();+ expect(screen.getByText(/Chat, memory and all background work run on the provider you choose under Agents/)).toBeTruthy();});it("defaults to Pipeline mode showing Brain/Voice/Subagents tabs, no Realtime tab", () => {diff --git a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.test.tsx b/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.test.tsxindex 59181b786f..58f18bec90 100644--- a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.test.tsx+++ b/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.test.tsx@@ -40,6 +40,21 @@ function mockPut(ms: number) {});}+/**+ * The slider renders at once — disabled, at the automatic default — and adopts+ * the fetched value when the GET resolves. A test that drags it before then+ * acts on the disabled pre-load control, and the late GET overwrites the drag.+ * Wait until the fetched value is showing and the control is enabled.+ */+async function loadedSlider(expectedMs: number): Promise<HTMLInputElement> {+ const slider = (await screen.findByRole("slider")) as HTMLInputElement;+ await waitFor(() => {+ expect(slider.value).toBe(String(expectedMs));+ expect(slider.disabled).toBe(false);+ });+ return slider;+}+describe("SilenceWindowGroup", () => {it("renders the slider at the fetched value", async () => {mockGet(1500);@@ -59,7 +74,7 @@ describe("SilenceWindowGroup", () => {// so the slider must not imply a 0.0 s window (maintainer 2026-08-23).mockGet(0);render(<SilenceWindowGroup />);- const slider = (await screen.findByRole("slider")) as HTMLInputElement;+ const slider = await loadedSlider(0);expect(slider.value).toBe("0");expect(screen.queryByText("0.0 s")).toBeNull();// The word appears in the value badge and again in the caption below it.@@ -70,7 +85,7 @@ describe("SilenceWindowGroup", () => {mockGet(1500);mockPut(2500);render(<SilenceWindowGroup />);- const slider = (await screen.findByRole("slider")) as HTMLInputElement;+ const slider = await loadedSlider(1500);// drag (onChange) updates the label but does not PUT yetfireEvent.change(slider, { target: { value: "2500" } });expect(fetchMock).toHaveBeenCalledTimes(1); // only the GET so far@@ -89,7 +104,7 @@ describe("SilenceWindowGroup", () => {mockGet(1500);mockPut(500);render(<SilenceWindowGroup />);- const slider = (await screen.findByRole("slider")) as HTMLInputElement;+ const slider = await loadedSlider(1500);fireEvent.change(slider, { target: { value: "100" } });expect(slider.value).toBe("0"); // nearer to automaticfireEvent.change(slider, { target: { value: "400" } });@@ -103,7 +118,7 @@ describe("SilenceWindowGroup", () => {mockGet(3000);mockPut(0);render(<SilenceWindowGroup />);- await screen.findByRole("slider");+ await loadedSlider(3000);fireEvent.click(screen.getByRole("button", { name: /reset|zurück|restablecer/i })); // i18n-allow: multilingual button-name regexawait waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(2));expect(JSON.parse(fetchMock.mock.calls[1][1].body)).toMatchObject({ ms: 0 });