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
refactor(settings): remove the thinking-pause row from General
rubenluetke10-beep7db18c5813c2
diff --git a/jarvis/ui/web/frontend/src/hooks/useSilenceWindow.ts b/jarvis/ui/web/frontend/src/hooks/useSilenceWindow.tsdeleted file mode 100644index cd12a999d2..0000000000--- a/jarvis/ui/web/frontend/src/hooks/useSilenceWindow.ts+++ /dev/null@@ -1,68 +0,0 @@-import { useCallback, useEffect, useState } from "react";--/** Voice silence window (the "think buffer") from GET /api/settings/silence-window. */-export interface SilenceWindowConfig {- ms: number;- default: number;- /** 0 — the automatic setting, where every voice mode keeps its factory timing. */- min: number;- max: number;- /** Lowest value that is a real window rather than "automatic". */- manual_min: number;- /** True while the current value IS the automatic setting. */- automatic: boolean;-}--export interface SilenceWindowSaveResult {- ok: boolean;- ms: number;- default: number;- manual_min: number;- automatic: boolean;- persisted: boolean;- applied_live: boolean;- restart_required: boolean;-}--/** Loads /api/settings/silence-window and exposes setMs(). Mirrors useAutostart. */-export function useSilenceWindow() {- const [config, setConfig] = useState<SilenceWindowConfig | null>(null);- const [loading, setLoading] = useState(true);- const [error, setError] = useState<string | null>(null);-- const refetch = useCallback(async () => {- setError(null);- try {- const res = await fetch("/api/settings/silence-window");- if (!res.ok) throw new Error(`HTTP ${res.status}`);- const data: SilenceWindowConfig = await res.json();- setConfig(data);- } catch (e) {- setError((e as Error).message);- } finally {- setLoading(false);- }- }, []);-- useEffect(() => {- void refetch();- }, [refetch]);-- const setMs = useCallback(- async (ms: number): Promise<SilenceWindowSaveResult> => {- const res = await fetch("/api/settings/silence-window", {- method: "PUT",- headers: { "Content-Type": "application/json" },- body: JSON.stringify({ ms, persist: true }),- });- const body = await res.json().catch(() => ({}));- if (!res.ok) throw new Error(body.detail ?? `HTTP ${res.status}`);- const result = body as SilenceWindowSaveResult;- setConfig((prev) => (prev ? { ...prev, ms: result.ms } : prev));- return result;- },- [],- );-- return { config, loading, error, refetch, setMs };-}diff --git a/jarvis/ui/web/frontend/src/hooks/useTtsVolume.ts b/jarvis/ui/web/frontend/src/hooks/useTtsVolume.tsindex 7bd193cb2f..ac7a3b2059 100644--- a/jarvis/ui/web/frontend/src/hooks/useTtsVolume.ts+++ b/jarvis/ui/web/frontend/src/hooks/useTtsVolume.ts@@ -3,7 +3,7 @@ import { useCallback, useEffect, useState } from "react";/*** Master TTS output volume (how loudly Jarvis speaks) from* GET /api/settings/tts-volume. The value is a 0.0–1.0 amplitude gain- * (1.0 = full); the UI renders it as a 0–100% slider. Mirrors useSilenceWindow.+ * (1.0 = full); the UI renders it as a 0–100% slider. Mirrors useAutostart.*/export interface TtsVolumeConfig {volume: number;diff --git a/jarvis/ui/web/frontend/src/views/SettingsView.tsx b/jarvis/ui/web/frontend/src/views/SettingsView.tsxindex fae6d6028c..b182bc030a 100644--- a/jarvis/ui/web/frontend/src/views/SettingsView.tsx+++ b/jarvis/ui/web/frontend/src/views/SettingsView.tsx@@ -8,7 +8,6 @@ import { MusicGroup } from "@/views/settings/MusicGroup";import { AppSettingsGroup } from "@/views/settings/AppSettingsGroup";import { PermissionsPanel } from "@/views/settings/PermissionsPanel";import { RealtimeVoiceGroup } from "@/views/settings/RealtimeVoiceGroup";-import { SilenceWindowGroup } from "@/views/settings/SilenceWindowGroup";import { VolumeGroup } from "@/views/settings/VolumeGroup";import { AudioDevicesGroup } from "@/views/settings/AudioDevicesGroup";import { SystemPromptGroup } from "@/views/settings/SystemPromptGroup";@@ -113,9 +112,6 @@ function VoiceSettingsGroup() {<SettingsGroupBoundary group="realtime-voice" inline><RealtimeVoiceGroup /></SettingsGroupBoundary>- <SettingsGroupBoundary group="silence-window" inline>- <SilenceWindowGroup />- </SettingsGroupBoundary><SettingsGroupBoundary group="volume" inline><VolumeGroup /></SettingsGroupBoundary>diff --git a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.test.tsx b/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.test.tsxdeleted file mode 100644index 59181b786f..0000000000--- a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.test.tsx+++ /dev/null@@ -1,111 +0,0 @@-import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";-import { render, screen, fireEvent, waitFor } from "@testing-library/react";-import { SilenceWindowGroup } from "./SilenceWindowGroup";--const fetchMock = vi.fn();--beforeEach(() => {- fetchMock.mockReset();- vi.stubGlobal("fetch", fetchMock);-});-afterEach(() => vi.unstubAllGlobals());--function mockGet(ms = 0) {- fetchMock.mockResolvedValueOnce({- ok: true,- json: async () => ({- ms,- default: 0,- min: 0,- max: 5000,- manual_min: 500,- automatic: ms === 0,- }),- });-}--function mockPut(ms: number) {- fetchMock.mockResolvedValueOnce({- ok: true,- json: async () => ({- ok: true,- ms,- default: 0,- manual_min: 500,- automatic: ms === 0,- persisted: true,- applied_live: true,- restart_required: false,- }),- });-}--describe("SilenceWindowGroup", () => {- it("renders the slider at the fetched value", async () => {- mockGet(1500);- render(<SilenceWindowGroup />);- const slider = (await screen.findByRole("slider")) as HTMLInputElement;- // Wait on the VALUE, not just the element. The group renders its slider at- // once and adopts the fetched value when the request resolves, so asserting- // straight after findByRole is a race the element always wins: it read 0 on- // a loaded CI runner while passing every time on a fast machine.- await waitFor(() => expect(slider.value).toBe("1500"));- // getByText throws if absent, so reaching the truthy assert means it rendered.- expect(screen.getByText("1.5 s")).toBeTruthy();- });-- it("labels the default as automatic rather than a duration", async () => {- // 0 is the shipped default: every voice engine keeps its factory timing,- // 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;- 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.- expect(screen.getAllByText(/automat/i).length).toBeGreaterThan(0); // i18n-allow: multilingual label stem- });-- it("sends one PUT on commit, not per tick", async () => {- mockGet(1500);- mockPut(2500);- render(<SilenceWindowGroup />);- const slider = (await screen.findByRole("slider")) as HTMLInputElement;- // drag (onChange) updates the label but does not PUT yet- fireEvent.change(slider, { target: { value: "2500" } });- expect(fetchMock).toHaveBeenCalledTimes(1); // only the GET so far- // release (commit) fires the PUT- fireEvent.mouseUp(slider);- await waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(2));- const putCall = fetchMock.mock.calls[1];- expect(putCall[0]).toBe("/api/settings/silence-window");- expect(JSON.parse(putCall[1].body)).toMatchObject({ ms: 2500 });- });-- it("snaps the dead gap below the floor to the nearer end", async () => {- // Between automatic (0) and the lowest real window (500) there is nothing- // valid, so a drag through the gap must land on one side or the other —- // never on a value the backend would have to correct behind the user.- mockGet(1500);- mockPut(500);- render(<SilenceWindowGroup />);- const slider = (await screen.findByRole("slider")) as HTMLInputElement;- fireEvent.change(slider, { target: { value: "100" } });- expect(slider.value).toBe("0"); // nearer to automatic- fireEvent.change(slider, { target: { value: "400" } });- expect(slider.value).toBe("500"); // nearer to the floor- fireEvent.mouseUp(slider);- await waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(2));- expect(JSON.parse(fetchMock.mock.calls[1][1].body)).toMatchObject({ ms: 500 });- });-- it("reset commits the automatic default", async () => {- mockGet(3000);- mockPut(0);- render(<SilenceWindowGroup />);- await screen.findByRole("slider");- fireEvent.click(screen.getByRole("button", { name: /reset|zurück|restablecer/i })); // i18n-allow: multilingual button-name regex- await waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(2));- expect(JSON.parse(fetchMock.mock.calls[1][1].body)).toMatchObject({ ms: 0 });- });-});diff --git a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.tsx b/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.tsxdeleted file mode 100644index 1c6e4ba760..0000000000--- a/jarvis/ui/web/frontend/src/views/settings/SilenceWindowGroup.tsx+++ /dev/null@@ -1,138 +0,0 @@-import { useEffect, useRef, useState } from "react";-import { useSilenceWindow } from "@/hooks/useSilenceWindow";-import { useEventStore } from "@/store/events";-import { useT } from "@/i18n";-import {- SettingsLinkButton,- SettingsRow,- SettingsValue,- settingsRangeCls,-} from "@/views/settings/SettingsLayout";--/** The automatic setting: every voice mode keeps its own factory timing. */-const AUTOMATIC_MS = 0;-/** Fallback for the lowest REAL window, until the GET brings the server's own. */-const MANUAL_MIN_FALLBACK_MS = 500;--/**- * "Thinking pause" slider inside the Settings view. Tunes how long Jarvis- * waits in silence before it takes the user's turn — ONE value for both voice- * engines (maintainer directive 2026-08-18; the pipeline-only scope of- * 2026-07-21 is history).- *- * The slider starts at AUTOMATIC (0, the default): no override is sent- * anywhere, so the classic pipeline uses its 1.5 s rule and a realtime- * provider ends the turn on its own factory timing — the shortest pause there- * is, and the one a caller gets from the vendor's own client (maintainer- * 2026-08-23). Above that the range is 0.5–5.0 s in 0.1 s steps; the dead gap- * between automatic and the floor snaps to whichever side is nearer, so a drag- * can always reach both. The label tracks the slider live; the PUT fires on- * release (pointer/key up) so a 0.1 s-step drag does not storm the backend.- * The change persists to jarvis.toml and applies live to the classic pipeline;- * a realtime session reads it when it opens, so there it lands on the next- * call. A headless host falls back to "applies on next start".- */-export function SilenceWindowGroup() {- const t = useT();- const { config, loading, setMs } = useSilenceWindow();- const pushToast = useEventStore((s) => s.pushToast);-- // Local slider value (ms). Mirrors the server value once GET resolves; the- // label follows it instantly on drag while the PUT waits for commit.- const [ms, setLocalMs] = useState(AUTOMATIC_MS);- const [saving, setSaving] = useState(false);- // The last value we actually committed — guards against an idle mouseUp (no- // drag) firing a redundant PUT.- const committedRef = useRef(AUTOMATIC_MS);-- useEffect(() => {- if (config) {- setLocalMs(config.ms);- committedRef.current = config.ms;- }- }, [config]);-- const manualMin = config?.manual_min ?? MANUAL_MIN_FALLBACK_MS;- const defaultMs = config?.default ?? AUTOMATIC_MS;- const isAutomatic = ms <= AUTOMATIC_MS;-- /** Snap the dead gap below the floor to the nearer end so both stay reachable. */- function snap(raw: number): number {- if (raw >= manualMin) return raw;- return raw > manualMin / 2 ? manualMin : AUTOMATIC_MS;- }-- /** The slider's own wording for a value: "Automatic", or seconds. */- function describe(value: number): string {- return value <= AUTOMATIC_MS- ? t("settings_view.silence_window.automatic_label")- : `${(value / 1000).toFixed(1)} ${t("settings_view.silence_window.unit_seconds")}`;- }-- async function commit(next: number) {- if (next === committedRef.current) return; // no change → no PUT- committedRef.current = next;- setSaving(true);- try {- const res = await setMs(next);- pushToast(- "success",- res.ms <= AUTOMATIC_MS- ? t("settings_view.silence_window.saved_toast_automatic")- : t("settings_view.silence_window.saved_toast").replace("{0}", describe(res.ms)),- );- if (res.restart_required) {- pushToast("warning", t("settings_view.silence_window.restart_caption"));- }- } catch (e) {- pushToast("error", (e as Error).message);- // Revert the local value to the last known-good so the UI does not lie.- setLocalMs(committedRef.current);- } finally {- setSaving(false);- }- }-- function onReset() {- setLocalMs(defaultMs);- void commit(defaultMs);- }-- const showReset = ms !== defaultMs;-- return (- <SettingsRow- id="settings-silence-window"- title={t("settings_view.silence_window.title")}- description={t("settings_view.silence_window.description")}- control={<SettingsValue>{describe(ms)}</SettingsValue>}- >- <input- type="range"- aria-label={t("settings_view.silence_window.title")}- min={config?.min ?? AUTOMATIC_MS}- max={config?.max ?? 5000}- step={100}- value={ms}- disabled={loading || saving}- onChange={(e) => setLocalMs(snap(Number(e.target.value)))}- onMouseUp={() => void commit(ms)}- onKeyUp={() => void commit(ms)}- onTouchEnd={() => void commit(ms)}- className={settingsRangeCls}- />- {(isAutomatic || showReset) && (- <div className="flex flex-wrap items-center justify-between gap-3">- <p className="text-sm text-muted-foreground">- {isAutomatic ? t("settings_view.silence_window.automatic_caption") : null}- </p>- {showReset && (- <SettingsLinkButton onClick={onReset} disabled={saving}>- {t("settings_view.silence_window.reset")}- </SettingsLinkButton>- )}- </div>- )}- </SettingsRow>- );-}diff --git a/jarvis/ui/web/frontend/src/views/settings/settingsSearch.test.ts b/jarvis/ui/web/frontend/src/views/settings/settingsSearch.test.tsindex f8b1319021..706f3c121c 100644--- a/jarvis/ui/web/frontend/src/views/settings/settingsSearch.test.ts+++ b/jarvis/ui/web/frontend/src/views/settings/settingsSearch.test.ts@@ -11,8 +11,8 @@ describe("searchSettingsOptions", () => {});it("finds localized options in the selected UI language", () => {- const matches = searchSettingsOptions("de", "Denkpause", translate);- expect(matches.some((match) => match.id === "silence-window")).toBe(true);+ const matches = searchSettingsOptions("de", "Lautstärke", translate); // i18n-allow+ expect(matches.some((match) => match.id === "volume")).toBe(true);});it("finds a field in another Settings page", () => {diff --git a/jarvis/ui/web/frontend/src/views/settings/settingsSearch.ts b/jarvis/ui/web/frontend/src/views/settings/settingsSearch.tsindex 53e31a22d0..a7f39941c7 100644--- a/jarvis/ui/web/frontend/src/views/settings/settingsSearch.ts+++ b/jarvis/ui/web/frontend/src/views/settings/settingsSearch.ts@@ -15,7 +15,6 @@ const SEARCH_GROUPS = [{ id: "realtime-voice", keys: ["realtime_voice"] },{ id: "system-prompt", keys: ["system_prompt"] },{ id: "wake-word", keys: ["wake_word"] },- { id: "silence-window", keys: ["silence_window"] },{ id: "volume", keys: ["volume"] },{ id: "audio-devices", keys: ["audio_devices"] },{ id: "music", keys: ["music", "music_group_title"] },