Archive finished subagents across the whole track (#3368)

* feat(app): archive finished subagents together

Make the track action clean up finished managed and provider-owned children as one operation while preserving running work. Managed archives remain sequential and provider-owned dismissal stays client-local.

* test(app): clarify subagent archive assertions
This commit is contained in:
Mohamed Boudra
2026-08-14 18:16:22 +02:00
committed by GitHub
parent 23853a1515
commit 75bbca4a1b
24 changed files with 998 additions and 42 deletions
@@ -160,7 +160,7 @@ describe("provider subagent client store", () => {
item: { type: "assistant_message", text: "Finished output." },
});
store.hideFinishedForParent(SERVER_ID, PARENT_ID);
store.hideFromTrack(SERVER_ID, PARENT_ID, [SUBAGENT_ID]);
const state = useProviderSubagentStore.getState();
const key = providerSubagentKey(SERVER_ID, PARENT_ID, SUBAGENT_ID);
@@ -185,7 +185,7 @@ describe("provider subagent client store", () => {
toolCallId: "call-1",
};
store.applyUpdate(SERVER_ID, { kind: "upsert", subagent: completed });
store.hideFinishedForParent(SERVER_ID, PARENT_ID);
store.hideFromTrack(SERVER_ID, PARENT_ID, [SUBAGENT_ID]);
store.replaceList(SERVER_ID, PARENT_ID, [completed]);
const key = providerSubagentKey(SERVER_ID, PARENT_ID, SUBAGENT_ID);
@@ -215,7 +215,7 @@ describe("provider subagent client store", () => {
toolCallId: "call-1",
},
});
store.hideFinishedForParent(SERVER_ID, PARENT_ID);
store.hideFromTrack(SERVER_ID, PARENT_ID, [SUBAGENT_ID]);
store.replaceList(SERVER_ID, PARENT_ID, []);
@@ -239,7 +239,7 @@ describe("provider subagent client store", () => {
toolCallId: "call-1",
};
store.applyUpdate(SERVER_ID, { kind: "upsert", subagent: completed });
store.hideFinishedForParent(SERVER_ID, PARENT_ID);
store.hideFromTrack(SERVER_ID, PARENT_ID, [SUBAGENT_ID]);
store.applyUpdate(SERVER_ID, {
kind: "remove",
parentAgentId: PARENT_ID,