mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-14 08:53:19 +01:00
Fix LiveRunWidget activeRun merge bug and add idle_warning clear test
- Fix: activeRun merge in LiveRunWidget was dropping errorCode and lastOutputAt, preventing idle badge and last-output display from rendering for active runs - Add test: verify reportRunActivity clears idle_warning error code and updates lastOutputAt Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
d747d847e4
commit
b3bccf3648
2 files changed
+20
No files matched your search
@@ -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();
|
||||
});
|
||||
});
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user