Gateway: hide delegated threads unless they wait on the user
Gateway / check (push) Successful in 10s
Gateway / image (push) Successful in 22s

This commit is contained in:
gib committed 2026-11-01 19:54:08 -05:00
1 parent 221622b574
commit 442036b22f
3 files changed
+15 -2

No files matched your search

+8
View File
@@ -95,4 +95,12 @@ describe("threadPhase", () => {
it("hides threads that never ran", () => {
expect(threadPhase(thread({ status: "idle" }))).toBeNull();
});
// Not from upstream: delegate_task children carry no subagent lineage, only delegatedFrom.
it("shows delegated threads only while they wait on the user", () => {
const delegatedFrom = { environmentId: "env-desktop", threadId: "thread-1", title: "Parent" };
expect(threadPhase(thread({ delegatedFrom }))).toBeNull();
expect(threadPhase(thread({ delegatedFrom, status: "completed" }))).toBeNull();
expect(threadPhase(thread({ delegatedFrom, pendingRuntimeRequest: request("command") }))).toBe("waiting_for_approval");
});
});