refactor(reader): rebuild divina scroll pager#629
Merged
Conversation
Replace the SwiftUI scroll-based divina pager with native paged containers on iOS, macOS, and tvOS. Unify page commit and presentation invalidation handling, clean up obsolete scroll transition settings, and simplify reader naming and tvOS input paths.
Drop the unused tvOS focus wrapper and remove the unused scroll activity callback from the native scroll pager paths.
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.
Problem
The DIVINA scroll reader had accumulated unstable behavior after the SwiftUI scroll-based pager was replaced. Page commits could fire mid-transition, first-load rendering could stall, rotation could lose the current page, tvOS input paths diverged between modes, and settings still exposed scroll effects that no longer existed.
Approach
Rebuild the scroll reader around native paged containers on iOS, macOS, and tvOS, with a shared paging session to separate rendered snapshots, committed reading position, and programmatic navigation. Move structural mode updates out of SwiftUI body evaluation, preserve the resolved current page across reader state rebuilds, and unify page presentation invalidation so visible cells refresh deterministically instead of relying on broad view reloads.
Scope
ScrollPageViewimplementations for iOS/macOSAGENTS.mdValidation
make formatmake build