| ... | ... | @@ -19,7 +19,7 @@ import { createRunningThreadKeepAliveAtom } from "./threads"; |
| 19 | 19 | const LOCAL = EnvironmentId.make("local"); |
| 20 | 20 | const REMOTE = EnvironmentId.make("remote"); |
| 21 | 21 | |
| 22 | | type Status = "running" | "starting" | "idle"; |
| 22 | type Status = "running" | "starting" | "preparing" | "queued" | "waiting" | "idle"; |
| 23 | 23 | function shell(id: string, status: Status | null) { |
| 24 | 24 | return { id: ThreadId.make(id), status: status ?? "idle" } satisfies Pick< |
| 25 | 25 | OrchestrationV2ThreadShell, |
| ... | ... | @@ -159,6 +159,12 @@ describe("createRunningThreadKeepAliveAtom", () => { |
| 159 | 159 | expect(h.openStreams()).toEqual([]); |
| 160 | 160 | }); |
| 161 | 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 | |
| 162 | 168 | it("follows environments that connect and go away", () => { |
| 163 | 169 | const h = makeHarness(); |
| 164 | 170 | h.registry.set(h.environmentIds, [LOCAL]); |