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(() => {})