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.

fix(agentic-ide): replace terminal status words with icons

Ruben Lütke35d09697d300
diff --git a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsx
index ca20217b9b..12541b8dcd 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.test.tsx
@@ -20,59 +20,65 @@ function pill(props: Parameters<typeof PaneActivityPill>[0]) {
return screen.getByTestId("pane-activity");
}
-describe("what the badge says", () => {
- it("says the agent is working while its screen moves", () => {
- expect(pill({ status: "live", activity: "working" }).textContent).toBe(
- "working",
- );
+describe("what the badge shows", () => {
+ it("shows a yellow activity dot while the screen moves", () => {
+ const badge = pill({ status: "live", activity: "working" });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("dot");
+ expect(badge.className).toContain("text-amber-400");
});
- it("says done for a pane that was given a job and has stopped", () => {
- expect(
- pill({ status: "live", activity: "waiting", worked: true }).textContent,
- ).toBe("done");
+ it("shows a green check for a pane that was given a job and has stopped", () => {
+ const badge = pill({ status: "live", activity: "waiting", worked: true });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("check");
+ expect(badge.className).toContain("text-emerald-400");
});
- it("says idle — never done — for a pane nobody has instructed", () => {
+ it("shows a blue ready dot — never a check — for an unused pane", () => {
// The SAME still screen as the case above. Calling it "done" would invent a
// job for a terminal that was never given one, and read as "your work is
// ready" on a pane that has done none.
- expect(
- pill({ status: "live", activity: "waiting", worked: false }).textContent,
- ).toBe("idle");
+ const badge = pill({ status: "live", activity: "waiting", worked: false });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("dot");
+ expect(badge.className).toContain("text-sky-400");
});
- it("calls out a pane that is waiting for an answer", () => {
- expect(pill({ status: "live", activity: "asking" }).textContent).toBe(
- "needs you",
- );
+ it("shows a blue dot for a pane that is waiting for an answer", () => {
+ const badge = pill({ status: "live", activity: "asking" });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("dot");
+ expect(badge.className).toContain("text-sky-400");
});
- it("reports an agent that could not be started", () => {
- expect(pill({ status: "live", activity: "failed" }).textContent).toBe(
- "failed",
- );
+ it("shows an alert for an agent that could not be started", () => {
+ const badge = pill({ status: "live", activity: "failed" });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("alert");
});
- it("reports an agent whose process is gone", () => {
- expect(pill({ status: "live", activity: "exited" }).textContent).toBe(
- "exited",
- );
+ it("shows a muted dot for an agent whose process is gone", () => {
+ const badge = pill({ status: "live", activity: "exited" });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("dot");
+ expect(badge.className).toContain("text-muted-foreground");
});
});
describe("when the pipe is the news", () => {
- it("reports a socket that is still connecting", () => {
+ it("shows a spinner for a socket that is still connecting", () => {
// Whatever the last known activity was, it describes a pane this viewer is
// not connected to yet — the connection is what the user can act on.
- expect(
- pill({ status: "connecting", activity: "working" }).textContent,
- ).toBe("starting");
+ const badge = pill({ status: "connecting", activity: "working" });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("spinner");
});
it("reports a broken pane, and says what broke in the tooltip", () => {
const badge = pill({ status: "error", detail: "Socket closed." });
- expect(badge.textContent).toBe("error");
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("alert");
expect(badge.getAttribute("title")).toContain("Socket closed.");
});
@@ -80,7 +86,10 @@ describe("when the pipe is the news", () => {
// A plain terminal runs no agent, so it has no job to be in the middle of,
// and the backend answers with no activity at all. The honest thing left to
// say is that the pipe is up.
- expect(pill({ status: "live", activity: "" }).textContent).toBe("live");
+ const badge = pill({ status: "live", activity: "" });
+ expect(badge.textContent).toBe("");
+ expect(badge.getAttribute("data-icon")).toBe("dot");
+ expect(badge.className).toContain("text-sky-400");
});
});
@@ -94,7 +103,7 @@ describe("how long it has been that way", () => {
worked: true,
since: NOW_S - 180,
});
- expect(badge.textContent).toBe("done");
+ expect(badge.textContent).toBe("");
expect(badge.getAttribute("title")).toContain("For 3 min.");
});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsx b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsx
index 9ac77971f6..19dab1f1d0 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/PaneActivityPill.tsx
@@ -1,4 +1,4 @@
-import { AlertCircle, Check, CircleDot, HelpCircle, Loader2 } from "lucide-react";
+import { AlertCircle, Check, Loader2 } from "lucide-react";
import { cn } from "@/lib/utils";
import type { PaneActivity } from "@/lib/agenticIdeApi";
@@ -46,11 +46,11 @@ import type { PaneActivity } from "@/lib/agenticIdeApi";
* which is all a terminal can prove.
*/
-/** What each activity is called on screen, and how it is drawn. */
+/** The accessible meaning of each activity, and how its icon is drawn. */
type Look = {
label: string;
className: string;
- icon: "spinner" | "check" | "dot" | "ask" | "alert" | "none";
+ icon: "spinner" | "check" | "dot" | "alert";
/** The sentence behind the badge, minus the timing clause. */
hint: string;
};
@@ -67,8 +67,8 @@ type Look = {
const LOOK: Record<Exclude<PaneActivity, "" | "waiting">, Look> = {
working: {
label: "working",
- className: "text-amber-400",
- icon: "spinner",
+ className: "text-amber-400 motion-safe:animate-pulse",
+ icon: "dot",
hint: "Working — its screen is still changing.",
},
starting: {
@@ -79,14 +79,14 @@ const LOOK: Record<Exclude<PaneActivity, "" | "waiting">, Look> = {
},
asking: {
label: "needs you",
- className: "text-amber-400",
- icon: "ask",
+ className: "text-sky-400",
+ icon: "dot",
hint: "Stopped with a question on screen. It is waiting for your answer.",
},
exited: {
label: "exited",
className: "text-muted-foreground",
- icon: "none",
+ icon: "dot",
hint: "Its process is gone.",
},
failed: {
@@ -106,7 +106,7 @@ const DONE: Look = {
const IDLE: Look = {
label: "idle",
- className: "text-muted-foreground",
+ className: "text-sky-400",
icon: "dot",
hint: "Waiting at its prompt. Nothing has been sent to it yet.",
};
@@ -122,7 +122,7 @@ const CONNECTING: Look = {
const EXITED: Look = {
label: "exited",
className: "text-muted-foreground",
- icon: "none",
+ icon: "dot",
hint: "Its process is gone.",
};
@@ -142,7 +142,7 @@ const BROKEN: Look = {
*/
const CONNECTED: Look = {
label: "live",
- className: "text-emerald-400",
+ className: "text-sky-400",
icon: "dot",
hint: "Connected.",
};
@@ -180,8 +180,8 @@ function Icon({ look }: { look: Look }) {
if (look.icon === "spinner")
return <Loader2 className="h-3 w-3 animate-spin motion-reduce:animate-none" />;
if (look.icon === "check") return <Check className="h-3 w-3" />;
- if (look.icon === "dot") return <CircleDot className="h-2.5 w-2.5" />;
- if (look.icon === "ask") return <HelpCircle className="h-3 w-3" />;
+ if (look.icon === "dot")
+ return <span className="h-2 w-2 rounded-full bg-current" aria-hidden="true" />;
if (look.icon === "alert") return <AlertCircle className="h-3 w-3" />;
return null;
}
@@ -218,12 +218,15 @@ export function PaneActivityPill({
<span
data-testid="pane-activity"
data-activity={activity || status}
- className={cn("flex items-center gap-1 text-[11px]", look.className)}
+ data-icon={look.icon}
+ className={cn(
+ "flex h-4 w-4 shrink-0 items-center justify-center",
+ look.className,
+ )}
title={title}
aria-label={`${look.label}. ${title}`}
>
<Icon look={look} />
- {look.label}
</span>
);
}