Gateway: hide delegated threads unless they wait on the user
This commit is contained in:
1 parent
221622b574
commit
442036b22f
3 files changed
+15
-2
No files matched your search
@@ -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");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user