From 99f5a378f1be1d5e07268c0a0433c335f51c1aeb Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 18 Mar 2026 23:48:09 -0700 Subject: [PATCH] Fix stale in_review self-healing to run in JSON mode and update local objects before state load --- src/commands/list.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/list.ts b/src/commands/list.ts index bb24f96..28f1039 100644 --- a/src/commands/list.ts +++ b/src/commands/list.ts @@ -60,11 +60,11 @@ export async function action(opts: { json?: boolean }) { const statuses = Object.fromEntries(statusEntries) // Batch self-heal stale in_review flags with a single state write - if (staleReviewSessions.length > 0 && !opts.json) { + if (staleReviewSessions.length > 0) { + for (const s of staleReviewSessions) s.in_review = false const current = await state.load(root).catch(() => null) if (current) { for (const s of staleReviewSessions) { - s.in_review = false if (current.sessions[s.branch]) current.sessions[s.branch].in_review = false } await state.save(root, current).catch(() => {})