Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(views): label text steps correctly in run details (#9153)
xjh5acefb6dcc68
diff --git a/packages/views/common/task-transcript/agent-transcript-dialog.test.tsx b/packages/views/common/task-transcript/agent-transcript-dialog.test.tsxindex 9540b8bc83..17bc4094e5 100644--- a/packages/views/common/task-transcript/agent-transcript-dialog.test.tsx+++ b/packages/views/common/task-transcript/agent-transcript-dialog.test.tsx@@ -249,6 +249,27 @@ afterEach(() => {});describe("AgentTranscriptDialog", () => {+ it.each([+ { type: "text", label: "Agent", icon: ".lucide-bot" },+ { type: "thinking", label: "Thinking", icon: ".lucide-brain" },+ { type: "error", label: "Error", icon: ".lucide-circle-alert" },+ ] as const)("labels a $type step correctly when opened from the timeline", ({ type, label, icon }) => {+ renderDialog([+ { seq: 1, type, content: "Final delivered reply", created_at: baseTask.started_at! },+ ]);++ fireEvent.click(screen.getByRole("button", { name: "Model 1m 00s" }));++ const inspector = screen.getByRole("complementary");+ expect(within(inspector).getByRole("heading", { name: label })).toBeInTheDocument();+ expect(inspector.querySelector(icon)).not.toBeNull();+ expect(inspector).toHaveTextContent("Final delivered reply");+ if (type === "text") {+ expect(within(inspector).queryByText("Error")).not.toBeInTheDocument();+ expect(inspector.querySelector(".text-destructive, .bg-destructive")).toBeNull();+ }+ });+it("shows what was asked, whole, under the header", () => {// The lists that open this dialog cut the ask to one line; here it wraps.const ask = "Merge the three split-out sub-issues back into this PR & ship conditions, history and runaway protection together";@@ -260,6 +281,24 @@ describe("AgentTranscriptDialog", () => {).toBeInTheDocument();});+ it.each([+ { locale: "en", label: "Agent", model: "Model" },+ { locale: "zh-Hans", label: "智能体", model: "模型" },+ { locale: "ja", label: "エージェント", model: "モデル" },+ { locale: "ko", label: "에이전트", model: "모델" },+ { locale: "fr", label: "Agent", model: "Modèle" },+ ] as const)("localizes the text step inspector in $locale", ({ locale, label, model }) => {+ renderDialog([+ { seq: 1, type: "text", content: "Final delivered reply", created_at: baseTask.started_at! },+ ], { locale });++ fireEvent.click(screen.getByRole("button", { name: `${model} 1m 00s` }));++ const inspector = screen.getByRole("complementary");+ expect(within(inspector).getByRole("heading", { name: label })).toBeInTheDocument();+ expect(inspector.firstElementChild).toHaveTextContent(label);+ });+it("has no trigger row for a run with no snapshot", () => {renderDialog(items, { task: { ...baseTask, trigger_summary: undefined } });expect(screen.queryByText("Trigger")).not.toBeInTheDocument();diff --git a/packages/views/common/task-transcript/agent-transcript-dialog.tsx b/packages/views/common/task-transcript/agent-transcript-dialog.tsxindex 1354cad2dc..ac6b1447df 100644--- a/packages/views/common/task-transcript/agent-transcript-dialog.tsx+++ b/packages/views/common/task-transcript/agent-transcript-dialog.tsx@@ -1734,7 +1734,9 @@ function StepInspector({? call.tool || t(($) => $.transcript.kind_tool): step.kind === "thinking"? t(($) => $.transcript.kind_thinking)- : t(($) => $.transcript.kind_error);+ : step.kind === "text"+ ? t(($) => $.transcript.kind_text)+ : t(($) => $.transcript.kind_error);return (<aside className="flex w-[26rem] shrink-0 flex-col border-l bg-muted/25">diff --git a/packages/views/locales/en/agents.json b/packages/views/locales/en/agents.jsonindex 102c533f45..b70531df0f 100644--- a/packages/views/locales/en/agents.json+++ b/packages/views/locales/en/agents.json@@ -891,6 +891,7 @@"search_placeholder": "Search this run…","no_matches": "No steps match this search.","more_actions": "More",+ "kind_text": "Agent","kind_tool": "Tool","kind_thinking": "Thinking","kind_error": "Error",diff --git a/packages/views/locales/fr/agents.json b/packages/views/locales/fr/agents.jsonindex d8da015ac9..56a4acf89c 100644--- a/packages/views/locales/fr/agents.json+++ b/packages/views/locales/fr/agents.json@@ -891,6 +891,7 @@"search_placeholder": "Rechercher dans cette exécution…","no_matches": "Aucune étape ne correspond à cette recherche.","more_actions": "Plus",+ "kind_text": "Agent","kind_tool": "Outil","kind_thinking": "Réflexion","kind_error": "Erreur",diff --git a/packages/views/locales/ja/agents.json b/packages/views/locales/ja/agents.jsonindex fa15b07f02..94536f9ee8 100644--- a/packages/views/locales/ja/agents.json+++ b/packages/views/locales/ja/agents.json@@ -772,6 +772,7 @@"search_placeholder": "この実行を検索…","no_matches": "一致するステップはありません。","more_actions": "その他",+ "kind_text": "エージェント","kind_tool": "ツール","kind_thinking": "思考","kind_error": "エラー",diff --git a/packages/views/locales/ko/agents.json b/packages/views/locales/ko/agents.jsonindex ce16757513..e80ea7760f 100644--- a/packages/views/locales/ko/agents.json+++ b/packages/views/locales/ko/agents.json@@ -780,6 +780,7 @@"search_placeholder": "이 작업 검색…","no_matches": "검색과 일치하는 단계가 없습니다.","more_actions": "더보기",+ "kind_text": "에이전트","kind_tool": "도구","kind_thinking": "사고","kind_error": "오류",diff --git a/packages/views/locales/zh-Hans/agents.json b/packages/views/locales/zh-Hans/agents.jsonindex 69c29cf472..54de8b7f27 100644--- a/packages/views/locales/zh-Hans/agents.json+++ b/packages/views/locales/zh-Hans/agents.json@@ -874,6 +874,7 @@"search_placeholder": "搜索这次运行…","no_matches": "没有匹配的步骤。","more_actions": "更多",+ "kind_text": "智能体","kind_tool": "工具","kind_thinking": "思考","kind_error": "错误",