Show friendly native subagent names and hide finished work (#2073)
* feat(subagents): archive finished children and show native names Keep native provider sessions intact while letting users clear completed children from the track. Persist dismissed provider child IDs so history replay does not restore them. * fix(subagents): cover persistence and naming edge cases * fix(subagents): preserve active descendants and native names * fix(subagents): retain dismissed timelines and trim paths * fix(subagents): retain history across hydration * test(subagents): expect normalized native descriptions * fix(subagents): separate hidden rows from retained history * fix(subagents): preserve restored hidden tabs safely * fix(subagents): integrate archive with run state * test(codex): expect normalized child name * fix(subagents): retain dismissed tabs on reload * fix(subagents): hide finished native agents locally Keep the header action presentation-only so it does not mutate agent lifecycle or expand the runtime protocol. * fix(subagents): humanize native agent names * fix(subagents): preserve names in Codex history * fix(subagents): retain hidden rows across reloads
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
|
||||
import type { PaseoSubagentRow, SubagentRow } from "./select";
|
||||
import {
|
||||
buildSubagentRowPresentationData,
|
||||
countFinishedSubagents,
|
||||
formatHeaderLabel,
|
||||
resolveRowLabel,
|
||||
} from "./track-presentation";
|
||||
@@ -72,6 +73,41 @@ describe("formatHeaderLabel", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("countFinishedSubagents", () => {
|
||||
it("counts only terminal provider-owned children", () => {
|
||||
const providerRows: SubagentRow[] = [
|
||||
{
|
||||
kind: "provider",
|
||||
id: "native-running",
|
||||
parentAgentId: "parent",
|
||||
provider: "claude",
|
||||
title: "running",
|
||||
status: "running",
|
||||
requiresAttention: false,
|
||||
createdAt: new Date("2026-04-20T00:00:00.000Z"),
|
||||
},
|
||||
{
|
||||
kind: "provider",
|
||||
id: "native-failed",
|
||||
parentAgentId: "parent",
|
||||
provider: "claude",
|
||||
title: "failed",
|
||||
status: "failed",
|
||||
requiresAttention: true,
|
||||
createdAt: new Date("2026-04-20T00:00:01.000Z"),
|
||||
},
|
||||
];
|
||||
|
||||
expect(
|
||||
countFinishedSubagents([
|
||||
row({ id: "managed-running", status: "running" }),
|
||||
row({ id: "managed-idle", status: "idle" }),
|
||||
...providerRows,
|
||||
]),
|
||||
).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveRowLabel", () => {
|
||||
it("returns null when title is not a string", () => {
|
||||
expect(resolveRowLabel(null as unknown as SubagentRow["title"])).toBe(null);
|
||||
|
||||
Reference in New Issue
Block a user