* Add desktop release CI and support for Arch Linux packaging
* Make Gradle wrapper executable in desktop-release workflow
* Make Gradle wrapper executable in desktop-release workflow
* Make Gradle wrapper executable in desktop-release workflow
* Configure Gradle and update Java environment in desktop-release workflow
* Update Java setup and AUR packaging in desktop release workflow
* Update Java setup and AUR packaging in desktop release workflow
* Add MSIX packaging support for Windows desktop distribution
* Update AUR packaging metadata and validation
* Use spine toc attribute for NCX resolution
* crash fixes
* Implement automatic discovery and injection of EPUB font face siblings
* Enhance custom font support with family grouping and variable font handling
* Optimize metadata loading and improve TTS highlighting
* Add keyboard navigation support for EPUB reader
* Refine PDF spread page sizing to respect aspect ratios
* Implement responsive maximum height for reader popups and sheets
* Handle TTS generation failures by skipping problematic chunks
* Refactor PDF tile rendering logic and zoom indicator behavior
* Prefer block and offset locators over page index in native vertical flow
* Implement save and share actions for original book files
* Add Estonian language support
* Implement temporary viewing mode for external files
* Implement direct opening for temporary external files without library persistence
* fix failing tests
* Import SharedFileCapabilities in DesktopLibraryUi
* Improve native vertical reader progress, persistence, and image support
* Center target in viewport for native vertical reader and support animated scrolling
* Enhance Cloud TTS with navigation controls and shared UI overlay in desktop app
* Refactor Cloud TTS voice settings and remove standalone settings overlay on desktop app
* Persist reader window state and improve slider interaction in desktop app
* Improve PDF page transitions and refine focus management in desktop app
* Refactor scrollbar interaction and adjust desktop modal focus handling
* Improve PDF sidecar synchronization and cross-platform metadata compatibility
* Refactor PDF annotation comment logic to shared module and implement Desktop UI
* Refactor reader screen to use tap-to-toggle and full-width styling in desktop app
* Refactor reader workspace layout and chrome-panel interactions
* Implement global search keyboard shortcuts and focusable chrome layers
* Implement flavor-specific legal links and update the About UI
* Refactor reader UI controls on desktop app
* Enhance desktop folder sync with background metadata extraction and improved error handling
* Refactor Library UI and remove redundant Home tab in desktop app
* Add custom tooltips to reader icon buttons in desktop app
* Integrate app theme controls into reader interfaces on desktop
* Add right-to-left pagination support and improve focus restoration on desktop app
* Improve EPUB pagination geometry and diagnostic logging for layout cutoffs on desktop app
* Update desktop reader defaults and implement settings migration
* Implement block-based position tracking in ReaderLocator
* Enhance EPUB highlighting reliability in desktop app
* Add support for custom reader themes and update highlight palette logic in desktop app
* Replace the Tools panel with a "More" dropdown menu and refactor account UI
* Implement account profile header in desktop sidebar
* Implement cloud sync reliability improvements and sidebar toggle on desktop app
* Improve EPUB annotation synchronization and highlight mapping accuracy in desktop app
* Integrate WebView2 for EPUB vertical rendering on Windows
* Refactor reader layout logic and enhance WebView2 diagnostics
* Improve vertical reading layout and WebView2 resizing on Desktop
* Refine vertical reading mode layout and margin handling
* Enhance reader locator precision and Desktop mode-switching reliability
* Implement chapter-level caching and warm-start pagination in desktop app
* Replace bundled KCEF with native system webviews via SWT
* Refactor EPUB page info bar visibility and layout logic
* Improve PDF toolbar persistence and fix tab reactivation logic
* Enable multi-selection and bulk operations for custom fonts
* Refactor instrumentation tests
* Add EPUB UI test fixture and initial instrumentation tests
* Expand EpubReader UI tests and improve accessibility
* Add instrumentation tests and test tags for library and reader screens
* Enhance OPDS parser logic and catalog integration
* Add support for toggling local synchronization on a per-folder basis.
* Implement tri-state sizing for the TTS overlay
* Persist TTS overlay size across sessions
* Refactor reader brightness control and add incremental step buttons
* Improve CSS support, pagination control, and style-aware semantic caching
* Improve link handling, interaction, and diagnostics in the paginated reader
* crash fixes
* Implement persistent pending removal for external files
* Implement book-specific word replacements
* Add native vertical reading mode with custom renderer
* Implement text selection and navigation improvements for the native vertical reader
* Implement locator-based navigation and improved vertical scrolling in native vertical mode in epub
* Implement lazy loading and chapter prefetching for native vertical reader
* Improve window lifecycle and disposal handling on Desktop
* Optimize vertical reading performance in desktop app
* Enhance TTS start accuracy and diagnostic logging on desktop
* Refactor AI settings visibility on desktop
* Improve pagination height measurement and enhance cutoff diagnostics
* Implement lifecycle management and improve justified text splitting for pagination
* Refine AI usage tracking and force AI feature visibility on Desktop
* Add descriptive context comments and usage examples to string and plural resources.
* Optimize performance and memory usage in search and state mapping
* Replace reader page sliders with minimal slider and navigation controls
* Add support for CBT comic archives
* Harden file path validation and XML parsing to prevent security vulnerabilities
* Implement local account profile caching and optimize desktop performance
* Improve desktop persistence reliability and add Linux secure storage support
* Improved PDF zoom stability and layout prediction during zoom commits
* Improved PDF spread layout prediction, reader focus restoration, and account profile caching
* Enhance highlight precision and scoping using block-local offsets and CFIs
* Enhance cloud book content synchronization and background downloads
* Implement granular timestamp tracking for reading positions and PDF annotations
* Restrict diagnostic logging and stack traces to debug builds
* Refine PDF page gaps and reader chrome interaction logic
* Refactor PDF highlight rendering and overhaul Desktop sidebar UI
* Implement a new interaction dock and undo/redo history for PDF annotations in desktop
* Enhance PDF color picker and improve navigation scroll restoration
* Add highlight palette customization and improve selection menu UI in desktop app epub reader
* Enhance desktop shelf management and library organization
* 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
* 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
* 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)
* 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)
* Added support for ODT and FODT file formats.
* Improved `OdtParser` to support enhanced document formatting and external assets
* Added support for viewing CSV, TSV, JSON, XML, logs, and source code files by dynamically converting them to HTML.
* 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)
* 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.
* 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 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.
* feat: rework Folder Sync architecture to separate Managed vs Linked books
- Introduced "Managed" (imported to app storage) vs "Linked" (SAF URI) book logic.
- Disabled Google Drive/Metadata synchronization for Folder-Linked books to respect privacy and storage.
- Updated deletion logic: Folder books are now marked as deleted in the DB to blacklist them from future auto-scans, while Managed books are permanently purged from local and cloud storage.
- Enhanced folder sync discoverability by adding a direct "Sync Folder" navigation button in Home screen.
- Implemented reactive pager navigation in MainScreen and LibraryScreen via LaunchedEffect to allow programmatic tab switching from the ViewModel.
* Implemented a local folder synchronization system to track and update book metadata across devices.
Key changes:
- Added `FolderBookMetadata` and `LocalSyncUtils` for serializing and managing metadata files in a `.episteme` directory.
- Implemented bidirectional sync in `FolderSyncWorker` to reconcile local database state with folder-based metadata using timestamps and Syncthing conflict resolution.
- Updated `MainViewModel` to trigger folder metadata sync when closing a book and verify for remote updates upon opening.
- Enhanced folder management with manual scan support via `WorkManager` and automatic cleanup of database entries when a folder is disconnected.
- Added `RecentFileDao` methods to support bulk deletion and prefix-based file lookups.
* Removed API 34 restriction for chapter processing and updated local folder sync directory name
* Increased TTS timeouts, added edge-to-edge support in MainScreen, and improved TtsChunk mapping safety
* Improved folder synchronization and metadata management.
- Added metadata-only sync option and triggered it on app start.
- Implemented hidden metadata filenames (prefixed with `.`) to reduce file clutter.
- Added automatic creation of `.nomedia` files in the sync directory.
- Enhanced sync conflict resolution by picking the latest metadata and cleaning up obsolete or orphaned files.
- Added "Sync Metadata" button to the Library screen.
- Updated UI labels for local folder sync to clarify Google Drive integration.
- Refactored `FolderSyncWorker` to support targeted metadata-only synchronization.
* Implement folder sync migration and refactoring
- Added a migration dialog to inform users about the folder sync refactor, where books are now read directly from external storage.
- Updated `MainViewModel` to handle migration state and trigger a full scan upon completion or dismissal of the dialog.
- Modified `FolderSyncWorker` to support legacy book matching during migration, updating file URIs and cleaning up internal app storage for migrated books.
- Improved synchronization logic between local and remote metadata, including cleanup of orphaned metadata files.
- Refined `RecentFileItem` updates during sync to preserve progress and bookmarks based on last modified timestamps.
* Implemented pull-to-refresh for library sync and enhanced folder file deletion.
- Added `isRefreshing` state to `MainViewModel` and integrated `PullToRefreshBox` in `HomeScreen`.
- Implemented `refreshLibrary` to trigger cloud and folder metadata synchronization.
- Updated deletion logic to physically remove files and metadata from synced local folders.
- Added a warning to the delete confirmation dialog when removing folder-synced items.
- Improved folder sync reliability by performing lazy cleanup of missing files during interaction and sync.
- Fixed a bug where sync loading indicators would not retract on failure or cancellation.
* Improved bookmark navigation and scroll synchronization in EPUB reader
- Refined bookmark navigation logic for vertical scroll mode to handle chunk injection more reliably.
- Added `isNavigatingToBookmark` state to show a loading overlay during long jumps.
- Implemented `onScrollFinished` callback in `CfiJsBridge` to synchronize UI state with WebView scroll completion.
- Updated `ChapterWebView` to use `rememberUpdatedState` for JavaScript bridge callbacks to ensure data consistency.
- Improved `getCurrentCfi` and `scrollToCfi` in `epub_reader.js` with better visibility probing and retry logic for detached nodes.
* Implemented background metadata extraction for folder sync.
Key changes:
- Added `MetadataExtractionWorker` to handle heavy metadata and cover extraction for files in the background.
- Refactored `FolderSyncWorker` to perform fast file discovery using placeholders, enqueuing the metadata worker upon completion.
- Added `getFolderBooksWithoutCovers` query to `RecentFileDao`.
- Updated UI components (`EmptyState`, `MainViewModel`) to improve user feedback during sync and provide clear setup actions.
- Enhanced `EmptyState` composable to support secondary actions and custom button text.
* Updated Library Screen UI
docs: Revamp README and add APK naming convention
This commit introduces a complete overhaul of the `README.md` to improve project presentation. Key changes include:
* Adds a new header with the app icon and a Google Play badge.
* Updates the feature graphic and includes a note distinguishing the OSS version from the Play Store version.
* Refines the "Open Source Libraries" section to be more structured.
* Moves the main preview image into the `docs` directory.
Additionally, the `app/build.gradle.kts` file is updated to configure a standardized naming convention for output APK files, including flavor, version, and build type.
* refactor copyright headers and fix README icon alignment
This commit introduces two main changes across the codebase:
The `spotless/copyright.kt` template have been updated for consistency:
* The author name is simplified from "Episteme Authors" to "Episteme".
* The contact email prefix is shortened from "Electronic mail:" to "mail:".
Second, the `README.md` file is adjusted to correct the vertical alignment of the app icon with the project title.