* Added PDF top tab strip visibility toggle and fixed WebView hit test NPE
* Refactored desktop reader screens and state management into specialized components
* Added image gallery to reader sidebar and refactored desktop PDF UI components
* Implemented EPUB image gallery
* Refactored reader and library models to use shared common types, centralizing file type resolution and texture management while removing redundant mapping logic
* Standardized UI styling and refactored app navigation layout
* Implemented auto-hiding reader chrome and activity tracking in desktop
* Refactored reader panels into distinct left and right modal layers with platform-specific sizing and keyboard navigation support.
* Added PPTX support for desktop and refactored parsing into a shared module
* Implement paid AI features and account management for the desktop application.
* Implement AI Hub and enhanced Cloud TTS integration for Desktop
* Implement streaming support for AI definition and summarization features
* Implement support for password-protected PDFs and file actions in the desktop reader.
* Implement cloud synchronization for desktop using Firestore and Google Drive
* Implement PDF reflow and "Text View" for the desktop reader
* Refactor OPDS logic to use SharedOpdsController
* Optimize PDF tile rendering performance
* Implement two-page spread support for PDF pagination
* Implement two-page spread support for the PDF viewer
* Improved shared spread zoom in PDF viewer
* Improve PDF spread navigation with fling support and configurable page gaps
* Add brightness control to PDF and EPUB readers
* Refactor folder synchronization to use shared logic engine
* Implement safe string formatting and validation for localized resources
* Implement TTS chunk skip navigation
* Implement deep-linking and playback controls for TTS media sessions
* Implement start index for TTS playback
* Improve TTS navigation, prefetching, and notification duration reporting
* Implement TTS mini playback bar for background reading
* Implement multi-window reader support for the desktop application
* Improve desktop modal window management and visibility syncing
* Implement localized string support for Desktop and shared UI
* Implement language selection and persistence for Desktop
* Implement plural string support for Desktop and migrate hardcoded counts to plurals.xml
* Implement localized banner messages and UI strings using resource-backed SharedText
* Implement compact badge styling for small book covers
* Refactor PDF native interaction and improve HTML import memory safety
* fix language persistence
* Refactor reader overflow menus to use section-based logic
* Refactor PDF layout remapping and improve text box interaction
* Improve CFI resolution and TTS resume accuracy using dynamic chunk offsets
* Centralize PDF annotation export mapping and improve metadata handling
* Add support for threaded comments in PDF highlight annotations
* Flatten highlight comments into a single thread for PDF export and allow author editing
* Integrate page slider into reader chrome and persist toggle state
* Handle fragments and queries in EPUB chapter paths
* Implement dynamic, theme-aware coloring for the reader slider
* Implement customizable app-wide font preference
* Implement one-hand zoom gestures in the PDF viewer
* Implement File Information dialog for PDF and EPUB readers
* Bump version to 1.0.49 (53)
* Refactor PDF reader logic into modular components
* Add ProGuard rules to prevent R8 optimization issues in EPUB reader screens
* Add option to use PDF filenames as display names
* Fix preservation of PDF filename display preference in library projection
* Added support for right text alignment in epub reader
* Added tabs management to PDF navigation drawer
* Implemented unified selection menu placement logic
* Added reset functionality for toolbar customization
* Improved highlight filtering in epub pagination
* Migrated hardcoded UI strings to string resources
* Extracted desktop application logic from Main.kt into modular files
* Refactored Main.kt by extracting PDF and EPUB logic into specialized files
* Added Spanish language support
* Added system default option to app language selection
* Implement build profiles and feature policy for offline desktop builds
* Introduce unified cross-platform Settings Hub
* Refactor main settings into a hierarchical page-based navigation model
* Refactor library projection to use shared multiplatform logic
* Refactor UI state consumption by removing intermediate screen models
* Introduce AndroidSharedStateBridge to centralize state mapping and reduction logic
* Refactor state management for tabs, selection, and pinning to use shared bridge logic
* Refactor file type management and validation into a centralized shared module
* Centralize file type resolution and improve handling of unknown types
* Centralize book import logic with SharedImportPlanner
* Refactor magnifier geometry logic and coordinate mapping
* Properly handle orientation changes in scroll-locked PDF reader
* Add screen orientation controls to EPUB and PDF readers
* Implement right-to-left (RTL) pagination support and refactor reader menus
* Separate right-to-left pagination settings for PDF and EPUB
* Ensure PDF page data is scoped by document key for multi tab support
* Implement theme-aware link styling for the epub reader
* Implement jump history for back and forward navigation in the epub reader
* Improve locator handling and navigation logic in paginated reader mode
* Implement stable pagination navigation and location tracking
* Centralize banner message management and auto-dismiss logic in MainViewModel
* Implement zoom and pan state preservation for PDF pan lock mode
* Enhance reader navigation UI and workspace layout management in desktop app
* Refactor reader navigation sidebar and relocate search controls in desktop app
* Enhance reader UI with redesigned selection menus and bottom sheet overlays
* Implement custom highlight palettes and reader theme customization in desktop app
* Implement cross-platform modal layer and refine reader UI styling
* Improve highlight accuracy and implement metadata enrichment on book open in desktop app
* Implement two-page spread layout for paginated reader on desktop
* Implement persistent caching for book loading and pagination in desktop app
* Implement persistent caching for book loading and pagination in desktop app
* Optimize reader settings updates by separating layout and appearance changes in desktop app
* Improve desktop window branding and native Windows styling
* Enhance reader selection interactions and UI across EPUB and PDF viewers in desktop app
* Refine selection handle positioning and interaction logic
* Implement EPUB selection debug logging and improve handle targeting
* Optimize desktop book loading performance and UI responsiveness
* Implement anchored zoom gestures and rendering optimizations for the Desktop PDF viewer.
* Implement smooth zoom preview for the PDF reader in desktop app
* Optimize PDF rendering performance and responsiveness in the desktop reader
* Implement conditional diagnostic logging and update desktop build configuration
* Implemented hierarchical TOC, custom scrollbars, and improved desktop modal handling
* Added management options for annotations and highlights in the sidebar in desktop app
* Implemented `SharedStableOutlinedTextField` and updated text input fields to use `TextFieldValue` for improved cursor and selection stability.
* Refined library filters and enhanced OPDS functionality in desktop app
* Improved EPUB pagination measurement and implemented layout diagnostic logging for desktop app
* Added PPTX support including document parsing, rendering, and indexing
* Improved PPTX rendering and layout accuracy
* Implemented text autofit support for PPTX rendering
* Enhanced PPTX rendering with support for custom geometry, automatic numbering, table styles, and image opacity
* Improved EPUB pagination accuracy and added layout telemetry in desktop app
* Improved folder synchronization with metadata-only mode and hashed sidecar management in desktop app
* Implemented rich text font scaling and migrated desktop ink tools to custom pointer input handling
* Implemented billing account obfuscation
* Implemented hierarchical folder navigation and improved library selection functionality in desktop app
* Implemented platform-aware directory resolution and multi-platform native library support for desktop
* Added full-screen mode for the reader workspace
* Added PDF zoom indicator and interactive vertical scrollbar with page tooltips
* Refactored speech bubble prefetching to use a limited radius and improved ML detector initialization and lifecycle management
* Updated PDF indexing to replace existing page text and removed search result item keys
* Implemented "preparing" foreground notification for TTS service
* Optimized PDF rendering performance by pre-calculating page-specific annotations
* Refactored desktop packaging tasks and improved distribution configuration
* Optimized EPUB parser memory usage and added path traversal protection
* Refactored WorkManager monitoring logic and added work pruning
* Implemented comprehensive resource cleanup and memory management for WebView-based components to prevent memory leaks
* Implemented bitmap size limits and scaling to prevent canvas rendering errors
* Split long text paragraphs into multiple semantic blocks during HTML parsing
* Implemented local ActionMode for text selection to prevent platform crashes
* Refactored PPTX text layout, optimized HtmlParser block detection, and improved banner dismissal logic
* Added desktop startup splash screen and deferred WebView initialization
* Reorganized settings hub and added separate PDF reader defaults
* Implemented embedded cover extraction and metadata support for MOBI and FB2 formats
* Implemented batching for MetadataExtractionWorker and optimized EPUB metadata extraction performance.
* Implemented procedurally generated book covers and replaced static placeholders
* Redesigned search UI with a top bar and results overlay in desktop app
* Added PDF page gap and overlay visibility options and implemented DesktopBookImporter
* Refactored PDF reader UI with tabbed inspector and improved theme background handling in desktop
* Implemented PDF viewport persistence for zoom and scroll positions in desktop app
* Improved desktop fullscreen implementation and state restoration
* Implemented desktop window state persistence
* Implemented flavor-based branding and ProGuard configuration for desktop builds
* Implemented precise reader positioning and improved highlight rendering logic in desktop app
* Added support for user-editable book metadata
* Enhanced book metadata support and integrated info/edit dialogs
* Implemented embedded EPUB metadata editing
* Improved highlight mapping and added custom scrollbar styling for the reader.
* Reduced desktop WebView bundle size by excluding unused locales and runtime files
* Added neutral pan mode as the default PDF interaction state.
* Refactored library empty states and updated primary navigation tabs in desktop app
* Implemented native paginated reader and unified content rendering architecture in desktop epub reader
* Implemented native EPUB image rendering for desktop and improved block layout spacing with margin collapsing.
* Improved pagination overflow detection in desktop
* Implemented multi-block text selection with interactive handles and CFI support in desktop epub pagination
* Centralize library management logic and introduce support for plain text and HTML formats
* Centralize library management logic and introduce support for plain text and HTML formats
* Expand unit test coverage for library state management, UI models, and MainViewModel features.
* Add comprehensive unit tests for PDF reader core logic, preferences, and data persistence
* Add unit tests for EPUB parsing, content loading, search functionality, and reader JavaScript bridges.
* Add unit tests for OPDS parsing and Smart Collection engine, and integrate Kover plugin
* Add comprehensive unit tests
* Centralize library snapshot serialization in the `shared` module and improve filtering and sorting logic.
* Implement text selection, highlighting, and reading state persistence for PDF and EPUB engines in desktop version
* Folder import support for desktop app
* Introduce Smart Shelves with rule-based filtering in desktop version
* Implement shared EPUB annotation serialization and highlight rendering
* Centralize file type capabilities and platform-specific support logic
* Refactor reader state management to use a central reducer
* Implement customizable reader toolbar and advanced formatting settings in shared
* Implement locator-based navigation and customizable highlight palette for desktop app
* Enhance reader customization and expand search functionality in desktop app
* Redesign reader settings and tools into a tabbed control panel in desktop app
* Enhance reader navigation and highlight precision in desktop app
* Implement bidirectional position synchronization and dynamic highlights in the desktop reader
* Implement shared state management and enhanced search for the PDF reader in desktop app
* Add vertical scroll support to the desktop PDF reader
* Implement ink, text, and eraser annotation support in desktop PDF viewer
* Implement PDF bookmarks, Table of Contents, and annotation editing in desktop app
* Implement link handling and navigation for PDF and EPUB readers in desktop app
* Implement PDF jump history for navigation in desktop app
* Enhance PDF ink rendering and annotation capabilities in desktop app
* Implement advanced PDF text annotations with inline editing and rich styling in desktop app
* Add move handle and movement logic for PDF text annotations in desktop app
* Implement local folder synchronization and metadata sidecar support in desktop app
* Implement book metadata extraction and drag-and-drop import for Desktop
* Implement dynamic and custom app theme management for desktop
* Introduce canonical PDF annotation codec and support for multi-segment highlights
* Implement rich text editing and pagination support for the PDF reader in desktop app
* Improve PDF rich text pagination, synchronization, and observability in desktop
* Hide trailing structural page breaks in rich text editor
* Implement a unified JVM book loader and expand supported formats on Desktop
* Add comic archive support for Desktop and enhance MOBI parsing
* Implement shared OPDS catalog support and UI for Android and Desktop
* Improve native WebView lifecycle and surface transition management on Desktop
* Enable Compose Swing interop blending and simplify Desktop WebView management
* Integrate BYOK AI features and Cloud TTS for desktop
* Enhance Desktop TTS with streaming audio and improved secure storage for AI key
* Implement scoped Cloud TTS with synchronized highlighting for EPUB and PDF in desktop app
* Implement custom font management and utility screens in desktop app
* Implement PDFium-based PDF annotation export
* Remove PdfBox dependency and standardize PDF export via Pdfium
* Implement local audio caching and playback controls for Gemini Cloud TTS in desktop app
* Implement reader themes and custom texture support in desktop app
* Redesign non-reader UI with responsive navigation and enhanced library management in desktop app
* Introduce ReaderWorkspaceShell to unify EPUB and PDF reader layouts in desktop app
* Exclude manual-only files from automated sync and import
* Implement customizable Text-to-Speech (TTS) word replacements
* Optimize reader performance with persistent layout caching and decoupled theme rendering
* Improve position restoration during reader reconfiguration in epub pagination
* Use independent thickness for eraser tool and stylus override
* Add performance and stylus debugging logs
* Refactor and decouple UI models from `MainViewModel`
* Refactor library state management and projection logic
* Implement desktop shell using Compose Multiplatform
* Implement desktop shell using Compose Multiplatform
* Implement desktop shell using Compose Multiplatform
* Introduce ReaderEngine and enhance EPUB reader features in windows app
* Move core paginated reader logic to a Kotlin Multiplatform `shared` module and introduce experimental desktop support.
* Implement PDF rendering and text extraction for desktop using Pdfium
* Add `NonReaderScreens.kt` and UI dependencies
* Refactor and centralize library state management and models to improve cross-platform consistency
* Implement JSON persistence for desktop library and enhance library management features including shelf CRUD, tagging, and metadata editing
* Implement PDF annotation system and enhanced zoom controls for the desktop viewer
* Implement WebView-based EPUB rendering for desktop using CEF and embedded resources
* Optimize UI state projection, navigation state handling, and main screen pager performance
* Implement Bring Your Own Key (BYOK) support for AI features in OSS version
* Support Gemini-based Cloud TTS with BYOK support for OSS builds
* Refactor table cell image sizing in `PaginatedReader` and improve `MobiParser` native library loading and error handling.
* crash fixes
* Enhance navigation stability with lifecycle-aware safety checks and update `navigation-compose` to 2.9.6
* Implement dynamic bottom padding for the page info bar to account for device rounded corners
* Implement bidirectional jump history navigation and replace the jump-back pill with a dedicated `PdfJumpHistoryBar`
* Optimize PDF tiling performance and refine pan-and-fling gesture handling
* Implement customizable toolbars with drag-and-drop reordering and placement for PDF and EPUB readers
* Updated UI for customize toolbar
* Refine drag-and-drop reordering and section assignment for PDF and EPUB reader controls
* restructure PDF viewer UI component hierarchy to fix verifier crash
* Implement separate text dimming factors for light and dark themes
* Synchronize Pdfium access and improve resource lifecycle safety across Kotlin and native layers
* Enhance image alignment in paginated and EPUB readers through anchor detection and style-based positioning
* Centralize file type resolution logic and implement HTML sanitization during import
* Introduce vertical margin customization and configurable progress bar positioning
* texture support in epub reader
* Enhance TTS session management, progress tracking, and diagnostic logging
* Optimize library state projection and folder synchronization performance by refactoring collection lookups and refining metadata extraction logic.
* Refine TTS page mapping for PDF and overhaul TTS control UI
* Implement natural session completion logic in `TtsPlaybackManager` for cloud tts
* Replace Snackbar with `CustomTopBanner` for notifications in `PdfViewerScreen`
* Refine TTS playback continuity across PDF pages and improve state management for session transitions
* Implement global texture transparency and enhance textured theme support across PDF and EPUB readers.
* Update reader themes and improve texture rendering in page animations, EPUB UI, and immersive mode
* Add Support Project screen
* Optimize library performance via projection caching, batch database updates, and scoped folder synchronization.
* Enhance folder synchronization with fallback query mechanisms and refactor annotation sidecar importing logic
* Bump version to 1.0.47 (51)
* Remove custom-onnxruntime-arm64.aar
* Refactor remaining, hardcoded UI strings into localizable resources and added French and Russian to language list
* Fix background auto-advance for Text-to-Speech (TTS)
* add a UI trigger for demo annotations
* Implement internal link navigation
* Simplify bottom padding logic in `EpubReaderScreen` for vertical scroll mode
* Add support for Calibre metadata
* Implement advanced library management with Room-backed collections, tags, and smart rules.
* Display book series information in book details and remove tags from home screen
* Implement zoom reset functionality in PDF viewer
* Add a "Pages" thumbnail view to the PDF navigation drawer
* Implement jump-back navigation in PDF viewer
* MainViewModel: disable FolderSyncWorker, add log export, and enhance PDF position logging
* Replace Gson with Kotlin Serialization in SmartCollectionEngine
* Implement ONNX-based speech bubble detection
* Implement speech bubble detection in PDF viewer
* Implement "Smart Comic Zoom" feature for PDF manga/comic reading
* Implement reader session persistence and restoration in `MainViewModel`
* Add tap-to-turn page feature to PDF viewer
* Improve book cache management and recovery
* Refactor top overlay padding logic in `PdfViewerScreen`
* Implement stylus eraser support in PDF reader
* Refactor ReaderTextFormatPanel to use ModalBottomSheet and add new formatting controls
* Introduce a customizable horizontal margin setting for the EPUB reader
* Refine folder sync and metadata handling for better conflict resolution and stability.
* Introduce user-adjustable image scaling for the EPUB reader
* Use maxWidthPx as default width fallback for blocks
* Improve cross-page text selection and header styling in the paginated reader
* Refactor speech bubble detection and UI to support segmentation masks and interactive scaling
* Improve speech bubble detection masking and rendering quality
* Update ONNX speech bubble detector to use `.ort` model and optimize inference
* Improve pagination accuracy
* Implement hierarchical folder navigation for the library.
* Refactor library item layout for improved space efficiency
* Add support for browsing and downloading Google Fonts
* Persist library landing state and add shelf search functionality
* Fix base tts sample.
* Move SpeechBubbleDetector to main source set and update ONNX dependency
* Implement a "locate" feature and improve synchronization for TTS (Text-to-Speech) playback across EPUB and PDF readers.
* Refine TTS synchronization and voice management in the EPUB reader
* Adjust OCR checks for OSS flavor and optimize external dictionary intent flags
* Add "Locate" button to PDF drawer's pages tab and move the page number to bottom right of thumbnail
* fix various crashes
* Refactor SpeechBubbleDetector into product flavors
* Implement speech bubble detection caching and background prefetching
* Implement on-demand download for Bubble Zoom ML model
* Add smooth animation for PDF speech bubble expansion
* fixes#252
* hide Google Fonts option, in FontsScreen, for offline variant
* Bump version to 1.0.46(46)
* Implemented ML-based comic panel detection and a panel popup viewer.
* Optimized `ComicPanelDetector` for performance and memory efficiency.
* Optimized comic panel detection performance by introducing a dedicated single-thread dispatcher for ML tasks, replacing mutex-based synchronization.
* Refactored system UI handling and layout padding in `PdfViewerScreen`.
* Refactor `PdfViewerScreen.kt` by extracting components and logic into specialized files.
* replace hardcoded padding with dynamic header height and adjust IME layout logic
* Improve `PdfTextBox` interaction and visual consistency during zoom and pan.
* improve PDF text box dragging and scaling behavior across zoom levels
* optimize color scheme calculation using remember and expand text dimming coverage
* Implement in-app language selection and per-app language preferences.
* Improve PDF lock stability in `PdfVerticalReader`
* Implement "Preserve Image Colors" option for PDF themes
* Optimize TOC locate in ReaderDrawer
* Update library and home screen UI components
* smoother page turn animation in epub pagination mode
* Implement automatic page skipping for TTS when no text is found in PDF viewer
* Refine status bar handling and window insets across main screens
* Optimize ViewModel initialization and integrate AndroidX SplashScreen
* Move ComicPanelDetector to debug source set and introduce IPanelDetector interface
* Optimize TOC scrolling in PdfNavigationDrawerContent
* Bump version to 1.0.45(45)
* Updated `.gitattributes` to correctly vendor all files within the `libmobi` and `woff2` directories.
* Improved TTS chapter transition handling
* Improved TTS stability and chapter advancement in the EPUB reader.
* Implemented PDF metadata extraction for titles and authors using PdfiumCore in `MainViewModel` and `MetadataExtractionWorker`.
* Implemented support for interactive footnotes in the EPUB vertical reader.
* Added support for footnotes in the paginated EPUB reader.
* Implemented a customizable app theming system.
* Added support for app-wide contrast and text brightness customization in the "App Theme" option.
* option to adjust pull-to-chapter-change drag in the EPUB vertical reader under visual options.
* Updated `PdfViewerScreen` to replace the standalone full-screen toggle with a more comprehensive "Visual Options" system UI management tool.
* Added support for AI and Cloud credits in the Pro flavor.
* Implemented credit-based authentication and authorization for AI features and Cloud TTS.
* Updated AI feature access and purchase handling to a credit-based system.
* Refactored and enhanced the Text-to-Speech (TTS) system with persistent caching and a redesigned UI.
* Improved TTS cache management by organizing audio files by book title and adding a detailed cache storage UI.
* Refactored the TTS service to use a WebSocket-based Gemini Live connection for cloud audio generation.
* Removed the TTS cache settings tab and simplified voice sample playback by removing local caching logic.
* Implemented a low-latency streaming mechanism for Cloud TTS using a custom `ConcurrentInputStream` and `ExoPlayer` data source.
* Improved cloud TTS stability and prefetching logic in `TtsService` and `TtsPlaybackManager`.
* Implemented AI summarization caching and cost tracking in the EPUB reader.
* Enhanced chapter summary caching and UI feedback.
* limit summaries for pro users to 10 per day
* Implemented local caching for Cloud TTS audio chunks.
* Removed the Free tier tab from `ProScreen` and simplified the subscription interface. Updated tab logic to focus on Pro and Credits, including a new cost breakdown section for AI and Cloud TTS features.
* Refactored HTML parsing to include all child nodes during content chunking and semantic block parsing.
* Improved image rendering consistency in epub pagination reader
* Improved HTML parsing in `HtmlParser.kt` to better handle complex nested structures
* Improved CSS styling support in the epub paginated reader for word spacing and text decorations.
* Implemented scroll throttling in `epub_reader.js` to improve performance during scroll events
* Improved CFI resolution and scrolling reliability in EPUB reader
* Optimized PaginatedReader performance by caching text decorations.
* Implemented batching for recent file database operations to handle large datasets and introduced `RecentFileSummary` to optimize data retrieval by excluding heavy JSON columns.
* Improved navigation stability by wrapping `navController.navigate` and `popBackStack` calls in a try-catch block to handle `IllegalStateException` during concurrent transitions. Additionally, refined the backstack check for the main route to prevent redundant pops.
* feat(tts): redesign TTS controls with overlay UI and cache management
* Expanded and improved the TTS (Text-to-Speech) capabilities, particularly for Cloud voices.
* Improved TTS playback control and cache management.
* Integrated the TTS cache manager into the settings sheet and improved the TTS configuration UI.
* Updated `DeviceVoicesTab` to respect the current TTS mode, disabling voice selection when not in `BASE` mode.
* Improved error handling and state management for Cloud TTS in `TtsService` and `TtsPlaybackManager`.
* Improved TTS voice selection UI and sample playback logic.
* Updated `TtsUtils` and `TtsService` to remove `chunkIndex` from TTS cache filenames. Refined the cache file naming convention to rely on text and speaker hashes, and updated the cache file filter logic to correctly identify speakers in both legacy and new filename formats.
* Optimized tile rendering and state propagation in PDF viewer
* Added "Expand All", "Collapse All", and "Locate" functionality to the Table of Contents in both EPUB and PDF readers.
* Added sign-in requirement for credit purchases and improved purchase migration logic.
* Updated `EpubReaderTts` to support authenticated TTS requests by passing an auth token provider. The `ttsController.start` method now includes an `authToken` retrieved via `getAuthToken` and explicitly sets the `playbackSource` to "READER".
* feat(ai): replace summarization popup with a comprehensive AI Hub Bottom Sheet
* Improved locator logic and block traversal in `BookPaginator`.
* Updated AI features and Cloud TTS logic.
* Added manual clear and auto-reset functionality for AI summaries and recaps
* Optimized file importing, EPUB parsing, and TTS playback concurrency.
* Restricted TTS mode to BASE in OSS flavor and fixed TTS mode persistence in PDF viewer
* Bump version to 1.0.43(44)
* Refactored the EPUB reader to use localized string resources instead of hardcoded strings across multiple components.
* Refactored the PDF viewer and annotation components to use centralized string resources instead of hardcoded text.
* Updated `strings.xml` with extensive translation hints and localization metadata.
* Optimized PDF tile rendering performance and quality.
* Added support for adjusting TTS voice speed and pitch.
* Updated the TTS settings UI and playback logic to support real-time parameter adjustments.
* Added horizontal scrolling to the PDF viewer bottom toolbar and updated tool arrangement to use fixed spacing.
* Refined cross-page selection and text extraction in `PaginatedReader`
* Updated EPUB reader styling logic to refine typography and layout controls.
* Bump version to 1.0.42(43)
* Improved navigation and search result highlighting in the EPUB reader
* refactor: implement JIT chunk restoration for robust navigation
- Fixes search and bookmark navigation failing in same-chapter transitions.
- Introduced JIT (Just-in-Time) HTML restoration in `epub_reader.js` to
re-populate virtualized chunks before CFI resolution or search scrolling.
- Synchronized search highlighting and user highlights within
newly-restored chunk segments.
- Improved search navigation accuracy by mapping occurrences to
relative chunk indices.
* Implemented a custom text selection engine for the paginated EPUB reader to support cross-page selection and improved handle interaction.
* Implemented management of external file behavior and improved library filtering.
* Added support for toolbar customization in the EPUB reader.
* Added support for toolbar customization in the PDF reader.
* fix: rendering during auto-scroll and navigation on long pages
* Added a "Scroll to Top" feature to the auto-scroll controls in both EPUB and PDF readers.
* Updated folder synchronization logic and redesigned the file type filter dialog.
* Fixed CFI generation and navigation stability in the EPUB reader.
* Improved CFI scrolling and position calculation in the EPUB reader by implementing text node traversal using `TreeWalker`. This ensures accurate positioning and scrolling when a CFI offset spans multiple fragmented text nodes.
* fix fb2 multiline titles, retain footnotes, and prevent stream leaks
- Fix FB2 titles with multiple paragraphs by inserting breaks/spaces
- Prevent resource leaks by properly closing InputStreams in all importers
- Retain "notes" and "comments" sections in FB2 instead of skipping them
- Add support for FB2 poem, stanza, cite, and link tags
* Implement persistence for zoom and pan states when pan lock is enabled in the PDF reader.
* Added `FileTypeBadge` to home and library screens
* Bump version to 1.0.41(42)
* Added support for highlight notes in EPUB reader
* fix(epub annots): ensure persistent highlights and preserve notes on color change
- refactor: unified processAndAddHighlight across scroll and paginated modes
- fix: re-apply highlights to virtualized DOM elements on chunk load
- fix: replaced '|' with ';;' in JS bridge to prevent CFI parsing errors
* feat(epub): redesign annotation UX with theme-aware Bottom Sheet
* Updated highlight handling to use full CFI strings instead of splitting into parts during deletion and style updates. Adjusted `processAndAddHighlight` to return the final CFI and updated the delete button UI to use a contained button style.
* Added support for notes in PDF highlights.
* Implemented support for custom highlight colors in the PDF reader.
* Improved PDF annotation notes and theme handling in the bottom sheet.
* Improved eraser hit detection and added horizontal scrolling to AnnotationDock
* fix: lock scroll tracking during PDF rotation to prevent page jumping in vertical mode
* Implemented a multi-tab reading system for the PDF viewer.
* Redesigned the About dialog on homescreen.
* improved bulk file import support
* Implemented document caching and improved tab restoration in the PDF viewer.
* Implemented native link detection and information extraction in `pdfium_bridge.cpp` and integrated it into `PdfPageComposable.kt`. This includes adding `getLinkInfoAtPoint` to `NativePdfiumBridge` to handle URI, GoTo, and RemoteGoTo/Launch actions, and updating the tap gesture logic to prioritize native link handling.
* Fixed index bounds and layout padding calculation in PdfViewerScreen
* FolderSyncWorker: update supported file types in getFileType
* Extract hardcoded strings to `strings.xml` and `plurals.xml`
* Extract hardcoded strings to `strings.xml` and `plurals.xml`
* Extract hardcoded strings to `strings.xml` and `plurals.xml` in MainViewModel
* Extract hardcoded strings to `strings.xml` and `plurals.xml` in Common.kt
* Extract hardcoded strings to `strings.xml` and `plurals.xml` in Epub Reader
* Add visual options and seamless transitions to the EPUB reader
* Add support for DOCX file format
* Refine padding and status bar inset handling in Epub pagination mode
* Add file size parameter for recent files and sorting
* Refactor book data cleanup logic into a centralized method
* Bump version to 1.0.40(41)
* Add OPDS catalog support for book discovery and downloading
* Implement OPDS search, improved book discovery, and enhanced UI details.
* Improve OPDS search and catalog management
* Add authentication support and extended metadata to the OPDS reader.
* Add support for OPDS 2.0 (JSON) feeds
* Enhance OPDS book downloading with progress tracking and multi-format support.
* Enhance OPDS book management and UI
* Add support for OPDS-PSE (Page Streaming Extension) streaming
* Improve OPDS streaming and catalog management
* feat(EPUB): adapt status bar icon visibility to reader theme
Pass the reader's active isDarkTheme state to EpubReaderSystemUiController to ensure status bar icons automatically switch between light and dark to remain visible against the selected background/page color.
* Implement storage tracking and optimize cache management
This commit introduces a `StorageTracker` to monitor disk usage and implements several optimizations to prevent cache bloat and handle orphaned files.
* refactor: unify book extraction paths and fix cache leaks
- Replaced random UUID and title-based hashing with stable `bookId` for extraction directories across Epub, Mobi, and FB2 parsers.
- Standardized all temporary extraction paths to `cache/imported_file_${bookId}`.
- Updated MainViewModel and MetadataExtractionWorker to provide the mandatory `bookId` during parsing.
- Ensured `clearImportedFileCache` successfully targets the correct directories on book deletion.
- Added a legacy cleanup task in `sweepOrphanedCache` to reclaim storage from old `extracted_epubs` folders.
* fix(pdf): handle NoClassDefFoundError for PdfPasswordException
Updated the PDF loading logic in PdfViewerScreen to catch Throwable
instead of Exception. This prevents the app from crashing when the
underlying pdfium library attempts to throw a PdfPasswordException
that is missing from the runtime classpath (NoClassDefFoundError).
* fix(tts): set language before voice to prevent variant reset
* EpubReaderScreen: increase scroll-hide ignore duration for tap toggles
Increase the threshold for ignoring tap toggles after bars are hidden by scrolling from 250ms to 400ms. This prevents accidental UI toggles caused by "sloppy taps" immediately following a scroll action.
* fix: resolve large bitmap crash on tall PDF pages
- Caps base layer bitmap dimensions to 3000px to prevent GPU texture limit crashes.
- Enables tiled rendering for large pages even at 1x zoom to maintain sharpness.
- Optimizes PdfBitmapPool to support rectangular bitmap allocations.
* Common.kt: ensure unique keys in voice list
* fix: handle ActivityNotFoundException in folder sync screen
* Improve file deletion logic and fix chapter index bounds in epub reader
* fix: ensure WebView bridge callbacks run on UI thread
This resolves a WebViewMethodCalledOnWrongThreadViolation in vertical mode that was preventing chapter chunks from loading beyond the initial viewport.
* Add "Keep Screen On" feature to PDF and Epub readers.
* Add `rawLibraryFiles` to `MainViewModel` and improve file path resolution in `SharedComposables`.
Specifically:
- Updated `MainViewModel` state and UI logic to track and provide unfiltered library files.
- Enhanced file path formatting in `SharedComposables` to better handle Document, Tree, and primary storage URIs.
- Added scrollable support for long text values in `DetailItem` composable.
- Passed `rawLibraryFiles` to `FolderSyncScreen` to ensure sync logic uses the base file list.
* Update info bar background and text colors in EpubReaderScreen to match the selected theme.
* Prevent accidental UI bar toggles immediately after scrolling in EPUB vertical mode.
* feat: implement EPUB highlights sync and legacy migration
- Implement Cloud and Local Folder sync for EPUB highlights.
- Add highlight JSON serialization/deserialization helpers in EpubReaderAnnotations.
- Implement automatic migration of highlights from SharedPreferences to the Database on book open.
- Add cleanup logic to remove legacy SharedPreferences data after successful DB migration.
- Update RecentFilesRepository to trigger local folder metadata sync when highlights are modified.
- Update FolderSyncWorker to pull highlights and custom names from linked folder metadata.
* Update intent filters
* Improve PDF rendering quality and performance.
- Set `FilterQuality.High` when drawing base bitmaps and high-res tiles in `PdfPageComposable`.
- Implement `inSampleSize` calculation in `UniversalDocument` to optimize memory usage during region decoding.
- Enhance bitmap drawing quality by adding `ANTI_ALIAS_FLAG` and `DITHER_FLAG` to the paint configuration.
* Implement custom reader themes for PDF viewer.
This change integrates the `ReaderThemePanel` and theme management logic into the PDF viewer, allowing users to apply preset or custom themes. Previously, the PDF viewer only supported a simple dark mode toggle.
Specific changes:
- Moved `ReaderTheme`, `ReaderTexture`, and theme-related utility functions from `EpubReaderScreen.kt` to `Common.kt` to allow sharing between EPUB and PDF readers.
- Updated `PdfPageComposable` to use `activeTheme` instead of `isDarkMode`, implementing a `ColorMatrix` to apply custom background and text colors to PDF pages.
- Replaced the dark mode toggle in `PdfViewerScreen` with a theme selection button that opens `ReaderThemePanel`.
- Introduced `PdfBuiltInThemes` to provide PDF-specific theme presets.
* Reset page transformation on constraint changes and refine tile rendering logic.
- Reset scale to 1.0 and offset to zero in `PdfPageComposable` when constraints change.
- Update `UniversalDocument` to use floating-point precision for source rectangle calculations and `RectF` for destination mapping to improve rendering accuracy.
* Improve eraser hit detection and visual thickness settings in PDF reader.
* Added support for FB2 book format
* Add support for CBZ files by introducing a `ReaderDocument` abstraction.
Key changes:
- Defined `ReaderDocument`, `ReaderPage`, and `ReaderTextPage` interfaces to provide a unified API for different document types.
- Implemented `PdfDocumentWrapper` and `CbzDocumentWrapper` to handle PDF and CBZ files respectively.
- Updated `PdfViewerScreen`, `PdfPageComposable`, and `MainViewModel` to use the new unified document interfaces.
- Added CBZ file type detection and cover generation logic.
* Add support for CBR and CB7 comic book formats
- Add `me.zhanghai.android.libarchive` dependency to support RAR and 7z archives.
- Implement `ArchiveDocumentWrapper` using `libarchive` to handle CBZ, CBR, and CB7 files uniformly, replacing the previous CBZ-only implementation.
- Update `MainViewModel` and `DocumentFactory` to recognize and process `.cbr` and `.cb7` extensions and their associated MIME types.
- Add support for extracting and caching cover images from CBR and CB7 archives.
- Update UI components (`HomeScreen`, `LibraryScreen`, `AppNavigation`) to handle the new comic book file types.
* Improved PDF embedded annotation hit detection logic
* Updated EPUB and PDF reader logic to improve position tracking and TTS stability.
Key changes:
- Refined CFI and locator handling in `EpubReaderScreen` with improved initialization.
- Updated `BookPaginator` to more accurately calculate text offsets in chunks and improve CFI matching logic.
- Modified `TtsPlaybackManager` to insert media items at the correct index, ensuring proper playback order.
- Simplified `EpubReaderTts` page scrolling by removing conditional checks for backward jumps.
- Disabled OCR fallback in `PdfViewerScreen` during text extraction for TTS.
* Updated extractTextWithCfiFromTop to use getBoundingClientRect for identifying the starting block
* Optimized high-res scale logic in PdfVerticalReader and adjusted layout padding in PdfViewerScreen
* Fixed position sync between both PDF reading modes
* Enabled annotation rendering in PDF tiles and improved scrolling state detection in `PdfVerticalReader` by introducing an `isDragging` flag.
- Implemented `fitZoom` calculation to properly center and scale pages, especially in landscape orientation.
- Updated `clampValues` and animation bounds to ensure content is correctly centered when zoomed out.
- Refined double-tap-to-zoom logic to toggle between `fitZoom`, 1x, and 2.5x scales.
- Replaced manual frame-based zooming with `Animatable.animateTo` for smoother transitions.
- Added `configChanges` to `MainActivity` in `AndroidManifest.xml` to handle orientation and screen size changes manually.
- Reduced delays and improved reliability of initial page snapping in `PdfViewerScreen`.
* Implemented a custom theme engine for the EPUB reader, allowing users to switch between built-in themes (System, Light, Dark, Sepia, Slate, and OLED).
Key changes include:
- Added `ReaderThemePanel` and theme selection logic to `EpubReaderScreen`.
- Introduced a theme persistence layer using SharedPreferences.
- Updated `ChapterWebView` and `epub_reader.js` to dynamically apply background and text colors via JavaScript, including improved contrast adjustment for inline styles.
- Enhanced `CssParser` and `ContentStyler` in the paginated reader to adapt CSS colors based on the active theme's background and text luminance.
- Integrated theme-specific background and text colors into `PaginatedReaderScreen` and its layout components.
- Added a theme palette icon to the reader controls.
* Added custom theme builder and texture support to EPUB reader
* Refactored color picker(PDF) into shared components and enhanced EPUB theme editor
* Updated theme customization UI and improved WebView theme application efficiency
* Updated page flip animation to use paper color with a theme-based tint
* Improved state restoration during paginated reader reconfiguration
- Refactored `SingleFileImporter` to use a streaming approach for HTML imports, improving memory efficiency for large files.
- Implemented `writeHtmlChapter` helper to handle segmented HTML processing and chapter generation.
- Introduced `PdfiumCoreProvider` to provide a singleton instance of `PdfiumCoreKt`.
- Updated `PdfToHtmlGenerator` and `PdfViewerScreen` to use the shared `PdfiumCoreProvider` instance.
* Added print functionality to PDF viewer
* feat(pdf): add interactive button support and visibility reveal heuristic
* Moved search state management to MainViewModel and improved search UI interaction.
* Updated `pdfiumandroid` to version 2.0.0 and handled resulting API changes, including nullable page/text page returns and revised native pointer access.
increased compileSdk to 36.
* Fixed Table of Contents (TOC) truncation bug and improved the TOC UI in `PdfViewerScreen`.
- Implemented `getFixedTableOfContents` using reflection to bypass a library issue where sibling nodes were incorrectly truncated during traversal.
- Enhanced the TOC drawer with a nested, expandable tree structure using the new `PdfTocTreeItem` component.
- Added a custom `VerticalScrollbar` with draggable support for better navigation within long TOC lists.
- Integrated `animateColorAsState` and `animateFloatAsState` for smoother UI transitions in the TOC and scrollbar.
- Optimized TOC loading by flattening the tree structure and managing expansion states with `rememberSaveable`.
* Improved zoom pivot calculation and interaction handling in PdfVerticalReader
* Fixed high-res PDF tile bleeding by implementing clipRect in PdfBitmapLayer
* fix(pdf): resolve zoom stuttering, in pagination mode, by removing eager scale snapping
* Added `TooltipIconButton` and integrated tooltips for tool icons in app bars
* Added external translate and search support for EPUB and PDF readers
* docs: refine project overview and update build instructions in readme
* Fixed PDF reading position restoration during orientation change
* Refactored navigation logic in `EpubReaderScreen` and `PaginatedReader` to improve position restoration and UI consistency.
- Renamed `isNavigatingToBookmark` to `isNavigatingToPosition` and updated the overlay UI to reflect general position navigation.
- Added an orientation change listener to restore the reading position in `VERTICAL_SCROLL` mode using the last known locator.
- Improved highlight navigation in `VERTICAL_SCROLL` and `PAGINATED` modes, including chunk injection logic for highlights and fallback pagination logic.
- Implemented an anchor locator mechanism in `PaginatedReader` to preserve the reading position during layout constraint changes (e.g., orientation or resizing).
* Replaced PDF-to-Markdown reflow with an enhanced PDF-to-HTML generator.
Specific changes include:
- Replaced `PdfToMarkdownGenerator` and `PdfReflowGenerator` with `PdfToHtmlGenerator`.
- Added native bridge methods in `NativePdfiumBridge.kt` and `pdfium_bridge.cpp` to extract character bounding boxes, page objects, and image pixels.
- Implemented vertical merging of text and images in `PdfToHtmlGenerator` to maintain document layout.
- Added logic to detect and filter repeating headers and footers across PDF pages.
- Updated `ReflowWorker` to generate `.html` files instead of `.md` files and updated `FileType` handling.
- Simplified `SingleFileImporter` by removing dependencies on the legacy Markdown generator.
* Updated PDF to HTML generation to include page breaks and split HTML files into individual chapters based on page markers.
* Added junk character filtering and normalization to PDF text extraction
* - Added `allRecentFiles` to `ReaderScreenState` to track all files, including reflowed versions.
- Updated `recentFiles` in `MainViewModel` to filter out reflowed files (`_reflow`) from the main library view.
- Implemented `deleteBookPermanently` in `MainViewModel` to handle book deletion and cache cleanup.
- Added a "Delete Text View" option to the `EpubReader` controls for reflowed files.
- Improved reflow file detection in `PdfViewerScreen` by checking against `allRecentFiles`.
* Implemented a centralized data-saving mechanism in `PdfViewerScreen` using a debounced `saveAllData` function. This refactor consolidates the saving of annotations, text boxes, highlights, bookmarks, and scroll positions, adding lifecycle-aware triggers and a mutex to ensure data integrity during pauses or document navigation.
* Optimized PDF selection and annotation performance by offloading heavy operations to background threads and improving UI responsiveness.
- Moved PDF page/text opening, character range calculations, and text extraction to `Dispatchers.IO`.
- Wrapped UI updates in `updateSelectionVisuals` and selection logic with `withContext(Dispatchers.Main)`.
- Implemented a more efficient `Popup`-based magnifier to replace manual offsets and transformations.
- Updated `PdfSelectionMenuPopup` properties to prevent focus and click-outside dismissal conflicts.
* Added support for reading and displaying embedded PDF annotations.
Changes include:
- Added JNI bindings in `NativePdfiumBridge` and `pdfium_bridge.cpp` to extract annotation count, subtypes, rectangles, and string values (Contents, NM, IRT, T) using PDFium.
- Introduced `EmbeddedAnnotation` data class to represent PDF annotations and their reply threads.
- Implemented annotation extraction logic in `PdfPageComposable` to fetch, group, and map embedded annotations (Sticky Notes, Highlights, etc.) to screen coordinates.
- Updated `PdfSelectionMenuPopup` to support displaying and copying comment threads.
- Improved selection menu positioning and hit detection for annotations.
- Added a safety check to recycle bitmaps in `PdfTile` rendering if handover to the main thread fails.
* Improved comment thread UI
* perf(pdf): native Pdfium-based reflow engine with auto-open
Migrate PDF-to-Markdown reflow generation from PDFBox to a custom
native implementation using Pdfium. This transition improves
processing speed by ~10x and significantly reduces memory overhead.
- Native JNI Bridge: Implemented `pdfium_bridge.cpp` using `dlopen`
to hook into the existing `libpdfium.so` memory space.
- Optimized Extraction: Replaced character-by-character JNI calls
with bulk array retrieval (`getPageFontSizes`, `getPageFontWeights`),
drastically reducing JNI boundary overhead.
- Enhanced Accuracy: Improved Markdown formatting logic by using
native font weight (bold) and relative font size variance (headers).
- Thread Safety: Refactored generator to process pages sequentially
while synchronized with the global `PdfiumCore.lock` to ensure
stability across concurrent UI operations.
- Seamless UX: Implemented a reactive auto-open system in the
PDF viewer that tracks user intent and navigates to the reflow
view immediately upon background task completion.
* Improved PDF to Markdown conversion and added cache cleanup.
- Implemented automated cleanup of imported file caches when deleting books.
- Enhanced `PdfToMarkdownGenerator` with support for font flags (italics), improved kerning, and smarter paragraph wrapping.
- Updated `NativePdfiumBridge` and C++ JNI code to extract font information flags from PDFium.
* Implemented seamless file switching and enhanced reflow transition logic.
Key changes include:
- Added `switchToFileSeamlessly` to `MainViewModel` to handle state transitions and navigation when switching between PDF and reflowed text views.
- Updated `generateAndImportReflowFile` to support automatic opening of the generated file at a specific page/chapter.
- Integrated `NavigationEvent` and `CompletableDeferred` to manage asynchronous navigation and state updates during file switches.
- Modified `EpubReaderScreen` and `PdfViewerScreen` to pass the current position when toggling between PDF and text modes.
- Updated `AppNavigation` to move navigation logic out of the `NavHost` and added loading overlays to viewers to improve UI feedback during transitions.
* Implemented long-press gestures(on the left and right region) for rapid scrolling(to top or bottom) in Musician Mode for both EPUB and PDF readers.
* Added support for book-specific reader settings and redesigned the format adjustment UI.
* perf: implement persistent caching and parallel parsing for single-file imports
- Replaced random UUID generation with bookId-based pathing in SingleFileImporter to enable cache reuse.
- Added a JSON metadata fast-path to return EpubBook objects instantly on subsequent opens for MD, TXT, and HTML.
- Parallelized Markdown chapter parsing using Coroutines (async/awaitAll) to leverage multicore CPUs.
* feat(pdf): implement native text highlighting and interactive selection menu
- Add `PdfUserHighlight` data model to track page index, character ranges, and normalized coordinates.
- Redesign `PdfSelectionMenuPopup` to match the EPUB reader style, featuring a color palette row and a deletion option.
- Integrate highlight rendering into the `PdfPageSelectionsLayer` using Canvas drawing.
- Add hit-testing to `detectTapGestures` to allow users to tap existing highlights to change colors or remove them.
* Implemented PDF highlight persistence, sync, and exporting.
* Improved PDF highlight exporting and visibility logic
- Fixed PDF highlight rendering by correctly calculating coordinates and merging adjacent rectangles into lines.
- Updated `PdfExporter` to include highlights in the exported document and added debug logging.
- Corrected visibility check in `PdfPageComposable` to account for vertical offsets.
- Enhanced `PdfViewerScreen` highlight creation to use merged line rectangles
* Refactored annotation synchronization logic and improved background sync reliability.
- Refactored JSON bundle creation and extraction into reusable helper functions.
- Improved stale file detection by checking all annotation types (ink, text, layout, highlights, text boxes).
- Added background annotation downloading to `SyncWorker`
- Implemented duplicate file cleanup in `GoogleDriveRepository` during uploads.
- Added a `showFeedback` flag to `syncFolderMetadata` to control UI visibility during background operations.
- Fixed a potential data loss edge case by aborting Firestore sync if the bundle upload fails.
* Improved highlight interaction and management in PDF viewer
- Implemented hit tolerance for highlight selection to improve touch detection accuracy.
- Added logic to shift highlight page indices when adding or deleting pages.
- Included highlights in the auto-pruning check for empty pages.
- Added a "Highlights" tab to the navigation drawer to list, navigate to, and delete user highlights.
* perf: fix Home and Library screen stutter by removing main thread file checks
* feat(pdf): implement straight-line highlighter snap
- Added "Straight Line" toggle to highlighter settings popup with persistent state.
- Implemented "rubber-band" drawing effect for highlighters with cardinal direction snapping (0°, 90°, 180°, 270°).
- Optimized gesture loops in Vertical and Paginated readers to respond instantly to setting toggles.
- Rewrote eraser hit detection using point-to-line segment distance math for pixel-perfect erasure of straight lines.
* Added support for external dictionary apps and a dictionary settings sheet.
* Refactored external dictionary integration and improved package visibility
- Updated `AndroidManifest.xml` with `<queries>` for common dictionary apps and intent actions (`PROCESS_TEXT`, `SEARCH`, `SEND`) to support Android 11+ package visibility.
- Refactored `ExternalDictionaryHelper` to streamline dictionary discovery using `Intent.ACTION_PROCESS_TEXT` and `colordict.intent.action.SEARCH`.
- Added a package blocklist in `ExternalDictionaryHelper` to filter out system services (e.g., Samsung Pass, GMS) from dictionary lists.
- Simplified `launchDictionary` logic to prioritize `PROCESS_TEXT` intents.
- Fixed a bug in `PdfViewerScreen` to only show the dictionary upsell dialog when `useOnlineDictionary` is enabled.
* Refactored dictionary settings into a dialog and updated dictionary selection logic.
- Renamed `DictionarySettingsSheet` to `DictionarySettingsDialog` and converted it from a bottom sheet to a formal dialog.
- Redesigned the dictionary settings UI with a clearer distinction between AI and external app modes.
- Added a "Search" option to the external dictionary list that triggers a web search.
- Updated `ExternalDictionaryHelper` to include a package blocklist and support for generic web search intents.
- Simplified `PdfHelper` by removing Pro user checks for the "Dictionary" action.
- Updated icons for dictionary settings across the EPUB and PDF readers.
Background pre-processing for single-file imports (MD/TXT) was generating empty DB cache entries because it only looked at RAM content. This caused position saves in Vertical Mode to fail. This fix ensures that an empty cache entry triggers a disk-read fallback to generate valid semantic blocks on-demand.
Added musician mode to EPUB and PDF readers, featuring tap-to-scroll regions and persistent state. Refactored auto-scroll lock functionality to support the new musician-oriented interface.
* Updated animation specifications for UI controls and overlays to use a 200ms tween duration.
* Implemented fallback file picker and improved CSS rule merging efficiency to fix OOM.
* Implemented PDF reflow mode by introducing a mechanism to convert PDF content to Markdown/HTML for viewing in the EPUB reader.
Specific changes include:
- Added `PdfReflowGenerator` and `PdfToMarkdownGenerator` to handle PDF text extraction and conversion to reflowable formats.
- Updated `MainViewModel` with `toggleReflowMode` logic to switch between original PDF and reflowed views.
- Modified `RecentFileEntity` and `RecentFileDao` to persist user reflow preferences, including a Room database migration (v12 to v13).
- Updated `PdfViewerScreen` and `EpubReaderControls` to include UI options for toggling reflow mode.
- Integrated reflow preference check into the book opening workflow to automatically load the preferred view.
- Updated `AppNavigation` and `EpubReaderScreen` to support the new view switching state.
* Implemented background processing and incremental loading for PDF reflow mode.
- Added `reflowProgress` to `MainViewModel` to track and display PDF-to-Markdown conversion progress in the UI.
- Refactored `PdfToMarkdownGenerator` to generate a skeleton EPUB structure immediately while processing page content (text and images) asynchronously.
- Switched PDF text extraction to use `PDFBox` with optimized memory settings and JPEG compression for images.
- Implemented priority page processing in reflow mode, starting with the user's current page.
- Added "Clear Reflow Cache" debug option to the Home Screen.
- Enhanced `BookPaginator` to support lazy loading of chapter content from disk and improved cache hit detection.
* Refactored PDF Reflow Mode to generate standalone Markdown files instead of temporary EPUB books.
* perf(reflow): optimize PDF-to-Markdown conversion and fix viewing lag
- Re-architected PdfToMarkdownGenerator to use a single-pass stream (O(N) complexity), fixing performance bottlenecks and timeouts on large PDFs.
- Implemented "Virtual Chaptering" in SingleFileImporter for Markdown files to split content into page-level HTML files, eliminating UI lag during reading.
- Simplified ReflowWorker to delegate progress tracking and looping to the generator.
- Enhanced PdfViewerScreen with a prominent top-bar progress indicator and a completion snackbar with an "OPEN" action.
* Optimized EPUB parsing performance and fixed PDF viewer UI layout.
- Optimized `EpubParser` by implementing parallel chapter parsing using coroutines and a semaphore to limit concurrency.
- Reduced memory usage in `EpubParser` and `SingleFileImporter` by no longer storing full HTML content in memory for chapters.
- Updated `EpubXMLFileParser` to support an existing `Document` object to avoid redundant Jsoup parsing.
- Fixed an issue in `PdfViewerScreen` where the snackbar was appearing under the bottom app bar.
* Implemented folder-based annotation synchronization and legacy book ID migration.
- Added `syncLocalAnnotationsToFolder` and `importAnnotationBundle` to `RecentFilesRepository` to handle bundling ink, rich text, layouts, and text boxes into a single JSON sidecar file.
- Introduced `saveAnnotationSidecar` and `getAnnotationSidecar` in `LocalSyncUtils` to manage hidden synchronization files in linked folders using SAF.
- Updated `MainViewModel` to trigger annotation syncing on book close and added a migration utility for legacy book IDs.
- Enhanced `FolderSyncWorker` to include a dedicated phase for importing newer annotation bundles from synchronized folders.
- Fixed an ID mismatch edge case in `PdfViewerScreen` by initiating data migration when a legacy ID is detected.
- Added `selectedBookId` to `ReaderScreenState` to better track the active document across the application.
* fix(sync): resolve Syncthing file lock conflicts and annotation migration bug
- Implement atomic saves (write-to-temp then rename) for annotation sidecars in `LocalSyncUtils` to prevent `.tmp` file locking and partial writes when using third-party sync tools like Syncthing.
- Add robust conflict resolution for annotation sidecars (`resolveAndCleanAnnotationConflicts`) to automatically detect, keep the newest version, and clean up `.sync-conflict` files.
- Fix a bug in `MainViewModel.checkAndMigrateLegacyBookId` where older legacy local files would blindly overwrite newly synced annotation files by adding a timestamp-based clobber check.
* Updated auto-scroll controls UI and refined pause behavior.
- Added semi-transparent look to auto-scroll
- Reduced auto-scroll temporary pause duration from 1000ms to 300ms.
- Updated `AutoScrollControls` styling with background transparency and adjusted elevations/borders.
- Refined `CircularProgressIndicator` visibility to only show when active and paused.
- Enhanced the `Slider` appearance in `AutoScrollControls` with a custom track and thumb.
- Improved play/pause logic in `PdfViewerScreen` to properly reset temporary pause states and jobs.
- Cleaned up redundant comments and formatting in `EpubReaderControls.kt`.
* feat: add file-specific auto-scroll speed profiles for EPUB and PDF
- Updated AutoScrollControls UI with a dropdown to toggle between Global and Local speed modes.
- Implemented persistent local auto-scroll settings (Current, Min, and Max speed) keyed by book ID.
- Ensured "Local mode" preference is sticky per-file, while maintaining Global defaults for new files.
* Enabled auto-scroll toggling via single tap in EPUB and PDF readers
This change introduces a "Stylus Only Mode" toggle in the annotation dock, allowing users to restrict drawing input to stylus pens while maintaining touch support for scrolling and navigation.
Key changes include:
- Added `isStylusOnlyMode` state and persistence logic in `PdfViewerScreen`.
- Updated `AnnotationDock` with a toggle button for the new mode.
- Modified pointer input handling in `PdfPageComposable` and `PdfVerticalReader` to filter touch events when stylus-only mode is active.
- Adjusted tap gesture detection to ensure scrolling and page clicks still function correctly under various input modes.