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(ide): agent cards with brand marks and a blue frame on the picked pane

rubenluetke10-beep1c9e4139231d
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx
index 7fd7cd2dae..c6cde2eae7 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.test.tsx
@@ -18,6 +18,7 @@ vi.mock("./AgenticTerminal", () => ({ AgenticTerminal: (props: {
</div> }));
vi.mock("@/hooks/useTheme", () => ({ useThemeValue: () => "dark" }));
import { WorkspaceTerminalGrid } from "./WorkspaceTerminalGrid";
+import { useIdeSidePanelStore } from "@/store/ideSidePanel";
import { balancedLayout, previewDock } from "./workspaceDocking";
class ResizeObserverStub { observe() {} disconnect() {} }
@@ -179,3 +180,22 @@ it("only restarts the addressed session and shows survivors after maximized clos
rerender(<WorkspaceTerminalGrid {...props} session={makeSession(["T2"])} />);
await waitFor(() => expect(screen.getByRole("button", { name: "Maximize T2" }).closest("[data-session-id]")?.className).not.toContain("hidden"));
});
+
+it("frames the pane an agent card spotlit and drops the frame when another pane takes focus", () => {
+ useIdeSidePanelStore.setState({ spotlight: { workspaceId: "w1", pane: "T2" } });
+ render(<WorkspaceTerminalGrid {...props} session={makeSession()} />);
+ const spotlit = document.querySelector<HTMLElement>('[data-session-id="T2"]')!;
+ expect(spotlit.dataset.spotlit).toBe("true");
+ expect(spotlit.className).toContain("ring-accent");
+ expect(document.querySelector<HTMLElement>('[data-session-id="T1"]')!.dataset.spotlit).toBeUndefined();
+ fireEvent.mouseDown(screen.getByLabelText("Terminal input T1"));
+ expect(useIdeSidePanelStore.getState().spotlight).toBeNull();
+ expect(document.querySelector<HTMLElement>('[data-session-id="T2"]')!.dataset.spotlit).toBeUndefined();
+});
+
+it("ignores a spotlight aimed at another workspace", () => {
+ useIdeSidePanelStore.setState({ spotlight: { workspaceId: "w9", pane: "T2" } });
+ render(<WorkspaceTerminalGrid {...props} session={makeSession()} />);
+ expect(document.querySelector("[data-spotlit]")).toBeNull();
+ useIdeSidePanelStore.setState({ spotlight: null });
+});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx
index b8ee18497e..9d648b033c 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceTerminalGrid.tsx
@@ -6,9 +6,10 @@ import type { SessionState, TerminalState } from "@/lib/agenticIdeApi";
import { moveTerminal, renameTerminal, type PaneMovePosition } from "@/lib/agenticIdeApi";
import { useThemeValue } from "@/hooks/useTheme";
import { useEventStore } from "@/store/events";
+import { useIdeSidePanelStore } from "@/store/ideSidePanel";
import { cn } from "@/lib/utils";
import { treeLayout, treeLeaves, type LayoutNode } from "./treeLayout";
-import { DOCK_LABELS, GRID_LIMIT_HINT, MAX_GRID_COLUMNS, MAX_GRID_ROWS, MAX_WORKSPACE_PANES, dockPosition, fitsWorkspace, layoutSpan, paneStyle, previewDock, workspaceLayout } from "./workspaceDocking";
+import { DOCK_LABELS, dockPosition, fitsWorkspace, layoutSpan, paneStyle, previewDock, workspaceLayout } from "./workspaceDocking";
const GAP = 8;
const MIN_WIDTH = 280;
@@ -22,8 +23,6 @@ interface Props {
onClose: (terminal: TerminalState) => void;
onSelect: (name: string) => void;
selected: string;
- /** The server's per-workspace pane limit; splitting stops there. */
- maxPanes?: number;
fontSize: number;
appearance: "light" | "dark" | null;
disabled?: boolean;
@@ -34,9 +33,13 @@ interface Props {
interface DropTarget { id: string; position: PaneMovePosition; allowed: boolean }
interface DragFeedback { id: string; target: DropTarget | null; x: number; y: number }
-export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSelect, selected, maxPanes = MAX_WORKSPACE_PANES, fontSize, appearance, disabled = false, onMutationStart, onMutationEnd }: Props) {
+export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSelect, selected, fontSize, appearance, disabled = false, onMutationStart, onMutationEnd }: Props) {
const theme = useThemeValue();
const pushToast = useEventStore((state) => state.pushToast);
+ // The pane an agent card in the side panel pointed at, framed in blue.
+ const spotlight = useIdeSidePanelStore((state) => state.spotlight);
+ const setSpotlight = useIdeSidePanelStore((state) => state.setSpotlight);
+ const spotlitPane = spotlight?.workspaceId === session.id ? spotlight.pane : null;
const frame = useRef<HTMLDivElement>(null);
const [drag, setDrag] = useState<DragFeedback | null>(null);
const [optimistic, setOptimistic] = useState<LayoutNode | null>(null);
@@ -86,7 +89,7 @@ export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSe
const before = workspaceLayout(owner.layout, owner.terminals);
if (!before || !source || !target) return;
const next = previewDock(before, source.key, target.key, position);
- if (!fitsWorkspace(next)) { setAnnouncement(GRID_LIMIT_HINT); return; }
+ if (!fitsWorkspace(next)) { setAnnouncement("Use at most four columns and two rows."); return; }
saveInFlight.current = true;
latest.current.onMutationStart?.();
setSaving(true);
@@ -184,6 +187,15 @@ export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSe
};
const dragged = drag ? session.terminals.find((terminal) => idOf(terminal) === drag.id) : null;
+ // A pane picked from the side panel may sit off-screen on a narrow grid.
+ useEffect(() => {
+ if (!spotlitPane) return;
+ const node = frame.current?.querySelector("[data-spotlit=\"true\"]");
+ if (node instanceof HTMLElement && typeof node.scrollIntoView === "function") {
+ node.scrollIntoView({ block: "nearest", inline: "nearest", behavior: "smooth" });
+ }
+ }, [spotlitPane]);
+
return <div ref={frame} data-testid="workspace-terminal-grid" aria-busy={saving} className="relative h-full min-h-0 overflow-auto p-2">
<div className="relative h-full" style={{
minWidth: visibleMaximized ? undefined : `${columns * MIN_WIDTH + (columns - 1) * GAP}px`,
@@ -191,7 +203,7 @@ export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSe
}}>
{tiles.map((terminal, index) => {
const id = idOf(terminal);
- return <div key={id} data-session-id={id} tabIndex={0}
+ return <div key={id} data-session-id={id} data-spotlit={spotlitPane === terminal.name ? "true" : undefined} tabIndex={0}
aria-label={`${terminal.name}. Drag to an edge to dock, or the center to swap. Alt+Arrow swaps with a neighbor.`}
onKeyDown={(event) => {
if (event.target !== event.currentTarget && !(event.target instanceof HTMLElement && event.target.closest("[data-ide-drag-handle]"))) return;
@@ -218,21 +230,22 @@ export function WorkspaceTerminalGrid({ session, onChanged, onAdd, onClose, onSe
style={paneStyle(visibleMaximized === id ? { x: 0, y: 0, w: 1, h: 1 } : layout.boxes[index]!)}
className={cn("min-h-0 min-w-0 rounded-2xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
drag?.id === id && "opacity-50",
+ spotlitPane === terminal.name && "ring-2 ring-accent ring-offset-2 ring-offset-background",
visibleMaximized && visibleMaximized !== id && "hidden")}>
<AgenticTerminal headerMode="compact" agent={terminal.agent}
name={terminal.name} workspaceId={session.id} displayName={terminal.display_name}
recap={terminal.recap} promptCount={terminal.prompts_sent} appearance={appearance ?? theme} fontSize={fontSize}
- focused={selected === terminal.name} onFocus={() => onSelect(terminal.name)}
+ focused={selected === terminal.name} onFocus={() => { if (spotlitPane && spotlitPane !== terminal.name) setSpotlight(null); onSelect(terminal.name); }}
maximized={visibleMaximized === id} onToggleMaximize={() => setMaximized((current) => current === id ? null : id)}
onArrangeStart={visibleMaximized || saving || disabled ? undefined : (event) => startDrag(id, event)} arranging={drag?.id === id}
onClose={() => onClose(terminal)} onAttachError={(message) => pushToast("error", message)}
onRename={(name) => rename(terminal, name)}
restartToken={restarts[id] ?? 0} onRestart={() => setRestarts((current) => ({ ...current, [id]: (current[id] ?? 0) + 1 }))}
- splitDisabled={tiles.length >= maxPanes} onSplit={(direction) => onAdd(terminal.name, direction)} />
+ splitDisabled={tiles.length >= 8} onSplit={(direction) => onAdd(terminal.name, direction)} />
{drag?.target?.id === id && <div aria-hidden="true" data-testid="dock-preview" data-position={drag.target.position}
className={cn("pointer-events-none absolute z-20 flex items-center justify-center rounded-xl border-2 p-2", drag.target.allowed ? "border-ring/70 bg-accent/[0.15]" : "border-destructive bg-background/80",
drag.target.position === "left" ? "inset-y-1 left-1 w-1/2" : drag.target.position === "right" ? "inset-y-1 right-1 w-1/2" : drag.target.position === "above" ? "inset-x-1 top-1 h-1/2" : drag.target.position === "below" ? "inset-x-1 bottom-1 h-1/2" : "inset-1")}>
- <span className="rounded-md bg-popover px-3 py-2 text-center text-xs font-medium text-popover-foreground shadow-lg">{drag.target.allowed ? DOCK_LABELS[drag.target.position] : `Maximum ${MAX_GRID_COLUMNS} columns × ${MAX_GRID_ROWS} rows`}</span>
+ <span className="rounded-md bg-popover px-3 py-2 text-center text-xs font-medium text-popover-foreground shadow-lg">{drag.target.allowed ? DOCK_LABELS[drag.target.position] : "Maximum 4 columns × 2 rows"}</span>
</div>}
</div>;
})}
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.tsx
index ae50e0dec0..56e86a54f0 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
@@ -3,6 +3,7 @@ import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { AgentsOverview } from "./AgentsOverview";
import { useIdeChatStore } from "@/store/ideChat";
import { useIdeProjectsStore } from "@/store/ideProjects";
+import { useIdeSidePanelStore } from "@/store/ideSidePanel";
import { resetWorkspacePanesPoll, useWorkspacePanesStore } from "@/store/workspacePanes";
import type { WorkspacePaneRow } from "@/lib/agenticIdeApi";
@@ -39,6 +40,7 @@ function pane(name: string, workspaceId: string, overrides: Partial<WorkspacePan
beforeEach(() => {
resetWorkspacePanesPoll();
+ useIdeSidePanelStore.setState({ spotlight: null });
useWorkspacePanesStore.setState({
panes: [
pane("T1", "w1", { activity: "working" }),
@@ -83,6 +85,8 @@ describe("AgentsOverview", () => {
expect(rows[2].getAttribute("data-kind")).toBe("idle");
expect(rows[0].textContent).toContain("T1");
expect(rows[0].textContent).toContain("Claude Code");
+ expect(rows[0].querySelector('[data-testid="agent-mark-claude"]')).not.toBeNull();
+ expect(rows[1].querySelector('[data-testid="agent-mark-codex"]')).not.toBeNull();
expect(rows[1].textContent).toContain("Codex");
});
@@ -112,10 +116,11 @@ describe("AgentsOverview", () => {
render(<AgentsOverview />);
fireEvent.click(screen.getByRole("button", { name: /T2, Codex/ }));
expect(useIdeChatStore.getState().paneRequest).toMatchObject({ workspaceId: "w1", pane: "T2" });
+ expect(useIdeSidePanelStore.getState().spotlight).toEqual({ workspaceId: "w1", pane: "T2" });
});
- it("highlights the staged pane", () => {
- useIdeChatStore.setState({ stagedPane: "T2" });
+ it("marks the card whose pane is spotlit", () => {
+ useIdeSidePanelStore.setState({ spotlight: { workspaceId: "w1", pane: "T2" } });
render(<AgentsOverview />);
const rows = screen.getAllByTestId("ide-workspace-agent-row");
expect(rows[1].getAttribute("aria-current")).toBe("true");
@@ -152,8 +157,7 @@ describe("AgentsOverview", () => {
});
render(<AgentsOverview />);
const row = screen.getByTestId("ide-workspace-agent-row");
- expect(screen.getByTestId("ide-agent-state").textContent).toBe("Working");
- expect(row.textContent).toContain("for 3m");
+ expect(screen.getByTestId("ide-agent-state").textContent).toBe("Working · 3m");
expect(screen.getByTestId("ide-agent-task").textContent).toBe("Fix the login test");
expect(row.textContent).toMatch(/Last output \d+s ago/);
});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx
index 916e748a3b..5b4f885494 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx
@@ -1,9 +1,12 @@
import { useEffect, useState } from "react";
import { fill, useT } from "@/i18n";
import { cn } from "@/lib/utils";
+import type { WorkspacePaneRow } from "@/lib/agenticIdeApi";
import { useIdeChatStore } from "@/store/ideChat";
import { useIdeProjectsStore } from "@/store/ideProjects";
+import { useIdeSidePanelStore } from "@/store/ideSidePanel";
import { useWorkspacePanes } from "@/store/workspacePanes";
+import { AgentMark } from "@/components/agentic/AgentMark";
import { sessionTitle } from "@/components/agentic/sessionTitle";
import {
DOT_STYLE,
@@ -15,7 +18,7 @@ import {
type AgentDotKind,
} from "./agentStatus";
-/** How often the "for 3m" readings move on; state changes arrive live anyway. */
+/** How often the "3m" readings move on; state changes arrive live anyway. */
const CLOCK_TICK_MS = 15_000;
function useClock(): number {
@@ -27,28 +30,31 @@ function useClock(): number {
return now;
}
-const SUMMARY_TONE: Record<AgentDotKind, string> = {
- waiting: "text-warning",
- working: "text-success",
- error: "text-destructive",
- idle: "text-muted-foreground",
+/** Ink and a faint fill per state, from the semantic status tokens only. */
+const STATE_TONE: Record<AgentDotKind, { text: string; pill: string }> = {
+ waiting: { text: "text-warning", pill: "bg-warning/10" },
+ working: { text: "text-success", pill: "bg-success/10" },
+ error: { text: "text-destructive", pill: "bg-destructive/10" },
+ idle: { text: "text-muted-foreground", pill: "bg-muted" },
};
/**
* What every coding agent of the workspace at the front is doing right now.
*
- * The side panel's Agents tab: a summary strip (how many work, wait on the
- * user, failed, sit idle) over one card per agent — its state and for how
- * long, the CLI behind it, what it was last asked, and when it last printed
- * anything. Rows stay live through the shared pane store (poll plus socket
- * activity events); a click asks the IDE view to bring that pane forward.
+ * The side panel's Agents tab: a strip of state counts over one card per
+ * agent. A card leads with the agent's brand mark — which CLI it is is the
+ * first thing to read — then its call-sign, its state and for how long, what
+ * it is working on, and when it last printed anything. Rows stay live through
+ * the shared pane store; a click brings the pane forward and frames it in the
+ * grid (the `spotlight`), so the card and its terminal are visibly one thing.
*/
export function AgentsOverview() {
const t = useT();
const now = useClock();
const activeWorkspaceId = useIdeProjectsStore((state) => state.activeWorkspaceId);
const requestPane = useIdeChatStore((state) => state.requestPane);
- const stagedPane = useIdeChatStore((state) => state.stagedPane);
+ const spotlight = useIdeSidePanelStore((state) => state.spotlight);
+ const setSpotlight = useIdeSidePanelStore((state) => state.setSpotlight);
const panes = useWorkspacePanes();
const mine = workspaceAgents(panes, activeWorkspaceId);
@@ -58,6 +64,11 @@ export function AgentsOverview() {
counts.set(kind, (counts.get(kind) ?? 0) + 1);
}
+ const pick = (pane: WorkspacePaneRow) => {
+ setSpotlight({ workspaceId: pane.workspace_id, pane: pane.name });
+ requestPane(pane.workspace_id, pane.name);
+ };
+
return (
<section
data-testid="ide-workspace-agents"
@@ -66,22 +77,28 @@ export function AgentsOverview() {
className="flex h-full min-h-0 flex-col"
>
{mine.length > 0 && (
- <div
- data-testid="ide-agents-summary"
- className="flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b border-border/60 px-4 py-2.5 text-xs"
- >
- <span
- data-testid="ide-workspace-agents-count"
- className="font-medium tabular-nums text-foreground"
- >
- {fill(t(mine.length === 1 ? "ide_side_panel.agents.count_one" : "ide_side_panel.agents.count_other"), { n: mine.length })}
- </span>
- {SUMMARY_ORDER.filter((kind) => counts.get(kind)).map((kind) => (
- <span key={kind} data-kind={kind} className={cn("flex items-center gap-1.5 tabular-nums", SUMMARY_TONE[kind])}>
- <span className={cn("h-1.5 w-1.5 rounded-full", DOT_STYLE[kind].dot)} aria-hidden="true" />
- {fill(t(`ide_side_panel.agents.summary.${kind}`), { n: counts.get(kind) ?? 0 })}
+ <div data-testid="ide-agents-summary" className="shrink-0 space-y-2 px-3 pb-2 pt-3">
+ <div className="flex items-baseline justify-between px-1">
+ <span data-testid="ide-workspace-agents-count" className="text-sm font-semibold text-foreground">
+ {fill(t(mine.length === 1 ? "ide_side_panel.agents.count_one" : "ide_side_panel.agents.count_other"), { n: mine.length })}
</span>
- ))}
+ </div>
+ <div className="flex flex-wrap gap-1.5">
+ {SUMMARY_ORDER.filter((kind) => counts.get(kind)).map((kind) => (
+ <span
+ key={kind}
+ data-kind={kind}
+ className={cn(
+ "inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium tabular-nums",
+ STATE_TONE[kind].pill,
+ STATE_TONE[kind].text,
+ )}
+ >
+ <span className={cn("h-1.5 w-1.5 rounded-full", DOT_STYLE[kind].dot)} aria-hidden="true" />
+ {fill(t(`ide_side_panel.agents.summary.${kind}`), { n: counts.get(kind) ?? 0 })}
+ </span>
+ ))}
+ </div>
</div>
)}
@@ -90,13 +107,15 @@ export function AgentsOverview() {
) : mine.length === 0 ? (
<p className="px-4 py-3 text-sm text-muted-foreground">{t("ide_side_panel.agents.empty")}</p>
) : (
- <ul className="scrollbar-jarvis min-h-0 flex-1 space-y-1 overflow-y-auto p-2">
+ <ul className="scrollbar-jarvis min-h-0 flex-1 space-y-2 overflow-y-auto px-3 pb-3 pt-1">
{mine.map((pane) => {
const kind = dotKindFor(pane);
const style = DOT_STYLE[kind];
+ const tone = STATE_TONE[kind];
const stateLabel = t(`ide_side_panel.agents.state.${stateKeyFor(pane, kind)}`);
const cli = pane.display_name || pane.agent;
- const selected = stagedPane !== null && pane.name === stagedPane;
+ const selected =
+ spotlight !== null && spotlight.workspaceId === pane.workspace_id && spotlight.pane === pane.name;
const since = compactSince(pane.activity_since, now);
const lastOutput = compactSince(pane.last_output_at, now);
const title = sessionTitle(pane);
@@ -105,46 +124,64 @@ export function AgentsOverview() {
<li key={pane.history_id}>
<button
type="button"
- onClick={() => requestPane(pane.workspace_id, pane.name)}
+ onClick={() => pick(pane)}
aria-label={`${pane.name}, ${cli}, ${stateLabel}`}
aria-current={selected ? "true" : undefined}
data-testid="ide-workspace-agent-row"
data-pane={pane.name}
data-kind={kind}
className={cn(
- "flex w-full flex-col gap-1 rounded-xl border border-transparent px-3 py-2.5 text-left transition-colors",
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring hover:bg-muted/70",
- selected && "border-border/60 bg-muted",
+ "group flex w-full flex-col gap-2.5 rounded-xl border p-3 text-left transition-[border-color,background-color,box-shadow] duration-150",
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
+ selected
+ ? "border-accent bg-accent/[0.06] ring-1 ring-accent/40"
+ : "border-border/60 bg-background/40 hover:border-border hover:bg-muted/50",
)}
>
- <span className="flex w-full items-center gap-2.5">
- <span className="relative flex h-2 w-2 shrink-0" aria-hidden="true">
- {style.ping && (
- <span className="absolute inset-0 animate-ping rounded-full bg-warning opacity-60 [animation-duration:1.8s] motion-reduce:hidden" />
- )}
- <span className={cn("relative h-2 w-2 rounded-full", style.dot)} />
+ <span className="flex w-full items-center gap-3">
+ <span className="relative shrink-0">
+ <AgentMark agent={pane.agent} label={cli} size="md" />
+ <span
+ aria-hidden="true"
+ className="absolute -bottom-0.5 -right-0.5 flex h-3 w-3 items-center justify-center rounded-full bg-card"
+ >
+ {style.ping && (
+ <span className="absolute inset-0.5 animate-ping rounded-full bg-warning opacity-60 [animation-duration:1.8s] motion-reduce:hidden" />
+ )}
+ <span className={cn("relative h-2 w-2 rounded-full", style.dot)} />
+ </span>
</span>
- <span className="min-w-0 truncate text-[15px] font-medium text-foreground">{pane.name}</span>
- <span className="min-w-0 flex-1 truncate text-xs text-muted-foreground">{cli}</span>
- </span>
- <span className="flex w-full items-center gap-1.5 pl-[18px] text-xs">
- <span data-testid="ide-agent-state" className={cn("font-medium", SUMMARY_TONE[kind])}>{stateLabel}</span>
- {since && (
- <span className="tabular-nums text-muted-foreground">
- · {fill(t("ide_side_panel.agents.for"), { time: since })}
+ <span className="flex min-w-0 flex-1 flex-col">
+ <span className="flex min-w-0 items-baseline gap-2">
+ <span className="shrink-0 text-sm font-semibold text-foreground">{pane.name}</span>
+ <span className="min-w-0 truncate text-xs text-muted-foreground">{cli}</span>
</span>
- )}
+ {lastOutput && (
+ <span className="text-[11px] tabular-nums text-muted-foreground">
+ {fill(t("ide_side_panel.agents.last_output"), { time: lastOutput })}
+ </span>
+ )}
+ </span>
+ <span
+ data-testid="ide-agent-state"
+ className={cn(
+ "shrink-0 rounded-md px-2 py-0.5 text-[11px] font-medium tabular-nums",
+ tone.pill,
+ tone.text,
+ )}
+ >
+ {stateLabel}
+ {since && <span className="opacity-70"> · {since}</span>}
+ </span>
</span>
{hasTitle && (
- <span data-testid="ide-agent-task" className="line-clamp-2 pl-[18px] text-xs text-foreground/80">
+ <span
+ data-testid="ide-agent-task"
+ className="line-clamp-2 w-full border-t border-border/50 pt-2 text-[13px] leading-snug text-foreground/85"
+ >
{title}
</span>
)}
- {lastOutput && (
- <span className="pl-[18px] text-[11px] tabular-nums text-muted-foreground">
- {fill(t("ide_side_panel.agents.last_output"), { time: lastOutput })}
- </span>
- )}
</button>
</li>
);
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index a76b20983a..265870b38b 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -5781,7 +5781,6 @@
"count_other": "{n} Agents",
"no_workspace": "Wähle einen Workspace, um seine Agents zu sehen.",
"empty": "In diesem Workspace laufen keine Agents.",
- "for": "seit {time}",
"last_output": "Letzte Ausgabe vor {time}",
"summary": {
"waiting": "{n} warten auf dich",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index d47359e11b..be7a402403 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -5814,7 +5814,6 @@
"count_other": "{n} agents",
"no_workspace": "Select a workspace to see its agents.",
"empty": "No agents running in this workspace.",
- "for": "for {time}",
"last_output": "Last output {time} ago",
"summary": {
"waiting": "{n} need input",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 0d200cf745..d1cb1e9955 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -5781,7 +5781,6 @@
"count_other": "{n} agentes",
"no_workspace": "Selecciona un espacio de trabajo para ver sus agentes.",
"empty": "No hay agentes en este espacio de trabajo.",
- "for": "desde hace {time}",
"last_output": "Última salida hace {time}",
"summary": {
"waiting": "{n} esperan tu respuesta",
diff --git a/jarvis/ui/web/frontend/src/store/ideSidePanel.ts b/jarvis/ui/web/frontend/src/store/ideSidePanel.ts
index 3b506c5d3f..a1592f1968 100644
--- a/jarvis/ui/web/frontend/src/store/ideSidePanel.ts
+++ b/jarvis/ui/web/frontend/src/store/ideSidePanel.ts
@@ -54,6 +54,15 @@ function persist(open: boolean, tabs: SidePanelTabId[], active: SidePanelTabId):
}
}
+/**
+ * The pane an agent card pointed at: the grid frames it in the signal blue
+ * until the user focuses another pane, picks another card, or closes the panel.
+ */
+export interface PaneSpotlight {
+ workspaceId: string;
+ pane: string;
+}
+
interface IdeSidePanelState {
open: boolean;
tabs: SidePanelTabId[];
@@ -65,6 +74,8 @@ interface IdeSidePanelState {
select: (id: SidePanelTabId) => void;
/** Closing the last tab collapses the panel; reopening starts fresh. */
closeTab: (id: SidePanelTabId) => void;
+ spotlight: PaneSpotlight | null;
+ setSpotlight: (spotlight: PaneSpotlight | null) => void;
}
const initialTabs = storedTabs();
@@ -79,7 +90,12 @@ export const useIdeSidePanelStore = create<IdeSidePanelState>((set, get) => {
open: storedOpen(),
tabs: initialTabs.tabs,
active: initialTabs.active,
- setOpen: (open) => commit({ open }),
+ spotlight: null,
+ setSpotlight: (spotlight) => set({ spotlight }),
+ setOpen: (open) => {
+ if (!open) set({ spotlight: null });
+ commit({ open });
+ },
toggle: () => get().setOpen(!get().open),
openTab: (id) => {
const { tabs } = get();
@@ -94,6 +110,7 @@ export const useIdeSidePanelStore = create<IdeSidePanelState>((set, get) => {
if (index < 0) return;
const rest = tabs.filter((tab) => tab !== id);
if (rest.length === 0) {
+ set({ spotlight: null });
commit({ open: false, tabs: DEFAULT_TABS, active: DEFAULT_TABS[0] });
return;
}