The best way to control Claude Code, Codex and more from any computer or phone
fix(web): a stopped run no longer shows the green Done badge in the sidebar (#37475)
Julius Marminge committed
Nov 15, 2026 at 20:11 UTC
40dcbc5f6a8c4039f5f8f0dceb1bfa17ad0e3961
4 files changed
+35
apps/mobile/src/features/threads/threadListV2.test.ts
+17
@@ -226,6 +226,23 @@ describe("resolveThreadListV2Status", () => {
226
expect(threadHasUnseenCompletion(thread)).toBe(true);
227
},
228
);
229
+
230
+ it.each(["interrupted", "cancelled"] as const)(
231
+ "does not present a %s run as an unseen completion",
232
+ (status) => {
233
+ const thread = presentThreadShell(
234
+ environmentId,
235
+ makeRawThreadShell({
236
+ latestRunId: RunId.make("run-stopped"),
237
+ status,
238
+ latestRunCompletedAt: DateTime.makeUnsafe(NOW),
239
+ lastVisitedAt: DateTime.makeUnsafe("2026-06-01T23:59:00.000Z"),
240
+ }),
241
+ );
242
+
243
+ expect(threadHasUnseenCompletion(thread)).toBe(false);
244
+ },
245
+ );
246
});
247
248
describe("threadListV2RowAccessibilityLabel", () => {
apps/mobile/src/features/threads/threadListV2.ts
+2
@@ -238,6 +238,8 @@ export function threadHasUnseenCompletion(
238
): boolean {
239
const completedAt = thread.latestRun?.completedAt;
240
if (!completedAt) return false;
241
+ const status = thread.latestRun?.status;
242
+ if (status === "interrupted" || status === "cancelled") return false;
243
const completedAtMs = Date.parse(completedAt);
244
if (Number.isNaN(completedAtMs)) return false;
245
if (!thread.lastVisitedAt) return false;
apps/web/src/components/Sidebar.logic.test.ts
+13
@@ -360,6 +360,19 @@ describe("resolveSidebarRowStatus", () => {
360
// A runtime failure without a failed run has no date, so a visit cannot settle it.
361
expect(resolveSidebarRowStatus({ ...opened, latestRun: null })).toBe("failed");
362
});
363
+
364
+ it("does not show a stopped run as an unseen completion", () => {
365
+ for (const status of ["interrupted", "cancelled"] as const) {
366
+ const stopped = {
367
+ ...failed,
368
+ runtime: { ...failedRuntime, status, lastError: null },
369
+ latestRun: { ...makeLatestRun(), status },
370
+ lastVisitedAt: "2026-03-09T10:01:00.000Z",
371
+ };
372
+ expect(hasUnseenCompletion(stopped)).toBe(false);
373
+ expect(resolveThreadStatusPill({ thread: stopped })).toBeNull();
374
+ }
375
+ });
376
});
377
378
describe("searchSidebarThreads", () => {
apps/web/src/components/Sidebar.logic.ts
+3
@@ -799,6 +799,9 @@ export function resolveThreadLastVisitedAt(
799
800
export function hasUnseenCompletion(thread: ThreadStatusInput): boolean {
801
if (!thread.latestRun?.completedAt) return false;
802
+ if (thread.latestRun.status === "interrupted" || thread.latestRun.status === "cancelled") {
803
+ return false;
804
+ }
805
const completedAt = Date.parse(thread.latestRun.completedAt);
806
if (Number.isNaN(completedAt)) return false;
807
if (!thread.lastVisitedAt) return false;