The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 07:15 UTC
fix(web): Background work details show a subagent as Waiting, like the line above (#38763)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Noah Sigel committed
Nov 18, 2026 at 18:48 UTC
eb46038e3aea160fc8e21ab3f7b0aeb0fbf11773
2 files changed
+34
-1
apps/web/src/components/chat/BackgroundWorkDetails.browser.test.tsx
+32
@@ -95,3 +95,35 @@ it("opens full command details for short labels and keeps pending tasks current"
95
await page.getByRole("button", { name: "Close", exact: true }).click();
96
await expect.element(page.getByRole("dialog")).not.toBeInTheDocument();
97
});
98
+
99
+it("gives a subagent the same status as the background work line", async () => {
100
+ await using screen = await render(
101
+ <ThreadNow
102
+ attention={null}
103
+ syncPhase={null}
104
+ goal={null}
105
+ work={backgroundWorkNowItem({
106
+ environmentId: EnvironmentId.make("test"),
107
+ threadId: ThreadId.make("thread"),
108
+ tasks: [
109
+ {
110
+ taskId: "subagent-task",
111
+ kind: "subagent",
112
+ description: "Review refactor diffs",
113
+ childThreadId: ThreadId.make("child"),
114
+ },
115
+ ],
116
+ turnItems: [],
117
+ stopDisabled: false,
118
+ stopping: false,
119
+ onStop: async () => undefined,
120
+ onOpenThread: () => undefined,
121
+ })}
122
+ />,
123
+ );
124
+ await expect.element(page.getByText("Waiting · Review refactor diffs")).toBeVisible();
125
+ await screen.getByRole("button", { name: "Details", exact: true }).click();
126
+ await expect
127
+ .element(page.getByRole("dialog").getByText("Waiting", { exact: true }))
128
+ .toBeVisible();
129
+});
apps/web/src/components/chat/BackgroundWorkDetails.tsx
+2
-1
@@ -4,6 +4,7 @@ import type {
4
ThreadId,
5
} from "@t3tools/contracts";
6
import type { ThreadStructure } from "@t3tools/client-runtime/state/shell";
7
+import { backgroundWorkHoldsCompletion } from "@t3tools/shared/orchestrationV2PendingBackgroundWork";
8
import { T, useGT } from "gt-react";
9
import { useState } from "react";
10
@@ -79,7 +80,7 @@ export function BackgroundWorkDetails(props: {
80
<div className="flex items-baseline justify-between gap-3">
81
<h3 className="font-medium">{title}</h3>
82
<span className="shrink-0 text-xs text-muted-foreground">
82
- {task.awaited
83
+ {backgroundWorkHoldsCompletion([task])
84
? gt("Waiting", { $context: "status of background work" })
85
: gt("Running", { $context: "status of background work" })}
86
</span>