Conversation
McMurry's Organic Chemistry 7e (1,342 scanned pages) lost its last 342 to the 1,000-page OCR cap, and the note reported them as blank pages. The note now says how many pages were not processed because of the cap, and the cap itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138YUCVRCxHiRyY1TFpmufj
The work status window's text row now says how many pages were read by OCR and how many the OCR page cap left unprocessed (with the cap and what to do), read back from the extraction notes by shared/textProvenance. Older notes, where OCR stopped at a round cap and the rest was reported as blank, are recognised too (McMurry 7e: 1,000 OCR pages, 342 not processed). 11 languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138YUCVRCxHiRyY1TFpmufj
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A scanned book longer than the OCR page limit silently lost its tail, and the note said the missing pages had no text.
What broke
extractPdfOCRs at mostocrMaxPagesof the blank and low-quality pages ([...blanks, ...lowQuality].slice(0, maxPages)) and reports every blank page it did not recover as "N página(s) sin texto omitidas". Pages beyond the cap were never OCR'd, but read as blank. Found on a real library: a fully scanned 1,342-page textbook with the cap at 1,000 carried "1000 página(s) recuperadas por OCR. 342 página(s) sin texto omitidas." — a quarter of the book absent from search, reported as empty pages. Nothing in the interface showed that a book was scanned at all; the notes were only stored.Fix
textExtractor.ts): pages left out by the cap are counted separately — "N página(s) no procesadas: superan el límite de OCR (M páginas por documento)." — and "sin texto omitidas" counts only pages OCR tried and could not read.shared/textProvenance.ts: reads the notes back — OCR pages, capped pages and the cap, blank pages — and recognises notes written before this change (OCR stopping at a round figure ≥ 300 with pages left over is the cap).isScannedWorkmarks a work read mostly by OCR.WorkStatusModal.tsx, the "citable" row): "scanned: N pages read by OCR" and "N pages not processed because of the OCR page limit (M pages): raise it in Settings and re-extract the text". Eleven languages (src/i18n.textProvenance.ts).Testing
scripts/test-text-provenance.mjs(new): current and old-format notes (including several attachments' notes in one), the cap-cut case, scanned vs a digital book with a few OCR pages.test-i18n-coverage.mjs,test-i18n-no-duplicate-keys.mjspass.citation:check,npm ci, lint, build,build:server-web,test:ci, all four e2e suites) — all pass. (e2e-smoketimed out once at the study "improve" dialog, which this change does not touch, and passed on a rerun;e2e-argument-mapneeds an unlocked screen for native fullscreen — it fails on v5.7.2 too while the session is locked — and passes with the screen unlocked.)🤖 Generated with Claude Code