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(agents): rounds count from one in the verdict, and "Open output" only exists when there is an output

rubenluetke10-beepfce33545078e
diff --git a/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.test.tsx b/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.test.tsx
index 94a5219140..e2da3e8373 100644
--- a/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.test.tsx
@@ -170,7 +170,8 @@ describe("AgentInsight", () => {
// Quoted in the verdict AND in the story's kill entry — both on purpose.
expect(screen.getAllByText("You've reached your limit.").length).toBeGreaterThanOrEqual(2);
// The kill and where in the pipeline it broke.
- expect(screen.getByText("Worker (round 0) stopped")).toBeTruthy();
+ // Rounds are 1-based for people; the worker id says iter0.
+ expect(screen.getByText("Worker (round 1) stopped")).toBeTruthy();
expect(screen.getByText("budget or provider quota")).toBeTruthy();
// The story timeline lands on the failure by default for a failed run.
expect(await screen.findByText("Worker started · claude · round 1")).toBeTruthy();
diff --git a/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.tsx b/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.tsx
index 3b69749859..84a5d521f5 100644
--- a/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.tsx
+++ b/jarvis/ui/web/frontend/src/views/sub-agents/AgentInsight.tsx
@@ -229,10 +229,15 @@ export function AgentInsight({ agent, onBack, onOpenOutput }: Props) {
{t("subagents_view.action_map")}
</SoftButton>
)}
- <SoftButton primary disabled={!slug} onClick={() => slug && onOpenOutput(slug)}>
- <ArrowUpRight className="h-3.5 w-3.5" />
- {t("subagents_view.action_open_output")}
- </SoftButton>
+ {/* Only while the output directory exists: a bright primary
+ button that cannot do anything reads as broken, and the
+ tab bar already says the directory is gone. */}
+ {slug && (
+ <SoftButton primary onClick={() => onOpenOutput(slug)}>
+ <ArrowUpRight className="h-3.5 w-3.5" />
+ {t("subagents_view.action_open_output")}
+ </SoftButton>
+ )}
</>
}
/>
@@ -414,12 +419,14 @@ export function outcomeLines(agent: SubAgentNode, outcome: AgentOutcome, t: T):
lines.push({ id: "provider", tone: "neutral", label: t("subagents_view.line_provider"), text: outcome.failed_provider });
}
for (const kill of outcome.kills) {
+ // Rounds are numbered from 1 everywhere the page speaks to a person;
+ // the worker id carries the 0-based iteration.
const iter = /::iter(\d+)$/.exec(kill.worker_id)?.[1];
lines.push({
id: `kill-${kill.worker_id}`,
tone: kill.reason === "user" ? "warn" : "error",
label: iter != null
- ? fill(t("subagents_view.line_worker_stopped_iter"), { n: iter })
+ ? fill(t("subagents_view.line_worker_stopped_iter"), { n: Number(iter) + 1 })
: t("subagents_view.line_worker_stopped"),
text: kill.error_detail && kill.error_detail !== outcome.error_detail
? `${killLabel(kill.reason, t)} — ${kill.error_detail}`