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
@@ -76,7 +76,7 @@ describe("formatHeaderLabel", () => {
});
describe("countFinishedSubagents", () => {
it("counts only terminal provider-owned children", () => {
it("counts eligible managed and terminal provider-owned children", () => {
const providerRows: SubagentRow[] = [
{
kind: "provider",
@@ -110,6 +110,16 @@ describe("countFinishedSubagents", () => {
row({ id: "managed-idle", status: "idle" }),
...providerRows,
]),
).toBe(2);
});
it("excludes running and initializing managed children", () => {
expect(
countFinishedSubagents([
row({ id: "running", status: "running" }),
row({ id: "initializing", status: "initializing" }),
row({ id: "finished", status: "idle" }),
]),
).toBe(1);
});
});