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(self-build): open a code build's coding thread from its build detail (#788)

Ruben Lütkec5bdc3c280a7
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/self_build/de.json b/dodaios/ui/web/frontend/src/i18n/locales/self_build/de.json
index 4dd1ad818a..e09dffac94 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/self_build/de.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/self_build/de.json
@@ -98,6 +98,8 @@
"made": "Was es gebaut hat",
"made_none": "Es existiert noch nichts.",
"open_link": "Öffnen",
+ "open_thread": "Coding-Thread öffnen",
+ "open_thread_title": "Jeden Schritt des Coding-Agents in der Agentic IDE nachlesen",
"use": "Nutzung",
"uses": "{count} Nutzungen",
"unused": "Noch nicht genutzt.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/self_build/en.json b/dodaios/ui/web/frontend/src/i18n/locales/self_build/en.json
index 9ee989e824..0ee1cb08d0 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/self_build/en.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/self_build/en.json
@@ -98,6 +98,8 @@
"made": "What it made",
"made_none": "Nothing exists yet.",
"open_link": "Open",
+ "open_thread": "Open the coding thread",
+ "open_thread_title": "Read every step the coding agent took in the Agentic IDE",
"use": "Use",
"uses": "{count} uses",
"unused": "Not used yet.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/self_build/es.json b/dodaios/ui/web/frontend/src/i18n/locales/self_build/es.json
index 1e9e914d6e..46c63b4c40 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/self_build/es.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/self_build/es.json
@@ -98,6 +98,8 @@
"made": "Lo que construyó",
"made_none": "Todavía no existe nada.",
"open_link": "Abrir",
+ "open_thread": "Abrir el hilo de código",
+ "open_thread_title": "Lee cada paso del agente de código en el Agentic IDE",
"use": "Uso",
"uses": "{count} usos",
"unused": "Todavía sin usar.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/self_build/pt.json b/dodaios/ui/web/frontend/src/i18n/locales/self_build/pt.json
index 6a0adfb026..045384aebe 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/self_build/pt.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/self_build/pt.json
@@ -98,6 +98,8 @@
"made": "O que construiu",
"made_none": "Ainda não existe nada.",
"open_link": "Abrir",
+ "open_thread": "Abrir a conversa de código",
+ "open_thread_title": "Lê cada passo do agente de código no Agentic IDE",
"use": "Utilização",
"uses": "{count} utilizações",
"unused": "Ainda não utilizado.",
diff --git a/dodaios/ui/web/frontend/src/i18n/locales/self_build/zh.json b/dodaios/ui/web/frontend/src/i18n/locales/self_build/zh.json
index 9c3ad41660..eab8176871 100644
--- a/dodaios/ui/web/frontend/src/i18n/locales/self_build/zh.json
+++ b/dodaios/ui/web/frontend/src/i18n/locales/self_build/zh.json
@@ -98,6 +98,8 @@
"made": "它构建了什么",
"made_none": "还没有任何东西。",
"open_link": "打开",
+ "open_thread": "打开编码线程",
+ "open_thread_title": "在 Agentic IDE 中查看编码代理的每一步",
"use": "使用",
"uses": "{count} 次使用",
"unused": "尚未使用。",
diff --git a/dodaios/ui/web/frontend/src/lib/selfBuildApi.ts b/dodaios/ui/web/frontend/src/lib/selfBuildApi.ts
index d225f10135..8fabe9db41 100644
--- a/dodaios/ui/web/frontend/src/lib/selfBuildApi.ts
+++ b/dodaios/ui/web/frontend/src/lib/selfBuildApi.ts
@@ -40,6 +40,8 @@ export interface BuildArtefact {
branch?: string;
number?: number;
draft?: boolean;
+ /** Code builds: the agent-chat session id of the coding run (an Agentic IDE thread). */
+ thread?: string;
[key: string]: unknown;
}
diff --git a/dodaios/ui/web/frontend/src/views/SelfBuildView.test.tsx b/dodaios/ui/web/frontend/src/views/SelfBuildView.test.tsx
index f3badada07..6addabe6a4 100644
--- a/dodaios/ui/web/frontend/src/views/SelfBuildView.test.tsx
+++ b/dodaios/ui/web/frontend/src/views/SelfBuildView.test.tsx
@@ -10,6 +10,8 @@ import { cleanup, fireEvent, render, screen, waitFor, within } from "@testing-li
import { SelfBuildView } from "@/views/SelfBuildView";
import { BuiltByBadge } from "@/components/selfBuild/BuiltByBadge";
+import { BuildDetail } from "@/views/selfBuild/BuildDetail";
+import { useIdeThreadsStore } from "@/store/ideThreads";
import { loadLocaleChunk, setUiLanguage } from "@/i18n";
import { useEventStore } from "@/store/events";
import { useSelfBuildFocus } from "@/store/selfBuildFocus";
@@ -258,4 +260,33 @@ describe("BuildDetail for code", () => {
expect(within(detail).getByText("draft pull request")).toBeTruthy();
expect(within(detail).getByRole("link", { name: /open/i }).getAttribute("href")).toBe("https://github.com/octo/app/pull/7");
});
+
+ it("opens the build's coding thread in the Agentic IDE", async () => {
+ installFetch();
+ const coding = build({
+ id: "c1",
+ kind: "code",
+ state: "proving",
+ title: "Add a greeting",
+ artefact: { type: "code", id: "", repo: "octo/app", branch: "dodaios/issue-3-add-a-greeting", stage: "pushed", thread: "sess-42" },
+ });
+ renderWith(
+ <BuildDetail build={coding} limits={undefined} canBuild busy={false} onAction={() => {}} onClose={() => {}} />,
+ );
+ const open = await screen.findByTestId("build-open-thread");
+ expect(open.textContent).toContain("Open the coding thread");
+ fireEvent.click(open);
+ expect(useIdeThreadsStore.getState().selection.sessionId).toBe("sess-42");
+ expect(useIdeThreadsStore.getState().layout).toBe("threads");
+ expect(useEventStore.getState().activeSection).toBe("agentic-ide");
+ });
+
+ it("offers no thread link for a code build without a coding thread", async () => {
+ installFetch();
+ renderWith(
+ <BuildDetail build={BUILDS[4]} limits={undefined} canBuild busy={false} onAction={() => {}} onClose={() => {}} />,
+ );
+ await screen.findByTestId("build-detail");
+ expect(screen.queryByTestId("build-open-thread")).toBeNull();
+ });
});
diff --git a/dodaios/ui/web/frontend/src/views/selfBuild/BuildDetail.tsx b/dodaios/ui/web/frontend/src/views/selfBuild/BuildDetail.tsx
index 8ddea0609a..45bf8de0e8 100644
--- a/dodaios/ui/web/frontend/src/views/selfBuild/BuildDetail.tsx
+++ b/dodaios/ui/web/frontend/src/views/selfBuild/BuildDetail.tsx
@@ -5,11 +5,12 @@
* made — with the one or two actions that apply to it right now.
*/
import type { ReactNode } from "react";
-import { ExternalLink, Loader2, X } from "lucide-react";
+import { Code2, ExternalLink, Loader2, X } from "lucide-react";
import { fill, useT } from "@/i18n";
import { useRunLocale, fmtInt } from "@/components/runs/format";
import { cn } from "@/lib/utils";
import { useSelfBuildDetail } from "@/hooks/useSelfBuild";
+import { openCodingThread } from "@/components/agentic/threads/openCodingThread";
import { reachedStep, trialProgress, type Build, type BuildOutcome } from "@/lib/selfBuildApi";
import { KindIcon, LifecycleRail, formatUsd, relativeTime } from "./shared";
import { BuildActions, type ActionHandler } from "./BuildActions";
@@ -53,6 +54,8 @@ export function BuildDetail({
const proof = current.proof ?? {};
const hasProof = typeof proof.passed === "boolean";
const artefact = current.artefact ?? {};
+ // A code build's coding run is a thread in the Agentic IDE: every step it took.
+ const thread = artefact.type === "code" && typeof artefact.thread === "string" ? artefact.thread.trim() : "";
const outcomes = OUTCOMES.filter((o) => (current.outcomes[o] ?? 0) > 0);
return (
@@ -160,6 +163,18 @@ export function BuildDetail({
<ExternalLink className="h-3.5 w-3.5" aria-hidden />
</a>
)}
+ {thread && (
+ <button
+ type="button"
+ onClick={() => openCodingThread(thread)}
+ title={t("self_build.detail.open_thread_title")}
+ data-testid="build-open-thread"
+ className="inline-flex shrink-0 items-center gap-1 rounded-sm text-sm text-accent hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ >
+ {t("self_build.detail.open_thread")}
+ <Code2 className="h-3.5 w-3.5" aria-hidden />
+ </button>
+ )}
</p>
) : (
<Quiet>{t("self_build.detail.made_none")}</Quiet>