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(chat): drop the Plan switch and the warning hue from the front-page composer
rubenluetke10-beep3723fb75cf45
diff --git a/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx b/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsxindex 4d0b81a2cf..e7f41141db 100644--- a/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx+++ b/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx@@ -12,7 +12,6 @@ import {NotebookPen,Paperclip,ShieldCheck,- ShieldOff,Square,} from "lucide-react";@@ -556,6 +555,12 @@ export function AgentComposer({ autoFocus = false }: { autoFocus?: boolean }) {);const hasPlan = Boolean((provider?.permission_modes ?? []).some((m) => m.id === "plan"));const planOn = draft.permissionMode === "plan";+ // The front page has no Plan switch (maintainer, 2026-10-05): a chat left+ // in Plan from before would stay read-only with nothing on screen saying+ // so, so it returns to the stance Build would use.+ useEffect(() => {+ if (minimal && planOn && !locks?.permissionMode) void setPlan(false);+ }, [minimal, planOn, locks?.permissionMode, setPlan]);// Every mode wears its stance's glyph (permissionIcons.ts) in the list and,// once picked, on the pill — the Combobox draws the selected option's icon// on its trigger, so the column's shield below only shows for a pick the@@ -761,8 +766,8 @@ export function AgentComposer({ autoFocus = false }: { autoFocus?: boolean }) {{provider && permissionModes.length > 0 && (<><ControlSeparator />- {/* The stance as glyph and word. Full access wears the warning- hue, so "nothing asks" reads before anyone opens the menu. */}+ {/* The stance as glyph and word, in the row's one grey like+ every other pick — no stance is singled out by colour. */}<spantitle={locks?.permissionMode ?? [permissionLabel, permissionDescription].filter(Boolean).join(" — ")}className="inline-flex min-w-0 shrink"@@ -780,35 +785,11 @@ export function AgentComposer({ autoFocus = false }: { autoFocus?: boolean }) {className={cn(COMPOSER_CONTROL_CLASS,"max-w-[200px] max-md:[&>span.truncate]:sr-only",- permissionModeIcon(permissionValue) === ShieldOff- ? "text-warning hover:text-warning [&_svg]:text-warning"- : undefined,)}/></span></>)}- {hasPlan && (- <button- type="button"- role="switch"- aria-checked={planOn}- aria-label={planOn ? t("agent_chat.mode_plan") : t("agent_chat.mode_build")}- data-testid="composer-plan"- onClick={() => void setPlan(!planOn)}- disabled={Boolean(locks?.permissionMode)}- title={locks?.permissionMode ?? (planOn ? t("agent_chat.plan_hint") : t("agent_chat.build_hint"))}- className={cn(- "inline-flex h-8 shrink-0 items-center gap-1.5 rounded-lg text-sm font-medium transition-colors disabled:opacity-50",- planOn- ? "bg-accent-soft px-2.5 text-accent"- : "w-8 justify-center text-muted-foreground hover:bg-secondary hover:text-foreground",- )}- >- <NotebookPen className="h-4 w-4" aria-hidden />- {planOn && t("agent_chat.mode_plan")}- </button>- )}<span className="min-w-2 flex-1" /><inputref={fileInputRef}diff --git a/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsx b/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsxindex b10d33f277..eb9fc27677 100644--- a/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsx+++ b/jarvis/ui/web/frontend/src/components/home/ChatStage.test.tsx@@ -1,4 +1,4 @@-import { act, cleanup, fireEvent, render as rtlRender, screen, within } from "@testing-library/react";+import { act, cleanup, fireEvent, render as rtlRender, screen, waitFor, within } from "@testing-library/react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";@@ -207,8 +207,8 @@ describe("ChatStage (agent chat)", () => {expect(within(composer).getByTestId("composer-model").getAttribute("data-value")).toBe("claude-api\u0001");expect(within(composer).getByTestId("composer-effort").getAttribute("data-value")).toBe("high");expect(within(composer).getByTestId("composer-permission").getAttribute("data-value")).toBe("acceptEdits");- // Claude Code has a plan entry, so the Build | Plan switch is drawn.- expect(within(composer).getByTestId("composer-plan").getAttribute("aria-checked")).toBe("false");+ // No Build | Plan switch on the front page, even for a ladder with a plan entry.+ expect(within(composer).queryByTestId("composer-plan")).toBeNull();// No surface chip, no paperclip: "+" carries attaching.expect(within(composer).queryByTestId("composer-surface")).toBeNull();expect(within(composer).queryByTestId("composer-attach")).toBeNull();@@ -576,8 +576,21 @@ describe("ChatStage (agent chat)", () => {expect(glyphs[1]).toContain("lucide-file-pen");expect(glyphs[2]).toContain("lucide-shield-off");expect(new Set(glyphs).size).toBe(glyphs.length);- // The plan entry still powers the Build | Plan switch.- expect(screen.getByTestId("composer-plan").getAttribute("aria-checked")).toBe("false");+ });++ it("draws Bypass in the row's plain grey, like every other stance", () => {+ useAgentChatStore.setState((s) => ({ draft: { ...s.draft, permissionMode: "bypassPermissions" } }));+ render(<ChatStage />);+ const pill = screen.getByTestId("composer-permission");+ expect(pill.getAttribute("data-value")).toBe("bypassPermissions");+ expect(pill.className).not.toContain("text-warning");+ });++ it("brings a chat left in Plan back to its build stance, since the front page has no switch", async () => {+ const setPlan = vi.fn(async () => {});+ useAgentChatStore.setState((s) => ({ setPlan, draft: { ...s.draft, permissionMode: "plan" } }) as never);+ render(<ChatStage />);+ await waitFor(() => expect(setPlan).toHaveBeenCalledWith(false));});it("accepts a prompt through the current rich text composer", () => {