@devries-cameron20 / t3code Mirror · read-only / commits / 4a90c1cf5d
Fork 0

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 23, 14:15 UTC

fix(web): keep queued threads subscribed (#15293)

Co-authored-by: maria <maria@kuuro.net>

ANSH SINGH committed Oct 12, 2026 at 07:11 UTC 4a90c1cf5db5f25893827643fb32d3304dddcdd9
2 files changed +8 -2
apps/web/src/state/threads.test.ts
+7 -1
@@ -19,7 +19,7 @@ import { createRunningThreadKeepAliveAtom } from "./threads";
19 const LOCAL = EnvironmentId.make("local");
20 const REMOTE = EnvironmentId.make("remote");
21
22 -type Status = "running" | "starting" | "idle";
22 +type Status = "running" | "starting" | "preparing" | "queued" | "waiting" | "idle";
23 function shell(id: string, status: Status | null) {
24 return { id: ThreadId.make(id), status: status ?? "idle" } satisfies Pick<
25 OrchestrationV2ThreadShell,
@@ -159,6 +159,12 @@ describe("createRunningThreadKeepAliveAtom", () => {
159 expect(h.openStreams()).toEqual([]);
160 });
161
162 + it("keeps queued threads open", () => {
163 + const h = makeHarness();
164 + h.registry.set(h.threads(LOCAL), [shell("a", "queued")]);
165 + expect(h.openStreams()).toEqual(["local:a"]);
166 + });
167 +
168 it("follows environments that connect and go away", () => {
169 const h = makeHarness();
170 h.registry.set(h.environmentIds, [LOCAL]);
apps/web/src/state/threads.ts
+1 -1
@@ -51,7 +51,7 @@ export function useEnvironmentThread(
51 }
52
53 const isRunning = (status: string) =>
54 - status === "preparing" || status === "starting" || status === "running";
54 + status === "preparing" || status === "queued" || status === "starting" || status === "running";
55
56 type KeptThreads = ReadonlyMap<EnvironmentId, ReadonlySet<ThreadId>>;
57