# Change: 簡化前端 OCR 配置選項 ## Why OCR track 已改為使用 simple OCR 模式,不再需要前端的複雜配置選項(如表格偵測模式、OCR 預設、進階參數等)。這些配置增加了使用者的認知負擔,且不再影響實際處理結果。 ## What Changes - **BREAKING** 移除前端的 OCR 處理預設選擇器 (`OCRPresetSelector`) - **BREAKING** 移除前端的表格偵測配置選擇器 (`TableDetectionSelector`) - **BREAKING** 移除前端相關的 TypeScript 類型定義 (`OCRPreset`, `OCRConfig`, `TableDetectionConfig`, `TableParsingMode` 等) - 保留版面模型選擇功能 (`LayoutModelSelector`): `chinese | default | cdla` - 保留影像前處理配置功能 (`PreprocessingSettings`): auto/manual/disabled 模式及相關參數 - 簡化後端 API 的 `ProcessingOptions`,移除不再使用的參數 ## Impact - Affected specs: `ocr-processing` - Affected code: - **前端需刪除的檔案**: - `frontend/src/components/OCRPresetSelector.tsx` - `frontend/src/components/TableDetectionSelector.tsx` - **前端需修改的檔案**: - `frontend/src/types/apiV2.ts` - 移除未使用的類型定義 - `frontend/src/pages/ProcessingPage.tsx` - 移除已註解的相關 import 和邏輯 - **後端需修改的檔案**: - `backend/app/schemas/task.py` - 移除 `ProcessingOptions` 中的 `ocr_preset`, `ocr_config`, `table_detection` 欄位 - `backend/app/routers/tasks.py` - 清理對應的參數處理邏輯