diff --git a/server/src/__tests__/heartbeat-process-recovery.test.ts b/server/src/__tests__/heartbeat-process-recovery.test.ts index 43a4288b..b431a60c 100644 --- a/server/src/__tests__/heartbeat-process-recovery.test.ts +++ b/server/src/__tests__/heartbeat-process-recovery.test.ts @@ -332,4 +332,22 @@ describeEmbeddedPostgres("heartbeat orphaned process recovery", () => { expect(run?.errorCode).toBeNull(); expect(run?.error).toBeNull(); }); + + it("clears the idle warning when the run reports activity again", async () => { + const { runId } = await seedRunFixture({ + includeIssue: false, + runErrorCode: "idle_warning", + runError: "Idle warning: no output for 10 minutes", + }); + const heartbeat = heartbeatService(db); + + const updated = await heartbeat.reportRunActivity(runId); + expect(updated?.errorCode).toBeNull(); + expect(updated?.error).toBeNull(); + expect(updated?.lastOutputAt).toBeTruthy(); + + const run = await heartbeat.getRun(runId); + expect(run?.errorCode).toBeNull(); + expect(run?.error).toBeNull(); + }); }); diff --git a/ui/src/components/LiveRunWidget.tsx b/ui/src/components/LiveRunWidget.tsx index 09b41f87..68e82efd 100644 --- a/ui/src/components/LiveRunWidget.tsx +++ b/ui/src/components/LiveRunWidget.tsx @@ -68,6 +68,8 @@ export function LiveRunWidget({ issueId, companyId }: LiveRunWidgetProps) { agentId: activeRun.agentId, agentName: activeRun.agentName, adapterType: activeRun.adapterType, + errorCode: activeRun.errorCode, + lastOutputAt: toIsoString(activeRun.lastOutputAt), issueId, }); }