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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user