fix: three OCR pipeline UX improvements

1. Rename Step 6 label to "Korrektur" (was "OCR-Zeichenkorrektur")
2. Move _fix_character_confusion from pipeline Step 1 into
   llm_review_entries_streaming so corrections are visible in the UI:
   char changes (| → I, 1 → I, 8 → B) are now emitted as a batch event
   right after the meta event, appearing in the corrections list
3. StepReconstruction: all cells (including empty) are now rendered as
   editable inputs — removed filter that hid empty cells from the editor

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-03 17:31:55 +01:00
parent f3d61a9394
commit d1c8075da2
3 changed files with 45 additions and 11 deletions

View File

@@ -35,8 +35,7 @@ export function StepReconstruction({ sessionId, onNext }: StepReconstructionProp
const [undoStack, setUndoStack] = useState<UndoAction[]>([])
const [redoStack, setRedoStack] = useState<UndoAction[]>([])
// All cells including empty ones (for empty field highlighting)
const [allCells, setAllCells] = useState<EditableCell[]>([])
// (allCells removed — cells now contains all cells including empty ones)
const containerRef = useRef<HTMLDivElement>(null)
const imageRef = useRef<HTMLImageElement>(null)
@@ -82,8 +81,7 @@ export function StepReconstruction({ sessionId, onNext }: StepReconstructionProp
colIndex: c.col_index,
}))
setAllCells(allEditableCells)
setCells(allEditableCells.filter(c => c.text.trim() !== ''))
setCells(allEditableCells)
setEditedTexts(new Map())
setUndoStack([])
setRedoStack([])
@@ -191,7 +189,7 @@ export function StepReconstruction({ sessionId, onNext }: StepReconstructionProp
const emptyCellIds = useMemo(() => {
const required = new Set(['column_en', 'column_de'])
const ids = new Set<string>()
for (const cell of allCells) {
for (const cell of cells) {
if (required.has(cell.colType) && !cell.text.trim()) {
ids.add(cell.cellId)
}
@@ -429,7 +427,7 @@ export function StepReconstruction({ sessionId, onNext }: StepReconstructionProp
/>
{/* Empty field markers */}
{showEmptyHighlight && allCells
{showEmptyHighlight && cells
.filter(c => emptyCellIds.has(c.cellId))
.map(cell => (
<div