fix: advance uiStep past skipped orientation for page-split sub-sessions

Page-split sub-sessions (current_step=2) had orientation marked as skipped
but uiStep remained at 0 (orientation step), causing StepOrientation to
render for a sub-session that has no orientation data. Now advances to
uiStep=1 (deskew) when orientation is skipped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-24 12:59:36 +01:00
parent 63dfb4d06f
commit 72ce4420cb
2 changed files with 2 additions and 0 deletions

View File

@@ -136,6 +136,7 @@ export default function OcrOverlayPage() {
if (uiStep < 4) uiStep = 4
} else if (dbStep >= 2) {
skipIds.push('orientation')
if (uiStep < 1) uiStep = 1 // advance past skipped orientation to deskew
}
}
}

View File

@@ -108,6 +108,7 @@ export default function OcrPipelinePage() {
} else if (dbStep >= 2) {
// Page-split sub-session: parent orientation applied, skip only orientation
if (!skipSteps.includes('orientation')) skipSteps.push('orientation')
if (uiStep < 1) uiStep = 1 // advance past skipped orientation to deskew
}
// dbStep === 1: page-split from original image, needs full pipeline
}