fix: enable MOBI and AZW vectorization on mobile - #690
Open
cha1latte wants to merge 11 commits into
Open
Conversation
cha1latte
marked this pull request as ready for review
August 17, 2026 15:12
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.
What changed
Root cause
ReadAny's bundled Foliate parser already understands DRM-free MOBI/KF8, but the mobile vectorization entry points only allowed EPUB/PDF/TXT/UMD and lost the book-format hint when files arrived as generic binary data. The existing lifecycle also needed stricter failure, persistence, and cancellation boundaries before these formats could be enabled safely.
Real-book proof
The regression suite includes official Project Gutenberg ebook 11 fixtures for MOBI v6 and KF8/AZW3. Their source URLs, sizes, SHA-256 values, retrieval date, and public-domain/license context are recorded beside the fixtures. Tests run the real Foliate parser/decompressor, assert ordered Alice text, and prove a synthetic nonzero-encryption header is rejected without decryption.
Validation
TZ=UTC pnpm --filter @readany/core test? 600 passedTZ=UTC pnpm --filter @readany/app-expo test? 100 passedpnpm --filter @readany/app-expo exec tsc --noEmitpnpm --filter @readany/app-expo build:reader? deterministic generated outputpnpm --filter app buildgit diff --check upstream/main...HEADScope and limitations
Manual acceptance still pending
The implementation and automated real-book coverage are ready for maintainer review. A live Android acceptance pass remains pending for real MOBI/AZW3 import, manual and automatic vectorization, grounded answers, protected-file messaging, queued/active cancellation, and absence of partial searchable residue after cancellation.