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
feat(ide): add a Stop all agents control to the agents panel
rubenluetke10-beep9e57b4f10227
diff --git a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsxindex dbf6beb004..aa3fe44435 100644--- a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsx@@ -175,3 +175,29 @@ describe("AgentsOverview", () => {expect(row.textContent).toMatch(/Last output \d+s ago/);});});++describe("stopping every agent", () => {+ it("asks first, then stops the runtime and refreshes the workspace list", async () => {+ const calls: string[] = [];+ const realFetch = globalThis.fetch;+ globalThis.fetch = (async (input: RequestInfo | URL, init?: RequestInit) => {+ calls.push(`${init?.method ?? "GET"} ${String(input)}`);+ return new Response(JSON.stringify({ ok: true, closed_workspaces: 2 }), { status: 200 });+ }) as typeof fetch;+ try {+ render(<AgentsOverview />);+ fireEvent.click(screen.getByTestId("ide-agents-stop-all"));+ // Nothing is stopped by the first click — it only asks.+ expect(calls).toEqual([]);+ expect(screen.getByRole("alertdialog")).toBeTruthy();+ await act(async () => {+ fireEvent.click(screen.getByTestId("ide-agents-stop-confirm"));+ });+ expect(calls).toEqual(["POST /api/agentic-ide/runtime/stop"]);+ expect(useIdeProjectsStore.getState().refreshRequest).not.toBeNull();+ expect(screen.queryByRole("alertdialog")).toBeNull();+ } finally {+ globalThis.fetch = realFetch;+ }+ });+});diff --git a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsxindex 175bcec775..8c4ed9ecaa 100644--- a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx@@ -1,7 +1,8 @@import { useEffect, useState } from "react";import { fill, useT } from "@/i18n";import { cn } from "@/lib/utils";-import type { WorkspacePaneRow } from "@/lib/agenticIdeApi";+import { stopIdeRuntime, type WorkspacePaneRow } from "@/lib/agenticIdeApi";+import { useEventStore } from "@/store/events";import { useIdeChatStore } from "@/store/ideChat";import { useIdeProjectsStore } from "@/store/ideProjects";import { useIdeSidePanelStore } from "@/store/ideSidePanel";@@ -59,6 +60,10 @@ export function AgentsOverview() {usePaneRecapPoll();const recaps = usePaneRecapsStore((state) => state);const mine = workspaceAgents(panes, activeWorkspaceId);+ const pushToast = useEventStore((state) => state.pushToast);+ const requestRefresh = useIdeProjectsStore((state) => state.requestRefresh);+ const [confirmStop, setConfirmStop] = useState(false);+ const [stopping, setStopping] = useState(false);const counts = new Map<AgentDotKind, number>();for (const pane of mine) {@@ -71,6 +76,21 @@ export function AgentsOverview() {requestPane(pane.workspace_id, pane.name);};+ // Closing the app only detaches from the agents (they live in a background+ // host), so ending them is a separate, deliberate action with its own confirm.+ const stopAll = async () => {+ setStopping(true);+ try {+ await stopIdeRuntime();+ requestRefresh();+ } catch (error) {+ pushToast("error", (error as Error).message);+ } finally {+ setStopping(false);+ setConfirmStop(false);+ }+ };+return (<sectiondata-testid="ide-workspace-agents"@@ -185,6 +205,45 @@ export function AgentsOverview() {})}</ul>)}++ {panes.length > 0 && (+ <div data-testid="ide-agents-runtime" className="shrink-0 space-y-2 border-t border-border/60 px-4 py-3">+ <p className="text-[11px] text-muted-foreground">{t("ide_side_panel.agents.runtime_note")}</p>+ {confirmStop ? (+ <div role="alertdialog" aria-label={t("ide_side_panel.agents.stop_all")} className="space-y-2">+ <p className="text-xs text-foreground">{t("ide_side_panel.agents.stop_confirm")}</p>+ <div className="flex gap-2">+ <button+ type="button"+ disabled={stopping}+ onClick={() => void stopAll()}+ data-testid="ide-agents-stop-confirm"+ className="rounded-md bg-destructive px-2.5 py-1 text-xs font-medium text-destructive-foreground hover:bg-destructive/90 disabled:opacity-60"+ >+ {t("ide_side_panel.agents.stop_confirm_yes")}+ </button>+ <button+ type="button"+ disabled={stopping}+ onClick={() => setConfirmStop(false)}+ className="rounded-md border border-border px-2.5 py-1 text-xs text-foreground hover:bg-muted"+ >+ {t("ide_side_panel.agents.stop_cancel")}+ </button>+ </div>+ </div>+ ) : (+ <button+ type="button"+ onClick={() => setConfirmStop(true)}+ data-testid="ide-agents-stop-all"+ className="rounded-md border border-border px-2.5 py-1 text-xs text-destructive hover:bg-destructive/10"+ >+ {t("ide_side_panel.agents.stop_all")}+ </button>+ )}+ </div>+ )}</section>);}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex 265870b38b..c865518ac8 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -5782,6 +5782,11 @@"no_workspace": "Wähle einen Workspace, um seine Agents zu sehen.","empty": "In diesem Workspace laufen keine Agents.","last_output": "Letzte Ausgabe vor {time}",+ "runtime_note": "Agents laufen weiter, wenn du die App schließt.",+ "stop_all": "Alle Agents stoppen",+ "stop_confirm": "Jeden Agent in allen Workspaces stoppen? Ihre Unterhaltungen bleiben gespeichert.",+ "stop_confirm_yes": "Alle stoppen",+ "stop_cancel": "Abbrechen","summary": {"waiting": "{n} warten auf dich","working": "{n} arbeiten",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex be7a402403..7eca7ddb75 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -5815,6 +5815,11 @@"no_workspace": "Select a workspace to see its agents.","empty": "No agents running in this workspace.","last_output": "Last output {time} ago",+ "runtime_note": "Agents keep running when you close the app.",+ "stop_all": "Stop all agents",+ "stop_confirm": "Stop every agent in every workspace? Their conversations stay saved.",+ "stop_confirm_yes": "Stop all",+ "stop_cancel": "Cancel","summary": {"waiting": "{n} need input","working": "{n} working",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex d1cb1e9955..ba2630bb67 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -5782,6 +5782,11 @@"no_workspace": "Selecciona un espacio de trabajo para ver sus agentes.","empty": "No hay agentes en este espacio de trabajo.","last_output": "Última salida hace {time}",+ "runtime_note": "Los agentes siguen funcionando cuando cierras la app.",+ "stop_all": "Detener todos los agentes",+ "stop_confirm": "¿Detener todos los agentes de todos los espacios de trabajo? Sus conversaciones se conservan.",+ "stop_confirm_yes": "Detener todos",+ "stop_cancel": "Cancelar","summary": {"waiting": "{n} esperan tu respuesta","working": "{n} trabajando",diff --git a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.tsindex 7135190ef2..05f667ee44 100644--- a/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts+++ b/jarvis/ui/web/frontend/src/lib/agenticIdeApi.ts@@ -1808,6 +1808,20 @@ export async function setFocusMode(enabled: boolean): Promise<boolean> {return body.focus_mode;}+/**+ * The explicit "stop everything": ends every agent in every workspace.+ *+ * Closing the app never does this — the agents live in a background host and+ * keep working — so this is the one control that does. The workspaces stay on+ * offer for a deliberate reopen and are not reopened by themselves.+ */+export async function stopIdeRuntime(): Promise<number> {+ const res = await fetch("/api/agentic-ide/runtime/stop", { method: "POST", cache: "no-store" });+ if (!res.ok) throw new Error(await detail(res));+ const body = (await res.json()) as { closed_workspaces: number };+ return body.closed_workspaces;+}+/*** Tell the backend which view is on screen, which pane it stages, and which* one owns the next prompt.