The scan feature had 16 tsc errors from refactor drift; npm run build failed.
- modals/hooks/* are five levels deep but imported ../../../../lib (four);
corrected to ../../../../../lib.
- useScanDiagnosticsModalModel / useScanReviewQueueModalModel picked
saveReviewSample / canSaveReviewSample / loadReviewQueue from the modal Props,
but the components wire those through from controller.*; source them from the
controller type instead (fixes the downstream unknown-type errors).
- useScanResultCardModel let its field-row tuple array widen to
(string | ParsedField)[][]; annotate it Array<[string, ParsedField]> like the
sibling hook.
- ScanTopControlsModel was missing autoScanRunning (destructured by the
component); add it. useScanTopControlsModel does not use refreshCaptureSources,
so its input is Omit<...,"refreshCaptureSources">.
tsc, vite build, and the electron build all pass; 74 tests green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a measurement gate for the artifact OCR parser (ADR-007), the prerequisite
for the layout-profile and preprocessing rework. runOcrEval feeds labeled OCR
text through the real parseArtifactCandidate and scores per-field / per-case
accuracy.
- src/eval/ocrEvalHarness.ts: pure metrics (per-field, critical-field, exact).
- src/eval/corpus/seedCorpus.ts: 23 cases transcribed from the verified parser
test assertions; runs at 100%.
- src/eval/reviewSampleCorpus.ts: converts review samples into label *candidates*
(never ground truth) so the review queue can grow the corpus.
- src/eval/ocrEval.test.ts + reviewSampleCorpus.test.ts: gate (must stay 1.0) and
converter unit tests.
- npm run eval script; docs/ocr-eval.md; ADR-007/008/009.
Also records the agreed rework direction: C# input/capture sidecar (ADR-008) and
resolution-anchored layout profiles + OCR preprocessing (ADR-009).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Import the existing Electron + React + TypeScript app as the version-control
baseline before the scanner rework (C# input/capture sidecar, resolution-anchored
layout profiles, OCR preprocessing, eval harness, rescan-merge, GOOD interop).
Housekeeping in this commit:
- Remove orphaned temp_inputhelper_block.ts (duplicate of the input-helper script).
- Ignore .claude/scheduled_tasks.lock local session state.
- Add .gitattributes to normalize line endings (LF in repo).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>