fix: resolve 18 QA-discovered bugs across tools, previews, and the AI pipeline (#242)

Exhaustive QA sweep of all 157 tools. Fixes: CSP blob media, csv-excel ExcelJS interop, ocr-pdf segfault, chart-maker upload, non-PDF doc preview, RAW decode, merge-tool multi-file path, html-to-image chromium, ogv/wma/amr/ac3 preview fallbacks, meme/gif/stabilize codecs, nav+home a11y. Plus orphan-format and test-debt cleanup, the AI bundle build script, and a reusable Playwright QA harness under tests/qa/.
This commit is contained in:
SnapOtter
2026-06-15 22:26:24 +08:00
committed by GitHub
parent 25babfae15
commit d8cf979d4b
83 changed files with 16014 additions and 112 deletions
+10 -11
View File
@@ -142,20 +142,19 @@ def main():
elif was_auto:
current_lang = language # already detected
# Run OCR engine based on quality tier
if quality == "fast":
text = ocr_module.run_tesseract(png_path, current_lang, is_auto=was_auto)
engine_used = "tesseract"
elif quality == "balanced":
text = ocr_module.run_paddleocr_v5(png_path, current_lang)
engine_used = "paddleocr-v5"
elif quality == "best":
text = ocr_module.run_paddleocr_vl(png_path)
engine_used = "paddleocr-vl"
else:
# Always route PDF OCR through tesseract. PaddleOCR segfaults
# on arm64 CPU when processing rasterised PDF pages (SIGSEGV in
# the doc-orientation / structural-analysis stage). Tesseract is
# reliable for page-level images and is already installed in the
# container with multi-language packs. The image-OCR tool still
# offers PaddleOCR tiers for single images where it is stable.
if quality not in ("fast", "balanced", "best"):
print(json.dumps({"error": f"Unknown quality: {quality}"}))
sys.exit(1)
text = ocr_module.run_tesseract(png_path, current_lang, is_auto=was_auto)
engine_used = "tesseract"
page_texts.append((page_num, text))
# Clean up scratch PNG immediately