Skip to content

fix(reader): preserve active turns across presentation rebuilds - #949

Merged
everpcpc merged 2 commits into
mainfrom
codex/fix-page-curl-restoration-race
Aug 7, 2026
Merged

fix(reader): preserve active turns across presentation rebuilds#949
everpcpc merged 2 commits into
mainfrom
codex/fix-page-curl-restoration-race

Conversation

@everpcpc

@everpcpc everpcpc commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What changed

  • Keep navigationTarget exclusive to explicit navigation commands during reader presentation rebuilds.
  • Remap only a command that was already pending before the rebuild, while committed anchors and adapter-owned snapshots continue to restore presentation state.
  • Clarify the committed-position, end-page projection, and restoration ownership boundaries in AGENTS.md.

Why

This follows up on #948. A rebuild during an in-flight reader transition could synthesize a command for the previously committed page. After the user transition committed its newer page, an adapter continuation could replay that stale command and navigate backward.

The fix removes the competing restoration command instead of adding timing flags or generations. Existing Page Curl snapshots, Cover decks, Scroll viewport anchors, and Webtoon offsets remain responsible for presentation restoration.

Validation

  • Scoped swift-format
  • swiftc -parse KMReader/Features/Reader/ViewModels/ReaderViewModel.swift
  • git diff --check
  • make build (iOS, macOS, and tvOS)

Only remap navigation targets that were already pending before a reader presentation rebuild, leaving restoration to committed anchors and adapter-owned snapshots. Clarify explicit command ownership and end-page projection boundaries.
@everpcpc
everpcpc marked this pull request as ready for review August 7, 2026 02:57
@everpcpc
everpcpc merged commit d195902 into main Aug 7, 2026
3 checks passed
@everpcpc
everpcpc deleted the codex/fix-page-curl-restoration-race branch August 7, 2026 04:13
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