Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

fix(web): keep an interrupted Run in the Dock as a stop

jeffrey6aa1aaa4273c
diff --git a/apps/web/src/features/rooms/chat/message-timeline-card.test.tsx b/apps/web/src/features/rooms/chat/message-timeline-card.test.tsx
index 5301e372..7fe5ccfb 100644
--- a/apps/web/src/features/rooms/chat/message-timeline-card.test.tsx
+++ b/apps/web/src/features/rooms/chat/message-timeline-card.test.tsx
@@ -2091,6 +2091,35 @@ describe("Room Message timeline cards", () => {
expect(resend()).toBeInTheDocument();
});
+ it("keeps an interrupted Run in the Dock as a stop, not a failure", () => {
+ render(
+ <QueryClientProvider client={new QueryClient()}>
+ <MemoryRouter>
+ <AgentStreamingStatusDock
+ runStatuses={[runStatus({ status: "aborted" })]}
+ runtimePresentationEventsByRunStatusId={{
+ "run-status-1": [
+ {
+ ...runtimeTerminalStatusRecord("2", "failed"),
+ event: {
+ type: "status.changed",
+ status: "stopped",
+ outcome: "failed",
+ failure: { code: "interrupted", runtime_type: "claude" },
+ },
+ },
+ ],
+ }}
+ />
+ </MemoryRouter>
+ </QueryClientProvider>,
+ );
+ expect(shownStatus()).toMatch(
+ /^Codex: Claude: The Run stopped before it finished because its Computer restarted/,
+ );
+ expect(shownStatus()).not.toMatch(/Run failed/);
+ });
+
it("shows the latest failure below the composer and clears it after success", () => {
const failed = runStatus({ id: "failed", status: "aborted" });
const { rerender } = render(
diff --git a/apps/web/src/features/rooms/chat/message-timeline.tsx b/apps/web/src/features/rooms/chat/message-timeline.tsx
index 3637b9c6..22978069 100644
--- a/apps/web/src/features/rooms/chat/message-timeline.tsx
+++ b/apps/web/src/features/rooms/chat/message-timeline.tsx
@@ -640,7 +640,7 @@ function resolveAgentRuntimeStatusSegment({
? "Canceled"
: terminalOutcome === "failed"
? isRunInterruption(failure)
- ? "Canceled"
+ ? "Stopped"
: "Failed"
: activeActivity?.kind === "recovery"
? "Recovering"
@@ -675,25 +675,27 @@ function resolveAgentRuntimeStatusSegment({
? terminalSummary
: `Run failed: ${terminalSummary}`,
}
- : state === "Needs attention"
- ? { tone: "warn", text: "Follow-up delivery unconfirmed" }
- : stateActivity
- ? {
- tone: "live",
- text: activityStatusLine(stateActivity.kind).steps[0]!,
- runningActivityId: stateActivity.activityId,
- }
- : status === "queued"
- ? { tone: "wait" }
- : outputs.length > 0 && lineRunning.length === 0
- ? { tone: "live", text: "Working" }
- : queue.length > 0
- ? queue.at(-1)!.content
- : status === "thinking"
- ? { tone: "live", text: title?.trim() || "Thinking" }
- : first && activities.length === 0
- ? { tone: "wait" }
- : { tone: "live", text: "Working" };
+ : state === "Stopped"
+ ? { tone: "warn", text: summary }
+ : state === "Needs attention"
+ ? { tone: "warn", text: "Follow-up delivery unconfirmed" }
+ : stateActivity
+ ? {
+ tone: "live",
+ text: activityStatusLine(stateActivity.kind).steps[0]!,
+ runningActivityId: stateActivity.activityId,
+ }
+ : status === "queued"
+ ? { tone: "wait" }
+ : outputs.length > 0 && lineRunning.length === 0
+ ? { tone: "live", text: "Working" }
+ : queue.length > 0
+ ? queue.at(-1)!.content
+ : status === "thinking"
+ ? { tone: "live", text: title?.trim() || "Thinking" }
+ : first && activities.length === 0
+ ? { tone: "wait" }
+ : { tone: "live", text: "Working" };
const lineQueue =
queue.length > 0 && line === queue.at(-1)!.content ? queue : undefined;
return {