1167 Commits

Author SHA1 Message Date
Patrick Loser 1803cd071d feat: Add testing support for react code (#1763)
* first attempt

* first attempt

* added first useNovel tests

* more tests

* more tests

* resolved all test issues

* added test-utils

* add a few component tests

* add TESTIGN.md

* add testing gh action

* fixed minor issues

* fixed minor issues
2026-02-25 14:51:46 +01:00
Patrick Loser e4d7ba306b fix: Safety level may not be changed inside a transaction error (#1758) 2026-02-24 12:22:46 +01:00
Rajarshee Chatterjee cc0428752b feat: Replace TTS Notifications with Android MediaSession Controls (Closes #1711)
Replace expo-notifications based TTS controls with a native
NativeTTSMediaControl TurboModule using Android's MediaSessionCompat
and MediaStyle notification. This provides proper media integration
with lock screen controls, cover art display, and seekbar.

- Add NativeTTSMediaControl Kotlin TurboModule with MediaSession
- Support Prev, Rewind, Play/Pause, Next notification buttons
- Show novel cover as notification album art
- Add seekbar with seek-to-element support
- Replace MMKV polling with NativeEventEmitter for instant response
- Add rewind and seekTo methods to TTS in core.js
- Clean up expo-notifications TTS setup from App.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:15:54 +05:30
Patrick Loser b8c177bc55 refactor: Migrate to Drizzle and op-sqlite (#1735)
* added .jj to .gitignore

* chore: Add drizzle-orm and drizzle-kit dependencies to package.json and pnpm-lock.yaml

* update debs

* Edit configs

* create drizzle schema

* generate drizzle migration

* db manager stuff

* Delete unused files

* Update DB Manager

* Rework CategoryQueries and related

* rewrite chapterQueries

* Type safety for chapter order and filter

* Better filter handling

* added queue

* added back database triggers

* Refactor HistoryQueries and LibraryQueries

* fix type issues

* refactor StatsQueries

* refactor NovelQueries

* renamed schemas

* refactor more db calls

* refactor libraryUpdateQueries

* removed deprecated code

* added extracted queries

* fix updates screen issue

* change to op-sqlite

* Update manager.ts

* Update RepositoryQueries

* update packages

* Update NovelQueries

* Update CategoryQueries.ts

* db testing environment v1 (AI)

* Refactor App component to use Suspense for loading state and update database initialization logic. Change drizzle-orm version to 0.45.1 and adjust related database queries for improved error handling and async operations. Clean up unused code and update types for better type safety.

* updated tests

* change db location to default expo-sqlite location

* fix async/sync bugs

* resolve rebase problems

* Added tests for db creation + migration

* update drizzle

* add missing journals to migrations.js

* wrap testDbManager in Proxy to be async

* add db initialization test

* fix lint errors

* improved dbManager.batch function

* remove unused file

* fix rebase conflicts

* use getColumns instead of getTableColumns

* fix lint errors

* fix release build not being able to start

* remove disable lint rule

* improved useLiveQuery

* Resolve issue with the db queue constructor options

* Fix database query issues in library and stats

- Add missing await to all stats query functions
- Remove unnecessary type casts on query results
- Fix downloaded-only filter to use gt(0) instead of eq(1)

---------

Co-authored-by: CD-Z <github.verify097@passmail.com>
2026-02-20 01:17:01 +05:30
Rajarshee Chatterjee 7083c51dea fix: Include selectedIds in Chapter List extraData for Selection Highlight (Closes #1750)
LegendList's extraData only included downloadingChapterIds, so chapter
items weren't re-rendered when selection state changed via long press.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 01:37:33 +05:30
tomsLt0 f0693204e1 fix: Improve Next Chapter Selection Logic (#1744)
improve next chapter selection logic
2026-02-19 01:18:17 +05:30
Rajarshee Chatterjee a1c5350e8e fix: Miscellaneous UI Tweaks 2026-02-12 21:23:40 +05:30
Rajarshee Chatterjee 8f237909d5 feat: Show First Unread Chapter in ReadButton and FAB When No Last Read
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 20:19:52 +05:30
Rajarshee Chatterjee 11ff69d4f5 fix: Pre-Fetch Adjacent Page Chapters in Reader and Library Updates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:40:37 +05:30
Rajarshee Chatterjee d15cf98742 fix: Order Chapter Pages Numerically in Queries for Accurate Retrieval (Closes #1742) 2026-02-12 01:01:20 +05:30
Rajarshee Chatterjee 29bd6612e9 refactor: Optimize Library Screen Performance and Fix Category Bug
Decouple selection state from renderScene via SelectionContext to prevent
all TabView tabs from re-rendering on every selection toggle. Extract
LibraryNovelItem as a memo-wrapped component with stable callbacks and
primitive props so only affected items re-render. Replace O(n) array
lookups with Set-based O(1) checks throughout. Memoize all inline
closures, list furniture, and style objects. Fix library[index] bug that
used the wrong array for "Update Category" menu action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 00:41:59 +05:30
Rajarshee Chatterjee ab1e36d280 refactor: Update Components to Follow Material Design 3 Guidelines
Update 13 components to comply with MD3 specs:
- Switch: rewrite with MD3 dimensions (52x32 track, 16/24 thumb),
  animated thumb size, proper color tokens and border
- BottomTabBar: fix active indicator (64x32, borderRadius 16),
  label weight/color, container padding
- SearchBar: fix placeholder color, explicit borderRadius 28
- Chip: fix fontSize 14, consistent MD3 color tokens
- Actionbar: remove rounded corners, tonal elevation
- Menu: borderRadius 4, elevation 2, surfaceContainer bg
- SegmentedControl: height 40, borderRadius 20
- List: icon/subheader use onSurfaceVariant, description fontSize 14,
  divider uses outlineVariant
- BottomSheet: add 28dp top corner radius
- SwitchItem: add paddingHorizontal 16, description fontSize 14
- ConfirmationDialog: content fontSize 14
- IconButtonV2: disabled color uses onSurface at 38% opacity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:41:00 +05:30
Rajarshee Chatterjee f1fdafd37f fix: Prevent Tab Bar Height Jump and Shadow Flash on Browse Screen
Fixes initial render height jump by adding initialLayout with window dimensions to TabView. Removes shadow flash on tab switch by setting elevation to 0 and adding consistent border styling.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 22:54:35 +05:30
Rajarshee Chatterjee 4c7684a3a7 refactor: Optimize Novel Screen Performance and Fix Download State Tracking
- Optimize Novel screen components with useCallback, useMemo, and memo to prevent unnecessary re-renders
- Replace download queue array iteration with downloadingChapterIds Set for O(1) lookups
- Add loading shimmer to chapter count display (replaces "Loading..." text)
- Fix state mutation bug in useNovel updateChapter (now creates new array)
- Refactor ChapterItem API (onDeleteChapter, onDownloadChapter props for better stability)
- Track download completion via useEffect to update chapter isDownloaded state
- Fix pagination control logic and improve spacing
- Remove unnecessary local state in ChapterDownloadButtons

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 22:48:14 +05:30
Rajarshee Chatterjee 2f45db659b fix: Replace Sync Database Operations With Async to Prevent Database Lock (Closes #1716)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:49:57 +05:30
Rajarshee Chatterjee 9e38ad114d fix: Sanitize EPUB FileName to Remove Filesystem-Unsafe Characters (Closes #1480)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 16:31:31 +05:30
Rajarshee Chatterjee 45c4ea8ca0 fix: Handle IOException in NativeFile to Prevent EPUB Import Crash Loop (Closes #1315)
Synchronous TurboModule methods throwing IOException (FileNotFoundException)
crash the app process before JS catch blocks execute. Wrap file I/O in
try/catch to convert IOException to Exception for proper bridge serialization,
breaking the crash loop caused by stale tasks in the MMKV queue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 16:19:07 +05:30
Rajarshee Chatterjee d2b95ae316 fix: Use NativeFile for Custom CSS/JS Import to Fix Content URI Read Failure (Closes #1661)
Replace expo StorageAccessFramework.readAsStringAsync with NativeFile
copyFile+readFile to properly handle content:// URIs from DocumentPicker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 15:57:14 +05:30
Rajarshee Chatterjee 02121152b3 fix: Stabilize Scroll Handler References to Prevent Infinite Re-render Loop (Closes #1679)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 15:40:14 +05:30
Rajarshee Chatterjee caed965b6b fix: Prevent EPUB Import Crash from DocumentPicker Cache Cleanup (Closes #1725)
Use content:// URI directly instead of copying to cache directory, which
could be cleaned up by the system before the background import task runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 15:20:16 +05:30
Rajarshee Chatterjee a062beee87 fix: Add Max Height to Set Categories Modal (Closes #1738) 2026-02-06 14:56:32 +05:30
Patrick Loser 3095882516 Replace react-native-paper menus with custom implementation (#1733)
* improve custom Menu component

* replace react-native-paper menu

---------

Co-authored-by: CD-Z <github.verify097@passmail.com>
2026-02-01 17:29:23 +01:00
Patrick Loser 4ad0639796 Fix: Chapter loading for jump to chapter modal and chapter drawer
* updated debs

* Jump to chapter now loads not preloaded chapters

* chapter drawer scrolls to current chapter

* Load new chapters when reaching end of chapter drawer

* fix JumpToChapterModal rebase

* fix Chapter drawer current chapter position detection

---------

Co-authored-by: CD-Z <github.verify097@passmail.com>
2026-01-31 13:11:07 +01:00
Rajarshee Chatterjee b53ec3352f feat: Support Additional Plugin Setting Types (Dropdown and Checkboxes) 2026-01-28 22:23:00 +05:30
Rajarshee Chatterjee c40edd5b2c feat: Add Kitsu Tracker (Closes #416) 2026-01-25 14:50:17 +05:30
Rajarshee Chatterjee bdd42caaaf chore: Update Repository Links to Use lneader Instead of LNReader 2026-01-20 12:20:15 +05:30
Rajarshee Chatterjee ab4eee31ce feat: Allow All Safe Tags and Attributes When Sanitizing Chapter HTML (Closes #1715) 2026-01-20 09:26:32 +05:30
Rajarshee Chatterjee 3f9886a2e5 chore: Update Repository Links to Use lneader Instead of LNReader 2026-01-20 08:45:12 +05:30
kingstar1111 198b7443ae feat: Add RTL (Right-to-Left) Language Support (#1717)
feat: RTL support
2026-01-20 08:32:58 +05:30
Rajarshee Chatterjee 9922d43940 fix: Remove Missing Image References During EPUB Export (Closes #1696)
This is a cherry-pick from @IstarVin’s PR #1558. Thanks for the fix and for contributing. I cherry-picked it for the next release since the original PR had merge conflicts.
2026-01-15 09:24:43 +05:30
Rajarshee Chatterjee ae99b077d4 feat: Add @noble/ciphers for Plugins (Closes #1709) 2026-01-15 09:08:43 +05:30
Rajarshee Chatterjee 0cb9da9027 refactor: Replace withTransactionAsync With withExclusiveTransactionAsync for Improved Concurrency Handling (Closes #1636) 2026-01-15 08:20:37 +05:30
Mousica 467a97dcf7 feat: Add Volume Button Offset Setting and Fix Related UI Issues (#1685) 2025-12-24 19:13:52 +05:30
Rajarshee Chatterjee 3849b797c9 fix: Show Plugin Settings When Update Adds New Settings (Closes #1674)
[skip ci]
2025-12-08 20:50:30 +05:30
Rajarshee Chatterjee 52d9d9ea1d feat: Continue Reading While App Runs in Background 2025-12-06 19:03:44 +05:30
Rajarshee Chatterjee 2cabc9849c fix: Skip Failed Entities During Backup Creation and Add Error Handling 2025-12-06 15:16:22 +05:30
Rajarshee Chatterjee 17049aca1c feat: Use All Chapters in Jump-to-Chapter Modal 2025-12-06 14:39:17 +05:30
Rajarshee Chatterjee 9608d59efe fix: Update Battery Level on Chapter Change (Closes #1650) 2025-12-06 13:27:19 +05:30
Rajarshee Chatterjee a7942212a0 fix: Show Page Names Instead of Numbers (Closes #1647) 2025-12-06 13:09:39 +05:30
Rajarshee Chatterjee a22aa53c51 fix: Add Unique Keys to All LegendList Implementations 2025-12-06 13:03:00 +05:30
Rajarshee Chatterjee 1ce16dc643 chore: Cleanup Unused Imports 2025-12-06 12:56:51 +05:30
Rajarshee Chatterjee b7ecd1d749 chore: Update Website Link (Closes #1666) 2025-12-06 12:48:42 +05:30
Rajarshee Chatterjee 44e177a5ca feat: Allow <ref> Links in Sanitised HTML (Closes #1672) 2025-12-06 12:48:21 +05:30
Rajarshee Chatterjee b09cd3d587 fix: Sort Updates Correctly (Closes #1652) 2025-12-06 12:44:11 +05:30
Gabriel Vasconcelos 9d58161729 feat(tts): Refactor Reading Logic to Fix Overflow and Add New Settings (#1664)
feat(tts): refactor reading logic and add new settings (voice, speed, pitch, auto page advance)

- Improved how TTS reads page content for smoother playback
- Added settings for voice selection, speed, and pitch control
- Added auto page advance support
- Added scroll-to-top behavior after advancing pages
- Updated UI to expose new TTS configuration options

[skip ci]
2025-12-06 12:18:35 +05:30
Rajarshee Chatterjee e07eed4a95 fix: Prevent App Crash in Offline Mode (Closes #1651) 2025-12-06 12:14:54 +05:30
Patrick Loser e09704c711 fix: Replace react native paper components
* updated debs

* Added Custom Menu component

* Added new BottomTabBar

---------

Co-authored-by: CD-Z <github.verify097@passmail.com>
2025-11-29 12:39:01 +01:00
Rajarshee Chatterjee 3af24f0815 fix: Improve Migration Error Handling 2025-11-16 13:18:58 +05:30
Rajarshee Chatterjee 4c0e7f6013 fix: Add Backward Compatibility to Tasks Queue 2025-11-16 12:36:42 +05:30
Rajarshee Chatterjee ea298273af fix: Categories Not Sorting
Closes #1642
2025-11-15 20:54:55 +05:30