Skip to content

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.

feat(chat): the front page says it is Jarvis, the IDE's chat says it is a coding agent

rubenluetke10-beep79acbe5610e5
diff --git a/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx b/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx
index 5bb5987f6a..4e2437eb3b 100644
--- a/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx
@@ -3,6 +3,7 @@ import {
ArrowUp,
Bot,
Brain,
+ FolderCode,
FolderOpen,
Gauge,
Hammer,
@@ -17,6 +18,7 @@ import { ProviderLogo } from "@/components/providers/ProviderLogo";
import { useAgentChat, useAgentChatApi } from "@/components/agentchat/AgentChatStoreContext";
import type { ProviderOption } from "@/store/agentChat";
import { useEventStore } from "@/store/events";
+import { folderLeaf } from "@/lib/folderPath";
import { pickAgentChatFolder } from "@/lib/agentChatApi";
import { runningTurn } from "@/components/agentchat/reduce";
import { permissionModeIcon } from "@/components/agentchat/permissionIcons";
@@ -67,11 +69,13 @@ export function AgentComposer({ autoFocus = false }: { autoFocus?: boolean }) {
);
const connected = useEventStore((s) => s.connected);
const wsWarming = useEventStore((s) => s.wsWarming);
+ const assistantName = useEventStore((s) => s.assistantName);
const setActiveSection = useEventStore((s) => s.setActiveSection);
const pushToast = useEventStore((s) => s.pushToast);
const [restarting, setRestarting] = useState(false);
const store = useAgentChatApi();
+ const surface = useAgentChat((s) => s.surface);
const catalog = useAgentChat((s) => s.catalog);
const catalogError = useAgentChat((s) => s.catalogError);
const backendOutdated = useAgentChat((s) => s.backendOutdated);
@@ -314,6 +318,40 @@ export function AgentComposer({ autoFocus = false }: { autoFocus?: boolean }) {
className="max-h-48 w-full resize-none bg-transparent px-1 py-1 text-[15px] leading-relaxed text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:opacity-50"
/>
<div className="flex flex-wrap items-center gap-1">
+ {/*
+ Who you are talking to, before what they run on. The two chats wear
+ the same face, so without this the front page and the IDE's chat are
+ indistinguishable at a glance — and they are not the same thing: here
+ it is Jarvis with a keyboard, there it is a coding agent in a folder
+ (maintainer, 2026-08-25). Not a control: what a chat IS cannot be
+ switched from inside the chat.
+ */}
+ <span
+ data-testid="composer-surface"
+ data-surface={surface}
+ title={
+ surface === "jarvis"
+ ? t("agent_chat.surface_jarvis_hint")
+ : `${t("agent_chat.surface_agent_hint")}: ${draft.cwd || folderLeaf("")}`
+ }
+ className="inline-flex h-7 max-w-[180px] shrink-0 items-center gap-1.5 rounded-lg bg-secondary/60 px-2 text-xs font-medium text-foreground"
+ >
+ {surface === "jarvis" ? (
+ <img
+ src="/jarvis-logo.png"
+ width={14}
+ height={14}
+ alt=""
+ aria-hidden
+ className="h-3.5 w-3.5 shrink-0"
+ />
+ ) : (
+ <FolderCode className="h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden />
+ )}
+ <span className="truncate">
+ {surface === "jarvis" ? assistantName : t("agent_chat.surface_agent")}
+ </span>
+ </span>
<Pick
testId="composer-provider"
ariaLabel={t("agent_chat.pick_provider")}
@@ -390,7 +428,11 @@ export function AgentComposer({ autoFocus = false }: { autoFocus?: boolean }) {
<button
type="button"
onClick={() => void onPickFolder()}
- title={draft.cwd ? `${t("agent_chat.folder_hint")}: ${draft.cwd}` : t("agent_chat.folder")}
+ title={
+ draft.cwd
+ ? `${t(surface === "jarvis" ? "agent_chat.folder_hint" : "agent_chat.surface_agent_hint")}: ${draft.cwd}`
+ : t("agent_chat.folder")
+ }
aria-label={t("agent_chat.folder")}
data-testid="composer-folder"
className="inline-flex h-7 max-w-[160px] items-center gap-1.5 rounded-lg px-2 text-xs text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground"
@@ -587,10 +629,3 @@ export function effortLabel(level: string, t: (key: string) => string): string {
return level;
}
}
-
-function folderLeaf(path: string): string {
- if (!path) return "~";
- const trimmed = path.replace(/[\\/]+$/, "");
- const parts = trimmed.split(/[\\/]/);
- return parts[parts.length - 1] || trimmed;
-}
diff --git a/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsx b/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsx
index 696cfbf9be..0af0fad2d9 100644
--- a/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsx
@@ -5,7 +5,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { ChatStage } from "@/components/home/ChatStage";
import { EMPTY_TIMELINE, reduceEvents } from "@/components/agentchat/reduce";
import type { AgentChatCatalog, AgentChatEvent } from "@/lib/agentChatApi";
-import { useAgentChatStore } from "@/store/agentChat";
+import { AgentChatStoreProvider } from "@/components/agentchat/AgentChatStoreContext";
+import { useAgentChatStore, useAgentSessionStore } from "@/store/agentChat";
import { useEventStore } from "@/store/events";
const CATALOG: AgentChatCatalog = {
@@ -68,6 +69,43 @@ function render(ui: React.ReactElement) {
return rtlRender(<QueryClientProvider client={client}>{ui}</QueryClientProvider>);
}
+/**
+ * The state both stores are seeded with — the front page's and the IDE's.
+ *
+ * Fresh per call: the two stores must never share one draft object, which is
+ * the whole point of the split (jarvis surface vs agent surface).
+ */
+function seedState() {
+ return {
+ catalog: CATALOG,
+ connections: [
+ { jarvis: "claude-api", key_set: true, is_active_brain: true },
+ { jarvis: "openai-codex", key_set: true, is_active_brain: false },
+ ],
+ catalogError: null,
+ backendOutdated: false,
+ liveModels: {},
+ sessions: [],
+ activeSessionId: null,
+ activeSession: null,
+ timeline: EMPTY_TIMELINE,
+ draft: {
+ provider: "claude-api",
+ model: "",
+ effort: "high",
+ permissionMode: "acceptEdits",
+ buildMode: "acceptEdits",
+ cwd: "C:\\work",
+ },
+ busy: false,
+ lastError: null,
+ // The stage's mount effects fetch; keep them inert here.
+ loadCatalog: async () => {},
+ loadSessions: async () => {},
+ loadModels: async () => {},
+ };
+}
+
let seq = 0;
function ev(kind: string, payload: Record<string, unknown>): AgentChatEvent {
seq += 1;
@@ -92,34 +130,7 @@ describe("ChatStage (agent chat)", () => {
});
window.localStorage.clear();
useEventStore.setState({ connected: true, wsWarming: false, assistantName: "Jarvis" });
- useAgentChatStore.setState({
- catalog: CATALOG,
- connections: [
- { jarvis: "claude-api", key_set: true, is_active_brain: true },
- { jarvis: "openai-codex", key_set: true, is_active_brain: false },
- ],
- catalogError: null,
- backendOutdated: false,
- liveModels: {},
- sessions: [],
- activeSessionId: null,
- activeSession: null,
- timeline: EMPTY_TIMELINE,
- draft: {
- provider: "claude-api",
- model: "",
- effort: "high",
- permissionMode: "acceptEdits",
- buildMode: "acceptEdits",
- cwd: "C:\\work",
- },
- busy: false,
- lastError: null,
- // The stage's mount effects fetch; keep them inert here.
- loadCatalog: async () => {},
- loadSessions: async () => {},
- loadModels: async () => {},
- });
+ useAgentChatStore.setState(seedState());
});
afterEach(() => {
cleanup();
@@ -137,6 +148,57 @@ describe("ChatStage (agent chat)", () => {
expect(within(composer).getByTestId("composer-plan").getAttribute("aria-checked")).toBe("false");
});
+ it("says who is answering: the front page names the assistant, the IDE names a coding agent", () => {
+ // The maintainer's complaint, twice over: the two chats wear the same face,
+ // so nothing on screen said which of them you were in (2026-08-25). They
+ // are different harnesses — Jarvis with a keyboard vs a coding agent in a
+ // folder — and the composer now says so before a word is typed.
+ const { unmount } = render(<ChatStage />);
+ const front = screen.getByTestId("composer-surface");
+ expect(front.getAttribute("data-surface")).toBe("jarvis");
+ expect(front.textContent).toContain("Jarvis");
+ // The front page's subtitle says it is the assistant the microphone reaches.
+ expect(screen.getByTestId("home-greeting").textContent).toContain("microphone");
+ unmount();
+
+ useAgentSessionStore.setState(seedState());
+ render(
+ <AgentChatStoreProvider store={useAgentSessionStore}>
+ <ChatStage />
+ </AgentChatStoreProvider>,
+ );
+ const ide = screen.getByTestId("composer-surface");
+ expect(ide.getAttribute("data-surface")).toBe("agent");
+ expect(ide.textContent).toContain("Coding agent");
+ expect(ide.textContent).not.toContain("Jarvis");
+ // No "Good afternoon" from a coding agent — the folder it works in instead.
+ expect(screen.queryByTestId("home-greeting")).toBeNull();
+ expect(screen.getByTestId("chat-folder-headline").textContent).toContain("work");
+ });
+
+ it("bylines a turn with the assistant on the front page and with the coding agent in the IDE", () => {
+ const timeline = reduceEvents(EMPTY_TIMELINE, [
+ ev("user_message", { text: "list the files" }),
+ ev("turn_started", { turn_id: "t1", provider: "claude-api", model: "claude-opus-5", effort: "high", runner: "brain" }),
+ ev("assistant_text", { turn_id: "t1", message_id: "m1", text: "Two files." }),
+ ev("turn_finished", { turn_id: "t1", status: "done", duration_ms: 900, usage: {} }),
+ ]);
+ useAgentChatStore.setState({ activeSessionId: "s1", timeline });
+ const { unmount } = render(<ChatStage />);
+ expect(screen.getByTestId("agent-turn").textContent).toContain("Jarvis");
+ unmount();
+
+ useAgentSessionStore.setState({ ...seedState(), activeSessionId: "ide-1", timeline });
+ render(
+ <AgentChatStoreProvider store={useAgentSessionStore}>
+ <ChatStage />
+ </AgentChatStoreProvider>,
+ );
+ const turn = screen.getByTestId("agent-turn");
+ expect(turn.textContent).toContain("Coding agent");
+ expect(turn.textContent).not.toContain("Jarvis");
+ });
+
it("hides the Build | Plan switch for a provider whose ladder has no plan entry", () => {
useAgentChatStore.setState((s) => ({ draft: { ...s.draft, provider: "openai-codex", permissionMode: "auto" } }));
render(<ChatStage />);
diff --git a/jarvis/ui/web/frontend/src/components/home/ChatStage.tsx b/jarvis/ui/web/frontend/src/components/home/ChatStage.tsx
index 24a7ecb3ec..13ab501b3e 100644
--- a/jarvis/ui/web/frontend/src/components/home/ChatStage.tsx
+++ b/jarvis/ui/web/frontend/src/components/home/ChatStage.tsx
@@ -8,7 +8,9 @@ import { AgentTimeline } from "@/components/agentchat/AgentTimeline";
import { Greeting } from "@/components/home/Greeting";
import { VoiceThreadStage } from "@/components/home/VoiceThreadStage";
import type { ApprovalDecision } from "@/lib/agentChatApi";
-import { useT } from "@/i18n";
+import { fill, useT } from "@/i18n";
+import { folderLeaf } from "@/lib/folderPath";
+import { FolderCode } from "lucide-react";
/**
* The chat stage — the typed half of the front page: Jarvis with a keyboard.
@@ -45,6 +47,7 @@ export function ChatStage() {
const assistantName = useEventStore((s) => s.assistantName);
const surface = useAgentChat((s) => s.surface);
const items = useAgentChat((s) => s.timeline.items);
+ const cwd = useAgentChat((s) => s.draft.cwd);
const activeSessionId = useAgentChat((s) => s.activeSessionId);
const catalog = useAgentChat((s) => s.catalog);
const decide = useAgentChat((s) => s.decide);
@@ -133,7 +136,14 @@ export function ChatStage() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [hasContent]);
- const subtitle = useMemo(() => t("agent_chat.empty_subtitle"), [t]);
+ // The two surfaces open with different words because they are different
+ // things to be doing: here Jarvis reads with your memory and tools, there a
+ // coding agent reads the folder. Same layout, so nothing moves.
+ const isJarvis = surface === "jarvis";
+ const subtitle = useMemo(
+ () => t(isJarvis ? "agent_chat.empty_subtitle" : "agent_chat.empty_subtitle_agent"),
+ [t, isJarvis],
+ );
// A spoken thread was opened from the history: read it here, in the column
// the composer would otherwise own. An agent chat opening clears this.
@@ -145,7 +155,11 @@ export function ChatStage() {
return (
<div className="flex min-h-0 flex-1 flex-col items-center" data-testid="chat-stage" data-empty="true">
<div className="flex w-full max-w-[760px] flex-1 flex-col justify-center gap-8 px-6 pb-20">
- <Greeting subtitle={subtitle} />
+ {isJarvis ? (
+ <Greeting subtitle={subtitle} />
+ ) : (
+ <FolderHeadline folder={cwd} subtitle={subtitle} />
+ )}
<AgentComposer autoFocus />
</div>
</div>
@@ -161,7 +175,7 @@ export function ChatStage() {
>
<AgentTimeline
items={items}
- assistantName={assistantName}
+ assistantName={isJarvis ? assistantName : t("agent_chat.surface_agent")}
providerLabel={providerLabel}
onDecide={onDecide}
/>
@@ -175,6 +189,27 @@ export function ChatStage() {
);
}
+/**
+ * The IDE chat's opening line: which folder the coding agent works in.
+ *
+ * Not a greeting — nobody is being greeted by a coding agent, and the front
+ * page's "Good afternoon" would say the wrong thing about who is answering.
+ * Same typography and the same place on the page, so the two surfaces stay
+ * one design.
+ */
+function FolderHeadline({ folder, subtitle }: { folder: string; subtitle: string }) {
+ const t = useT();
+ return (
+ <div className="flex flex-col items-center text-center" data-testid="chat-folder-headline">
+ <h1 className="flex items-center gap-3 font-display text-3xl font-semibold tracking-tight text-foreground [text-wrap:balance]">
+ <FolderCode className="h-[30px] w-[30px] shrink-0 text-muted-foreground" aria-hidden />
+ <span>{fill(t("agent_chat.empty_title_agent"), { folder: folderLeaf(folder) })}</span>
+ </h1>
+ <p className="mt-2 max-w-md text-sm text-muted-foreground">{subtitle}</p>
+ </div>
+ );
+}
+
/** Room kept under the turn so the composer's shadow never kisses the text. */
const TURN_BOTTOM_PAD_PX = 24;
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index e4c7bd941c..72ed7bc30d 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -577,7 +577,12 @@
},
"agent_chat": {
"placeholder": "Frag mich alles …",
- "empty_subtitle": "Modell wählen. Dann fragen.",
+ "empty_subtitle": "{name} mit Tastatur — derselbe Assistent, den das Mikrofon erreicht. Das gewählte Modell ist das, worauf {name} in diesem Chat läuft.",
+ "empty_subtitle_agent": "Ein Coding-Agent arbeitet an den Dateien in diesem Ordner — nicht an deinem Gedächtnis, deinem Wiki oder deinem Kalender. Modell wählen. Dann fragen.",
+ "empty_title_agent": "Coding-Agent in {folder}",
+ "surface_agent": "Coding-Agent",
+ "surface_jarvis_hint": "{name} — derselbe Assistent, den das Mikrofon erreicht: dein Gedächtnis, dein Wiki, deine Skills und Werkzeuge. Die Auswahl rechts ist das, worauf {name} in diesem Chat läuft.",
+ "surface_agent_hint": "Ein Coding-Agent, der an den Dateien in diesem Ordner arbeitet",
"pick_provider": "Anbieter",
"pick_model": "Modell",
"pick_effort": "Denkaufwand",
@@ -605,7 +610,7 @@
"build_hint": "Bau-Modus — der Agent darf Dateien ändern. Klick für Plan-Modus.",
"plan_hint": "Plan-Modus — der Agent liest und plant, ändert nichts. Klick für Bau-Modus.",
"folder": "Arbeitsordner",
- "folder_hint": "Jarvis arbeitet für diesen Chat in diesem Ordner",
+ "folder_hint": "{name} arbeitet für diesen Chat in diesem Ordner",
"attach_drop_hint": "Dateien hier ablegen, um sie anzuhängen",
"attach_remove": "{name} entfernen",
"attach_working": "Wird angehängt…",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 9542c9fac1..839cc7e980 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -577,7 +577,12 @@
},
"agent_chat": {
"placeholder": "Ask anything…",
- "empty_subtitle": "Pick a model. Then ask.",
+ "empty_subtitle": "{name} with a keyboard — the same assistant the microphone reaches. The model you pick is what {name} runs on for this chat.",
+ "empty_subtitle_agent": "A coding agent works on the files in this folder — not on your memory, your wiki or your calendar. Pick a model. Then ask.",
+ "empty_title_agent": "Coding agent in {folder}",
+ "surface_agent": "Coding agent",
+ "surface_jarvis_hint": "{name} — the same assistant the microphone reaches: your memory, your wiki, your skills and tools. The picks to the right are what {name} runs on for this chat.",
+ "surface_agent_hint": "A coding agent working on the files in this folder",
"pick_provider": "Provider",
"pick_model": "Model",
"pick_effort": "Reasoning effort",
@@ -605,7 +610,7 @@
"build_hint": "Build mode — the agent may change files. Click for Plan mode.",
"plan_hint": "Plan mode — the agent reads and plans, changes nothing. Click for Build mode.",
"folder": "Working folder",
- "folder_hint": "Jarvis works in this folder for this chat",
+ "folder_hint": "{name} works in this folder for this chat",
"attach_drop_hint": "Drop the files here to attach them",
"attach_remove": "Remove {name}",
"attach_working": "Attaching…",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 52b4fbe51b..f7db4a856e 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -577,7 +577,12 @@
},
"agent_chat": {
"placeholder": "Pregunta lo que quieras…",
- "empty_subtitle": "Elige un modelo. Luego pregunta.",
+ "empty_subtitle": "{name} con teclado: el mismo asistente que atiende el micrófono. El modelo que elijas es sobre lo que corre {name} en este chat.",
+ "empty_subtitle_agent": "Un agente de código trabaja en los archivos de esta carpeta, no en tu memoria, tu wiki ni tu calendario. Elige un modelo. Luego pregunta.",
+ "empty_title_agent": "Agente de código en {folder}",
+ "surface_agent": "Agente de código",
+ "surface_jarvis_hint": "{name}: el mismo asistente que atiende el micrófono — tu memoria, tu wiki, tus skills y herramientas. Lo que elijas a la derecha es sobre lo que corre {name} en este chat.",
+ "surface_agent_hint": "Un agente de código que trabaja en los archivos de esta carpeta",
"pick_provider": "Proveedor",
"pick_model": "Modelo",
"pick_effort": "Esfuerzo de razonamiento",
@@ -605,7 +610,7 @@
"build_hint": "Modo construir: el agente puede cambiar archivos. Clic para el modo planificar.",
"plan_hint": "Modo planificar: el agente lee y planifica, no cambia nada. Clic para el modo construir.",
"folder": "Carpeta de trabajo",
- "folder_hint": "Jarvis trabaja en esta carpeta para este chat",
+ "folder_hint": "{name} trabaja en esta carpeta para este chat",
"attach_drop_hint": "Suelta aquí los archivos para adjuntarlos",
"attach_remove": "Quitar {name}",
"attach_working": "Adjuntando…",