From 9ea9ca741c702c36bbb93296758c68abfd1662c3 Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Thu, 12 Mar 2026 12:36:22 -0500 Subject: [PATCH] Allow reprocessing any card, not just errored ones The Reprocess button and dropdown item were only visible for cards with ocrStatus "error". Now they appear for any card that isn't currently processing, so users can re-run OCR on completed cards too (e.g. after changing AI settings). Made-with: Cursor --- src/app/api/cards/[id]/reprocess/route.ts | 4 ++-- src/app/cards/[id]/page.tsx | 2 +- src/components/cards/columns.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/api/cards/[id]/reprocess/route.ts b/src/app/api/cards/[id]/reprocess/route.ts index 87fc2c8..cd96056 100644 --- a/src/app/api/cards/[id]/reprocess/route.ts +++ b/src/app/api/cards/[id]/reprocess/route.ts @@ -14,9 +14,9 @@ export async function POST( return NextResponse.json({ error: "Card not found" }, { status: 404 }); } - if (card.ocrStatus !== "error") { + if (card.ocrStatus === "processing") { return NextResponse.json( - { error: `Cannot reprocess card with status "${card.ocrStatus}"` }, + { error: "Card is already being processed" }, { status: 400 } ); } diff --git a/src/app/cards/[id]/page.tsx b/src/app/cards/[id]/page.tsx index 59e184c..3b6a2a0 100644 --- a/src/app/cards/[id]/page.tsx +++ b/src/app/cards/[id]/page.tsx @@ -253,7 +253,7 @@ export default function CardDetailPage() {
- {ocrStatus === "error" && ( + {ocrStatus !== "processing" && (