Repository navigation
Page curl: state machine interface and its first tests - #20
Draft
artemlitch wants to merge 2 commits into
Draft
artemlitch wants to merge 2 commits into
artemlitch wants to merge 2 commits into
Conversation
…allows A WKWebView snapshot comes back as 32-bit RGBA with alpha last. Metal can take those bytes as RGBA8Unorm, and little-endian alpha-first bytes as BGRA8Unorm, so the bake no longer redraws every page into a new bitmap first. Any other layout is still redrawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bake loop moves into RNCPageCurlStateMachine, Foundation only, as events in and effects out. This commit has the interface, an empty implementation, and the first eight tests, which are expected to fail. The tests are a CocoaPods test spec, so an app opts in with :testspecs => ['Tests'] and runs them in its own workspace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Four review rounds on #17 each found new edge cases in the page curl controller. Every one was a failure path or a message ordering, and nothing automated covered the controller. Hand testing on the simulator only exercises the normal path.
What this adds
This is the start of testing the bake loop first, before any more controller changes.
RNCPageCurlStateMachineis the interface the bake loop moves into: Foundation only, events in and effects out. The implementation is an empty stub for now.apple-tests/has the first eight tests, for the basic bake loop. They are expected to fail against the stub.s.test_spec 'Tests'). An app opts in with:testspecs => ['Tests']and runs them in its own workspace. Bookwise does this in readwiseio/rekindled#13844.apple-testsis added to the packagefileslist, so a GitHub pin ships the tests.A separate commit carries the Metal texture change from the bake time work. A WKWebView snapshot comes back as 32-bit RGBA, so its bytes are copied straight into a texture instead of redrawn into a new bitmap first. That change ran on the iPhone Duo simulator before the checkout holding it was lost; this commit restores it from the session record. It has not been run since.
Status
pod installwith the test spec works next to autolinking, and generates thereact-native-webview-Unit-Testsscheme inbookwise.xcworkspace.c++; that fix has not been run.The full plan, with the test list in order, is
docs/plans/2026-10-23-page-curl-state-machine-tests.mdin readwiseio/rekindled#13844.🤖 Generated with Claude Code