Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): finished subagents stay reachable from the Agents pill #25759

Mergedsaphid(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/25759/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 122 additions and 4 deletions.

x
0 of 2 viewed, 2 left
94 additions and 2 deletionspackages/client-runtime/src/state/threadSubagents.test.tsModified
View file
@@ -41,8 +41,17 @@
};
​
-const run = (id: string, status: "running" | "completed" | "rolled_back") =>
- ({ id: RunId.make(id), status }) as never;
+const run = (
+ id: string,
+ status: "queued" | "running" | "completed" | "cancelled" | "rolled_back",
+ overrides: { readonly ordinal?: number; readonly started?: boolean } = {},
+) =>
+ ({
+ id: RunId.make(id),
+ status,
+ ordinal: overrides.ordinal ?? Number(id.slice("run-".length)),
+ startedAt: overrides.started === false ? null : at("2026-06-20T00:00:00.000Z"),
+ }) as never;
const activeRun = run("run-1", "running");
const finishedRun = run("run-1", "completed");
​
@@ -168,6 +177,89 @@
expect(resolveSubagentPillSegment(turn)?.label).toBe("1/2");
});
​
+ it("keeps the finished agents reachable while their turn is the latest", () => {
+ const turn = deriveThreadTurnSubagents({
+ runs: [finishedRun],
+ subagents: [
+ subagent({ id: "a", status: "completed" }),