feat: tick-rate mount contract — ui.__tickHz handshake, rebuilt xcframework (0.2.1) - #1
Merged
Merged
Conversation
… xcframework The 0.2.1 prep owed since 0.2.0 shipped ahead of the engine-side review (pocket-stack/pocketjs#257). The contract is now settled upstream: the rate is declared before eval_bundle, published to the guest at mount as ui.__tickHz, and every bundle refuses a host driving a rate other than the one it was baked with. - PocketHostView._mountUi publishes __tickHz next to __host/__hostAbi, read from the surface's accepted rate so it always reflects what the core actually runs. - tickRate gains a setNative: same-value re-application after createNativeView is skipped; a genuinely late change is pushed so the surface refuses it through the error event instead of the display link silently diverging from the realm's step. - PocketApple.xcframework rebuilt from the #257 head (both slices): create -> load_pak* -> [set_identity] -> [set_tick_rate] -> eval_bundle, PocketSurfaceView applies tickRate in its setter, the embedded surface publishes __tickHz for guest mode. - README/index.d.ts contract text; version 0.2.1; RELEASE-PLAN-0.2.1.md updated with the remaining publish sequence (rebuild from post-merge main before npm publish). Validated on the iOS 26.5 simulator in both modes with a 120 Hz nsengine build: guest mode renders with the effect channel live; external-guest mode mounts against the plugin-declared rate and reads iOS 26.5 through the NativeScript bindings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Same headers, binaries rebuilt from pocket-stack/pocketjs main after #257 and #258 merged (picks up #270's guest-allocator change). Verified: both slices export the tick-rate ABI; render_hero at declared 120 Hz gives 180 deterministic non-blank frames with damage_px matching the upstream merge-time verification. Co-Authored-By: Claude Fable 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.
Prep for
0.2.1— the tick-rate release owed since 0.2.0 shipped ahead of the engine-side review (seeRELEASE-PLAN-0.2.1.md, updated on this branch). The contract is now settled on pocket-stack/pocketjs#257 (headd6ae5f0): the rate is declared beforeeval_bundle, published to the guest at mount asui.__tickHz, and every bundle refuses a host driving a rate other than its baked one.What changed
PocketHostView._mountUipublishes__tickHznext to__host/__hostAbi— external-guest mode's half of the pairing handshake. The value is read from the surface's accepted rate, so it is always what the core actually runs.tickRategained asetNative: same-value re-application (property application aftercreateNativeViewalready declared the rate) is skipped; a genuinely late change is pushed so the new surface refuses it through theerrorevent instead of the display link silently diverging from the realm's step.PocketApple.xcframeworkfrom the #257 head: call ordercreate → load_pak* → [set_identity] → [set_tick_rate] → eval_bundle,PocketSurfaceViewappliestickRatein its setter (startonly pins the display link), and the embedded surface publishes__tickHzforPocketView's guest mode.index.d.tscontract text; version0.2.1.Compatibility
60 Hz bundles mount on every plugin version — an absent
__tickHzmeans the 60 default, which is all any pre-rate host ever drove. Non-60 bundles refuse 0.2.0 loudly (nothing in it declares a rate) and require this release.Validation (iPhone 17 Pro Max simulator, iOS 26.5)
pocket ios play nsengine --hz=120 --density=4 --plugin-path=<this checkout>—[pocket-shell] guest loaded, nsengine renders fully, spinner animating, guest↔host ping round-trip live (screenshot-verified).pocket ios play nsengine --external-guest --no-build --plugin-path=<this checkout>— the new build stamp stagedtickHz: 120with no--hzflag (previously this silently staged 60), and the bundle mounted against the plugin-published__tickHz.npm packships 18 files / 2.7 MB; both xcframework slices carry the newpocket_apple.hcontract andPocketSurfaceView.hsetter docs.Before publishing (do not merge until then)
mainand re-vendor — the binary here is a build of the branch head, kept so this PR is testable end-to-end; the shipped one must be a build of upstream.npm publish, then the one-line ns-shell pin bump (0.2.0→0.2.1) upstream.🤖 Generated with Claude Code