* feat(library): implement grouping of books by series or author
- Added functionality to group books in the library by series or author.
- Introduced new utility functions for creating book groups and parsing author strings.
- Updated the LibraryPageContent to track the current group for navigation.
- Created a new GroupHeader component to display the current group context.
- Enhanced the Bookshelf component to support displaying grouped books.
- Updated settings to include grouping options in the view menu.
New files:
- src/__tests__/utils/libraryUtils.test.ts - Unit tests for new utility functions.
- src/app/library/components/GroupHeader.tsx - Component for displaying group context.
- src/app/library/utils/libraryUtils.ts - Utility functions for grouping and parsing authors.
* Use group by and sort by constants, and split sort/group by menus into their own elements
* Format code with autoformatter
* Remove any casting from tests
* Translate missing strings
* refactor: cleaner layout with collapsible view menu options
---------
Co-authored-by: Huang Xin <chrox.huang@gmail.com>
* feat: add RSVP speed reading feature
Implements Rapid Serial Visual Presentation (RSVP) speed reading mode:
- Display words one at a time with ORP (Optimal Recognition Point) highlighting
- Adjustable WPM speed (100-1000) with keyboard/button controls
- Punctuation pause settings (25-200ms)
- Progress tracking with chapter navigation
- Context panel showing surrounding text when paused
- Keyboard shortcuts (Space, Escape, arrows) and touch gestures
- Chapter selector for quick navigation
- Respects current theme colors
- Persists settings (WPM, pause duration, position) per book
New files:
- services/rsvp/RSVPController.ts - Main controller with playback logic
- services/rsvp/types.ts - TypeScript interfaces
- components/rsvp/RSVPOverlay.tsx - Full-screen RSVP reader UI
- components/rsvp/RSVPControl.tsx - Integration component
- components/rsvp/RSVPStartDialog.tsx - Start position selection
Closes#3111
* fix(rsvp): use portal to fix overlay stacking context issue
- Render RSVP overlay and start dialog via React Portal to document.body
- This ensures the overlay appears above all other content regardless of
parent component CSS transforms or stacking contexts
- Add fallback colors for theme values to ensure solid background
* fix(rsvp): improve UX with progress sync, sentence highlight, and better dialogs
- Fix start dialog transparency by using solid opaque background with proper
fallback colors for both light and dark modes
- Increase context words from 50 to 100 words before/after current word
- Add progress sync on RSVP exit - navigates reader to the last word position
- Add temporary bright green sentence underline on exit (5 second duration)
to easily locate where reading left off
- Helper function to expand word range to full sentence boundaries
* fix(rsvp): store full BookNote for proper annotation removal
The addAnnotation API requires the full BookNote object (including CFI)
when removing annotations, not just the ID. Changed tempHighlightIdRef
to tempHighlightRef to store the complete BookNote object.
* test(rsvp): add Playwright e2e tests for RSVP feature
- Set up Playwright test infrastructure with config
- Add comprehensive e2e tests for RSVP speed reading:
- Opening RSVP from View menu
- Start dialog options
- Play/pause toggle
- Speed adjustment
- Skip navigation
- Keyboard shortcuts
- Progress bar
- Chapter navigation
- Accessibility tests
- Add test data attributes and ARIA labels to RSVPOverlay
- Add test scripts to package.json
* fix(rsvp): clarify start dialog option labels
Update the RSVP start dialog to use clearer language:
- "From Beginning" → "From Chapter Start" (since it starts from chapter beginning)
- "From Current Position" → "From Current Page" (starts from visible page)
* fix(rsvp): use correct theme colors from themeCode
The RSVP components were using incorrect palette key names (camelCase
like `base100` instead of hyphenated like `base-100`), causing the
fallback colors to always be used instead of the reader's actual theme.
Fix by using themeCode.bg, themeCode.fg, and themeCode.primary directly,
which are already resolved from the palette with correct keys.
* fix(rsvp): use theme accent color for sentence underline and persist until page change
- Change underline color from hardcoded green (#22c55e) to theme accent
color (themeCode.primary), matching the ORP focal point highlight
- Remove 5-second timeout that auto-removed the underline
- Add cleanup on page navigation, new RSVP session start, and unmount
- Add removeRsvpHighlight helper function for consistent cleanup
* fix(rsvp): transition to next chapter when reaching end of section
When RSVP reached the end of a chapter, it would restart the current
chapter instead of moving to the next one. This happened because RSVP
extracts ALL words from the current section via renderer.getContents(),
so when words run out, the entire chapter is done.
- Always use view.renderer.nextSection() when RSVP exhausts words
- This moves to the next chapter instead of staying in the current one
* refactor: remove test files, unsure of use case for now
* chore: remove Playwright e2e test scripts from package.json
- Deleted e2e test scripts related to Playwright from package.json as they are no longer needed.
- Removed Playwright as a dev dependency to streamline the project.
* fix(rsvp): ensure CFI retrieval occurs before navigation
- Updated comments to clarify the necessity of obtaining CFI for both the navigation and sentence highlight before invoking the goTo() method, as it may re-render the document and invalidate Range objects.
- Introduced a new variable for sentence text to enhance readability and maintainability of the code.
* chore: sync pnpm-lock.yaml after removing @playwright/test
* style: format RSVP components
* fix: lint errors and timezone-aware date formatting
* i18n: support CJK text and add translations
---------
Co-authored-by: Huang Xin <chrox.huang@gmail.com>
* feat: enable linking to settings items
* feat: integrate command palette with global state and styles
* feat: add command pallete ui and fuzzy search
* feat: add command palette with global state and styles
* feat: add command registry and search dependencies
* fix: open command palette with shortcuts in reader page
---------
Co-authored-by: Huang Xin <chrox.huang@gmail.com>
* fix(settings): ensure latest config is used when saving view settings
* fix: reader ruler appearing before other book reading contents
* feat(reader): dispatch reader-closing event during book close
* feat(reader) add auto reposition to top when changing pages and position persistence on book close
* fix(reader): add rtl prop to ReadingRuler component
* fix(reader): handle vertical ltr writing mode in ruler auto positioning
* chore: revert redundant changes to settings.ts
* refactor: remove redundant reader-closing
* refactor: use store progress for ruler positioning with throttled saving
* feat(highlight): extend types and constants for custom hex colours
* feat(highlight): update colour to support hex strings
* refactor(annotator): update component to accept hex colours
* feat(highlight): add colour picker with max 4 custom colors
* feat(settings): add custom colour editor with limit
* refactor: custom highlight colors can only be modified in settings
---------
Co-authored-by: Huang Xin <chrox.huang@gmail.com>
Move Radix/shadcn-based UI primitives into a dedicated
`components/primitives` directory to better reflect
their low-level, composable nature.
Imports remain ergonomic via an alias to `components/ui`.
App-level components should continue to use PascalCase filenames.
* refactor(ai): remove chat icons from conversation list items
* feat(ai): add scroll-to-bottom button with animations and dynamic spacer
* fix(ai): align connection status icon with text in settings
* feat(ai): scroll to bottom on chat panel open and improve scroll behavior
* feat(ai): add loading overlay with blur transition for chat history
* feat(ai): pass loading state through component chain for history loading