Repository navigation
Fix RSVP chapter progress and sweep restoration - #159
Merged
Merged
Conversation
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.
What changed
Reader and RSVP now use the same source-word chapter progress: opening RSVP at 75% through a chapter remains at 75%, regardless of the book-wide percentage or the playback starting point.
RSVP sweep navigation now covers the full current chapter after a midway launch, saved-state restoration, landscape/portrait layout changes, and settings reloads. The drag handler reads the current playback context rather than retaining an earlier frame list.
Full navigation reuses the cached chapter generation. When the selected word falls inside a grouped unit, only that unit is split around the selection; the remaining chapter retains its cached segmentation. Playback effects and indexing run off the UI thread, and startup timing stays attached to the selected position.
Risk
Source-frame alignment and startup ramps are the main sensitive areas. Unit and device regressions cover exact split-word restoration, complete source-word coverage, forward/backward sweep bounds, resumed timing, progress parity, presets, and punctuation holds. Sweep remains scoped to the current chapter. Device rotation coverage combines portrait/landscape-sized layouts with saved-state recreation.
Validation
./gradlew qualityCheck— 840 unit tests passed./gradlew qualityGate— passed on the final commit, including Android Lint and APK assemblygit diff --checkOn the connected CPH2493 / Android 16 debug build, a 5,000-word single-word-frame fixture took 1,069 ms for cold preparation and 30/23/25 ms for cached reload preparation. These are observational timings, not universal latency guarantees. Frame preparation runs off the UI thread; swipes use the prepared frame list.
Quality policy
ignoreFailures, broad exclusion, or unrelated threshold relaxation was added