Skip to content

refactor(reader): rebuild divina scroll pager#629

Merged
everpcpc merged 3 commits intomainfrom
codex/divina-scroll-pager-refactor
Mar 8, 2026
Merged

refactor(reader): rebuild divina scroll pager#629
everpcpc merged 3 commits intomainfrom
codex/divina-scroll-pager-refactor

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

@everpcpc everpcpc commented Mar 8, 2026

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

  • Replace the old SwiftUI scroll pager with native ScrollPageView implementations for iOS/macOS
  • Add shared paging/session/presentation coordination for commit timing and visible cell refresh
  • Rework end-page/native page cell plumbing and share end-page presentation logic
  • Fix rotation and startup regressions, including current-page preservation and stale index-path safety
  • Simplify tvOS input routing and remove dead scroll-effect configuration that is no longer supported
  • Document the repository preference for structural refactors over patch-style fixes in AGENTS.md

Validation

  • make format
  • make build

everpcpc added 3 commits March 8, 2026 17:03
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.
@everpcpc everpcpc merged commit 6936f80 into main Mar 8, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/divina-scroll-pager-refactor branch March 8, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant