Repository navigation
✨ feat(reader): persist highlights and Copy as quote - #164
Merged
Merged
Conversation
vitofico
marked this pull request as ready for review
October 30, 2026 12:40
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the first highlighting increment for #143. Readers can enter Highlight mode, save a selection in Yellow, Green or Pink, recolour or remove a saved passage, and use the native selection menu to Copy as quote with the book title and author.
Room 9 → 10 stores UUIDs, exact locator JSON, selected text, book identity and metadata, update timestamps and soft-deletion tombstones. Highlights survive download deletion and reimport. Readium restores exact structural ranges so identical quotations anchor to the selected occurrence; invalid or changed chapter content preserves the quote without guessing a location. Decoration updates remove deleted UUIDs across page lifecycles.
This PR connects storage, Readium rendering and the selection UI. The exported Room schema, regression tests and translations account for much of its size. A highlights list and jump navigation remain PR 2; server sync and notes remain later work.
Component(s)
Validation
scripts/dgradle :app:assembleDebug :app:assembleRelease test lint --max-workers=2 --no-watch-fs. Both APKs contain the frozen production adapter and exclude the spike Activity/test EPUB.e2dbeb8; the release job is skipped for this PR.The rendering adapter uses the pinned Readium 3.0 decoration-group shape and fails closed if that contract changes. Toolkit upgrades must rerun the browser regressions documented in
docs/reader-highlights.md.Screenshots
All screenshots use the original synthetic test EPUB committed under reader test resources.
Checklist
core/identityalgorithm and shared fixtures: unchanged; consumes existing normalizationRelated issues
Refs #143. This is PR 1; it deliberately leaves the issue open for the remaining increments.