P8 routing baseline → P9-B FixedLayoutModel + lightweight-default-bundle direction#2
Conversation
- Updated `product-matrix-docs-test.js` to include validation for known input formats and ensure all documented formats are accounted for. - Modified `release-readiness-test.js` to include the new `sync-tesseract-vendor.js` script in the release preparation process. - Added `repair-engine-test.js` to implement comprehensive tests for the repair engine, covering action contracts, validation, and end-to-end conversion scenarios. - Introduced `sync-tesseract-vendor.js` to manage the synchronization of Tesseract.js vendor files. - Updated `tauri.conf.json` to adjust the Content Security Policy for improved security.
阶段状态表中存在已完成 milestone 与原 "待启动" 描述并列的两条遗留行: - P9-A.3 端到端 PNG + 扫描 PDF(已被 P9-A.3 PNG 异步 OCR 接入 + Repair 入口替代) - P9-B OCR → FixedLayoutModel(已被 P9-B OCR → FixedLayoutModel + 浏览器 rasterize 替代) 删除两条旧行以反映 P9-A.3 / P9-A.4 / P9-B 实际拆分与完成状态。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c015f67967
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return null; | ||
| } | ||
|
|
||
| export const tesseractOCREngine = Object.freeze({ |
There was a problem hiding this comment.
Keep Tesseract readiness state mutable
When the Security Center imports or clears tessdata, it calls tesseractOCREngine.ensureProbe(), which assigns this._tessdataReady; because this object is frozen, ES module strict mode throws TypeError: Cannot assign to read only property '_tessdataReady'. In the import flow this is caught as an import failure before the model can become available, so users cannot enable the Tesseract OCR engine even after selecting a valid .traineddata file.
Useful? React with 👍 / 👎.
| if (String(payload?.from || "").toLowerCase() === "png") { | ||
| return Promise.resolve(convertInBrowserAsync(payload)); |
There was a problem hiding this comment.
Route worker conversions through the async OCR path
This only uses convertInBrowserAsync when Worker is unavailable, but the normal browser/Tauri path creates /workers/convert-worker.js, which still calls the synchronous convertContent. As a result, PNG conversions from the workbench skip registry.convertAsync() and never run runOCRStage, so imported OCR models have no effect in the primary UI path.
Useful? React with 👍 / 👎.
Summary
Test plan
🤖 Generated with Claude Code