Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): a resumed subagent's notification row shows it running, not failed #18099

MergedTinBane(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/18099/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 82 additions and 5 deletions.

x
0 of 3 viewed, 3 left
41 additions and 0 deletionsapps/web/src/components/chat/V2LifecycleRow.logic.test.tsAdded
View file
@@ -0,0 +1,41 @@
+import * as DateTime from "effect/DateTime";
+import { describe, expect, it } from "vite-plus/test";
+​
+import { subagentResumedSince } from "./V2LifecycleRow.logic";
+​
+const failedAt = "2026-10-09T12:21:00.000Z";
+const beforeFailure = DateTime.makeUnsafe("2026-10-09T12:05:00.000Z");
+const afterFailure = DateTime.makeUnsafe("2026-10-09T12:48:00.000Z");
+​
+describe("subagentResumedSince", () => {
+ it("is true while a resumed subagent runs", () => {
+ expect(subagentResumedSince({ status: "running", startedAt: afterFailure }, failedAt)).toBe(
+ true,
+ );
+ });
+​
+ it("is true while it runs even when the notification was delivered after the resume", () => {
+ expect(
+ subagentResumedSince(
+ { status: "running", startedAt: afterFailure },
+ "2026-10-09T12:50:00.000Z",
+ ),
+ ).toBe(true);
+ });
+​
+ it("is true once a run started after the notification has settled", () => {
+ expect(subagentResumedSince({ status: "completed", startedAt: afterFailure }, failedAt)).toBe(
+ true,
+ );
+ });