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
fix(ide): show every agent of the folder in the Agents tab by default (#876)
Ruben Lütked1bec3f12e9d
diff --git a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsx b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsxindex 588eea2b86..5ba3a17083 100644--- a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsx+++ b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.test.tsx@@ -43,7 +43,8 @@ function pane(name: string, workspaceId: string, overrides: Partial<WorkspacePan}beforeEach(() => {- localStorage.removeItem("jarvis.agenticIde.agentsScope");+ // Most cases read one workspace; the default (whole folder) has its own cases.+ localStorage.setItem("jarvis.agenticIde.agentsScope.v2", "workspace");resetWorkspacePanesPoll();useIdeSidePanelStore.setState({ spotlight: null });usePaneReviewsStore.setState({ reviewed: {} });@@ -179,6 +180,31 @@ describe("AgentsOverview", () => {expect(screen.getByTestId("ide-workspace-agents").textContent).toContain("No agents");});+ it("lists the whole folder by default, with a count on each scope", () => {+ localStorage.removeItem("jarvis.agenticIde.agentsScope.v2");+ useWorkspacePanesStore.setState({+ panes: [+ pane("T1", "w1", { activity: "working" }),+ pane("T1", "w2", { activity: "working", workspace_name: "Blog" }),+ pane("T2", "w2", { activity: "waiting", workspace_name: "Blog" }),+ pane("T1", "w3", { activity: "working", folder: "/code/other" }),+ ],+ });+ render(<AgentsOverview />);+ expect(screen.getByTestId("ide-agents-scope-folder").getAttribute("aria-checked")).toBe("true");+ expect(screen.getAllByTestId("ide-workspace-agent-row")).toHaveLength(3);+ expect(screen.getByTestId("ide-agents-scope-count-folder").textContent).toBe("3");+ expect(screen.getByTestId("ide-agents-scope-count-workspace").textContent).toBe("1");+ });++ it("shows a loading state instead of an empty list before the first answer", () => {+ useWorkspacePanesStore.setState({ panes: [], loaded: false });+ render(<AgentsOverview />);+ expect(screen.getByTestId("ide-agents-loading")).toBeTruthy();+ expect(screen.getByTestId("ide-workspace-agents").textContent).not.toContain("No agents");+ expect(screen.queryByTestId("ide-agents-scope-count-folder")).toBeNull();+ });+it("widens to every workspace of the folder and remembers the choice", () => {useWorkspacePanesStore.setState({panes: [diff --git a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsxindex 12f6076e7e..9e26f6d648 100644--- a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx+++ b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/AgentsOverview.tsx@@ -6,7 +6,7 @@ import { useEventStore } from "@/store/events";import { useIdeChatStore } from "@/store/ideChat";import { useIdeProjectsStore } from "@/store/ideProjects";import { useIdeSidePanelStore } from "@/store/ideSidePanel";-import { useWorkspacePanes } from "@/store/workspacePanes";+import { useWorkspacePanes, useWorkspacePanesStore } from "@/store/workspacePanes";import { usePaneReviewsStore } from "@/store/paneReviews";import { AgentMark } from "@/components/agentic/AgentMark";import { paneTitleFrom, recapsFor, usePaneRecapPoll, usePaneRecapsStore } from "@/store/paneRecaps";@@ -39,18 +39,23 @@ function useClock(): number {return now;}-const SCOPE_KEY = "jarvis.agenticIde.agentsScope";+// v2: the default moved from this workspace to the whole folder, so a choice+// stored under the old default does not keep hiding most agents.+const SCOPE_KEY = "jarvis.agenticIde.agentsScope.v2";const SCOPES: readonly AgentScope[] = ["workspace", "folder"];function storedScope(): AgentScope {try {- return localStorage.getItem(SCOPE_KEY) === "folder" ? "folder" : "workspace";+ return localStorage.getItem(SCOPE_KEY) === "workspace" ? "workspace" : "folder";} catch {- return "workspace";+ return "folder";}}-/** The tab's own filter, remembered per browser: this workspace, or its whole folder. */+/**+ * The tab's own filter, remembered per browser: the whole folder (the default,+ * so every running agent shows up) or just the workspace at the front.+ */function useAgentScope(): [AgentScope, (scope: AgentScope) => void] {const [scope, setScope] = useState<AgentScope>(storedScope);const choose = (next: AgentScope) => {@@ -84,7 +89,7 @@ const COLUMN_TONE: Record<AgentColumn, string> = {};/**- * What every coding agent of the workspace at the front is doing right now.+ * What every coding agent of the project folder is doing right now.** The side panel's Agents tab, in three columns top to bottom: Done (finished* and not looked at yet — what needs the user), Working, and Reviewed (a@@ -92,8 +97,8 @@ const COLUMN_TONE: Record<AgentColumn, string> = {* `store/paneReviews`). A card leads with the agent's brand mark, then its* goal, its state and for how long, and when it last printed anything. A click* brings the pane forward, frames it in the grid (the `spotlight`) and counts- * as reviewing it. A switch at the top widens the list from the workspace at- * the front to every workspace of its project folder; a card from another+ * as reviewing it. A switch at the top picks every workspace of the project+ * folder (the default) or only the workspace at the front; a card from another* workspace names it, and its click brings that workspace forward.*/export function AgentsOverview() {@@ -104,6 +109,7 @@ export function AgentsOverview() {const spotlight = useIdeSidePanelStore((state) => state.spotlight);const setSpotlight = useIdeSidePanelStore((state) => state.setSpotlight);const panes = useWorkspacePanes();+ const loaded = useWorkspacePanesStore((state) => state.loaded);usePaneRecapPoll();const recaps = usePaneRecapsStore((state) => state);const [scope, setScope] = useAgentScope();@@ -112,10 +118,11 @@ export function AgentsOverview() {state.projects.flatMap((project) => project.workspaces).find((workspace) => workspace.id === activeWorkspaceId)?.folder ?? null,);- const mine =- scope === "folder"- ? folderAgents(panes, activeWorkspaceId, activeFolder)- : workspaceAgents(panes, activeWorkspaceId);+ const scoped: Record<AgentScope, WorkspacePaneRow[]> = {+ workspace: workspaceAgents(panes, activeWorkspaceId),+ folder: folderAgents(panes, activeWorkspaceId, activeFolder),+ };+ const mine = scoped[scope];const reviewed = usePaneReviewsStore((state) => state.reviewed);const markReviewed = usePaneReviewsStore((state) => state.markReviewed);const pushToast = useEventStore((state) => state.pushToast);@@ -270,6 +277,11 @@ export function AgentsOverview() {)}>{t(`ide_side_panel.agents.scope.${option}`)}+ {loaded && (+ <span data-testid={`ide-agents-scope-count-${option}`} className="ml-1.5 tabular-nums opacity-70">+ {scoped[option].length}+ </span>+ )}</button>))}</div>@@ -330,6 +342,15 @@ export function AgentsOverview() {)}{matches.length > 0 && <ul className="space-y-2">{matches.map(card)}</ul>}</div>+ ) : !loaded ? (+ <p+ role="status"+ data-testid="ide-agents-loading"+ className="flex items-center gap-2 px-4 py-3 text-sm text-muted-foreground"+ >+ <Loader2 aria-hidden className="h-4 w-4 shrink-0 animate-spin motion-reduce:animate-none" />+ {t("ide_side_panel.agents.loading")}+ </p>) : mine.length === 0 ? (<p className="px-4 py-3 text-sm text-muted-foreground">{t(scope === "folder" ? "ide_side_panel.agents.empty_folder" : "ide_side_panel.agents.empty")}diff --git a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/IdeSidePanelToggle.tsx b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/IdeSidePanelToggle.tsxindex d06cf4f9a7..93c1d5d59d 100644--- a/dodaios/ui/web/frontend/src/components/agentic/sidePanel/IdeSidePanelToggle.tsx+++ b/dodaios/ui/web/frontend/src/components/agentic/sidePanel/IdeSidePanelToggle.tsx@@ -22,8 +22,10 @@ export function IdeSidePanelToggle({ className }: { className?: string }) {const open = useIdeSidePanelStore((state) => state.open);const setOpen = useIdeSidePanelStore((state) => state.setOpen);const activeWorkspaceId = useIdeProjectsStore((state) => state.activeWorkspaceId);- // An open panel shows its agents itself; only a shut one needs the count.- const panes = useWorkspacePanes(!open);+ // Always subscribed: the caption is on screen whenever the IDE is, so the one+ // shared pane poll stays warm and the Agents tab opens with its list ready+ // instead of waiting for a first answer. Only a shut panel needs the count.+ const panes = useWorkspacePanes();const waiting = open ? 0 : workspaceAgents(panes, activeWorkspaceId).filter((pane) => dotKindFor(pane) === "waiting").length;const action = t(open ? "ide_side_panel.collapse" : "ide_side_panel.expand");const label = waiting > 0 ? `${action} (${fill(t("ide_side_panel.rail_waiting"), { n: waiting })})` : action;diff --git a/dodaios/ui/web/frontend/src/i18n/locales/de.json b/dodaios/ui/web/frontend/src/i18n/locales/de.jsonindex 62c9ef7598..25eca157f2 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/de.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/de.json@@ -8555,6 +8555,7 @@"no_workspace": "Wähle einen Workspace, um seine Agents zu sehen.","empty": "In diesem Workspace laufen keine Agents.","empty_folder": "In diesem Ordner laufen keine Agents.",+ "loading": "Agents werden geladen…","scope": {"aria": "Agents anzeigen aus","workspace": "Dieser Space",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/en.json b/dodaios/ui/web/frontend/src/i18n/locales/en.jsonindex 3e77769141..b1f062294e 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/en.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/en.json@@ -8555,6 +8555,7 @@"no_workspace": "Select a workspace to see its agents.","empty": "No agents running in this workspace.","empty_folder": "No agents running in this folder.",+ "loading": "Loading agents…","scope": {"aria": "Show agents from","workspace": "This space",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/es.json b/dodaios/ui/web/frontend/src/i18n/locales/es.jsonindex 9b05d9dd09..39ae54520b 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/es.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/es.json@@ -8555,6 +8555,7 @@"no_workspace": "Selecciona un espacio de trabajo para ver sus agentes.","empty": "No hay agentes en este espacio de trabajo.","empty_folder": "No hay agentes en esta carpeta.",+ "loading": "Cargando agentes…","scope": {"aria": "Mostrar agentes de","workspace": "Este espacio",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/pt.json b/dodaios/ui/web/frontend/src/i18n/locales/pt.jsonindex d5476191f5..9f71a4a607 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/pt.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/pt.json@@ -8555,6 +8555,7 @@"no_workspace": "Seleciona um workspace para ver os agentes.","empty": "Nenhum agente em execução neste workspace.","empty_folder": "Nenhum agente em execução nesta pasta.",+ "loading": "Carregando agentes…","scope": {"aria": "Mostrar agentes de","workspace": "Este espaço",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/zh.json b/dodaios/ui/web/frontend/src/i18n/locales/zh.jsonindex ccc4a4dcb2..334cb74368 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/zh.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/zh.json@@ -8555,6 +8555,7 @@"no_workspace": "选择一个工作区以查看其智能体。","empty": "此工作区中没有正在运行的智能体。","empty_folder": "此文件夹中没有正在运行的智能体。",+ "loading": "正在加载智能体…","scope": {"aria": "显示智能体的范围","workspace": "此空间",