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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user