Theorem v1.5.6
Pre-release
Pre-release
Fixed
- Memory & CPU Spike on Book Opening — Eliminated excessive ~1.3GB memory consumption and CPU pegging when opening books:
- In
src/features/reader/Reader.tsx, decoupledtts_engine_preloadfrom unconditional book open hooks so neural ONNX models are compiled only when Immersion Reading is actively enabled. - Added an unmount hook that triggers
tts_engine_unloadand a new nativetrim_memorycommand callinglibc::malloc_trim(0), releasing dormant glibc thread arenas back to the OS kernel. - Reaped Linux
spd-sayandkillallchild processes insrc-tauri/src/tts_linux.rsvia detached wait threads, preventing<defunct>zombie process accumulation.
- In
- P2P Device Sync PDF & Non-Materialized On-Demand File Transfers — Fixed persistent "Book File Not Available" errors when attempting to open or download PDFs and EPUBs synced from paired devices:
- SQLite Persistence Key Alignment: Fixed
find_in_dbinsrc-tauri/src/file_transfer.rsqueryingpersist:theorem-library. Theorem stores state underzustand:theorem-libraryviaSQLITE_PERSIST_KEY_PREFIX. Updated queries to checkzustand:theorem-library(and fallback variations) to accurately extract desktop-imported book file paths (filePath,storagePath). - File Path Normalization & Percent-Decoding: Added
normalize_candidate_pathinfile_transfer.rshandlingfile://scheme prefixes, percent-encoded spaces and symbols (percent_decode_str), and Windows drive formats (/C:/...->C:/...). - Direct LAN IP/Port Connection Fallback: Configured
EndpointAddrwithlast_ipandlast_portsocket addresses inconnect_and_requestto ensure reliable direct peer connections on local networks when relays are delayed or unreachable. Refreshes and persists verified socket addresses upon successful transfers. - Two-Way Pairing Address Capture: Updated
PairingProtocolHandler::acceptinsrc-tauri/src/iroh_sync.rsto extract remote IP and port fromconn.paths()and record them inPairedDevice, establishing direct LAN addressing immediately upon pairing. - Atomic Safe Downloads: Updated
download_book_fileto stream incoming bytes into a.download.tmptemporary file before atomically renaming to.book, cleaning up incomplete artifacts on network timeout or failure. - Immediate Progress & Reload Flow: Emitted an initial
0.0%event immediately upon connection infile_transfer.rsand attached the progress listener on mount inReader.tsx. ClearedloadedBookIdRef.currentupon transfer completion so the reader seamlessly mounts the newly acquired book without stalling on "Book File Not Available".
- SQLite Persistence Key Alignment: Fixed
- Mobile EPUB Navigation & Touch Gesture Handling — Restored smooth EPUB navigation and thumb gesture ergonomics:
- In
foliate-js-runtime/paginator.js, restored GPU-promoted 300ms CSS transform slide transitions for page turns and snap releases while keeping transitions cleanly disabled during finger drags and frame-by-frame JS interpolation. - Refined gesture axis arbitration (
absDx > 16 && absDx > absDy * 1.3) so natural curved thumb swipes reliably turn pages without locking into vertical scroll. - Set
touchAction: 'none'on paginated viewport containers inReaderViewport.tsx, eliminating mobile WebView gesture arbitration delays.
- In
- Download Failure UI Polish — Removed the extraneous "Go to Sync Settings" button from the reader download failure modal, establishing a clean, unified two-button action group (Back to Library and Try Again).
Improved & Performance
- Dependency Modernization —
- Removed deprecated
@types/dompurifyand@types/uuid(types are now bundled upstream). - Updated frontend dependencies to latest versions, including
vitest&@vitest/coverage-v85.0.1,@tanstack/react-virtual3.14.13,zod4.6.5,react-i18next17.0.14,lucide-react1.47.0, andjsdom30.1.0. - Updated 44 Rust crates via
cargo updateto latest compatible releases.
- Removed deprecated
- Dynamic Deferred Sentry Loading — Refactored
src/core/lib/sentry.tsandsrc/main.tsxto dynamically import@sentry/reactonly when a valid Sentry DSN is resolved at runtime. Sheds 270 KB (88 KB gzip) from the synchronous critical startup path for local, offline, and dev instances. - React Re-render Isolation & Fine-Grained Selectors —
- In
Library.tsx, extracted<DailyHighlightBanner />as an isolated memoized component, removing theannotationsarray subscription fromLibraryPage. Prevents full library re-renders (1,000+ cards) when annotations are created, updated, or synced. - In
Sidebar.tsx, replaced whole-objectstatssubscriptions with primitivecurrentStreakselectors, preventing sidebar thrashing during background reading progress flushes. - In
Reader.tsx, decoupled thefeedsarray subscription from the active book reader and isolated reader-specific settings via shallow derivation, ensuring background RSS feed refreshes and non-reader settings modifications never trigger reader viewport re-renders.
- In
- SQLite Composite Query Indexes — Added
idx_rss_articles_feed_fetched ON rss_articles(feed_id, fetched_at DESC),idx_rss_articles_fetched_at ON rss_articles(fetched_at DESC), andidx_reading_sessions_date_created ON reading_sessions(session_date DESC, created_at DESC)insrc-tauri/src/database.rs, converting in-memory sort scans into instant index lookups. - Zero-Allocation Rust Search & Clone Elimination —
- Replaced allocating string-lowercasing search in
src-tauri/src/epub_rewriter.rs(find_ci) with zero-allocation byte window scanning (windows(len).position(|w| w.eq_ignore_ascii_case(...))), saving tens of 100KB–500KB OPF string allocations per metadata write. - In
src-tauri/src/epub_parser.rs(prefetch_sync), moved ownedEpubMetafields directly, eliminating redundant heap string clones and pre-inflated chapter map duplication. - In
src-tauri/src/batch_ingest.rs, moved base64 cover strings directly intoNativeBookRecordwithout cloning.
- Replaced allocating string-lowercasing search in
- Cloudflare DTO Data Layouts — Applied
Box<str>andBox<[T]>across Rust DTOs (book_search.rs,opds_parser.rs,article_extractor.rs,mobi_parser.rs,audiobook.rs,mdict.rs,stardict.rs), shedding 8 bytes of excess allocator capacity per field.
Download & install
| Platform | Download |
|---|---|
| Windows (x64) | Theorem_v1.5.6_x64-setup.exe |
| macOS (Apple Silicon) | Theorem_v1.5.6_aarch64.dmg |
| macOS (Intel) | Theorem_v1.5.6_x64.dmg |
| Linux (Debian/Ubuntu) | Theorem_v1.5.6_amd64.deb |
| Linux (any) | Theorem_v1.5.6_amd64.AppImage |
| Android (arm64) | app-arm64-release.apk |
Linux one-liner: curl -fsSL https://raw.githubusercontent.com/Fundaments-Work/Theorem/main/scripts/install-linux.sh | bash
Desktop builds auto-update in place (Settings → About → Check for Updates). Android updates are manual unless installed via F-Droid.