Repository navigation
fix(lynx): unwrap main-thread event props in first-screen host batches - #413
Merged
trueadm merged 1 commit intoJul 30, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks done
This branch was previously deployed
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.
Summary
clonePropsunwrapsmain-thread:event props from compiler-tagged callables to their plain worklet descriptors, mirroring what the background client driver already does before transport.Why
main-thread:bind*prop's value is the compiler-tagged callable returned bybindThreadFunction. The background path converts these to descriptors inprepareLynxClientWorkletBatch, but the synchronous first-screen path fed the raw function intocloneHostValue, which rejects functions — so any page authoring amain-thread:event failed its first-screen render on device withOctane Lynx host: host props contain unsupported value function bound() …(Lynx Explorer 3.9, iOS) and fell back to the failed-first-screen path.main-thread:events render synchronously and their worklet listeners install through the existingplanLynxHostPropPatchpath.Changes
host-driver.ts:clonePropsrewritesmain-thread:*(exceptmain-thread:ref) function values throughgetThreadFunctionDescriptorbefore cloning; untagged functions still fail throughcloneHostValueexactly as before.Validation
vitest run --project lynx— 259 tests passedtsgo --noEmit -p packages/lynx/tsconfig.jsonprettier --checkon the changed filemain-thread:bindtouchstart/move/end+main-thread:refon the first screen — renders synchronously and is draggable on Lynx Explorer 3.9 (iOS) with this changeRisk / follow-ups
main-thread:-prefixed props are affected; ordinarybind*first-screen handlers keep their event-marker replacement. Depends conceptually on the sibling worklet-capture fixes for full device behavior but is independently correct and mergeable. No changeset:@octanejs/lynxis private.Note
Low Risk
Narrow change to first-screen prop cloning for main-thread event props only; aligns host behavior with the existing client driver path and leaves ordinary bind handlers unchanged.
Overview
Fixes synchronous first-screen rendering when pages use
main-thread:event handlers (e.g.main-thread:bindtouchstart) in the render-only main graph.clonePropsin the host driver now unwraps compiler-tagged callables onmain-thread:*props (exceptmain-thread:ref) to plain worklet descriptors viagetThreadFunctionDescriptorbeforecloneHostValueruns—matching what the background client driver already does before transport. Previously the first-screen path passed raw functions into cloning, which rejected them and broke the initial render on device.Untagged functions and non–main-thread props behave as before; worklet listeners still install through the existing
planLynxHostPropPatchpath once descriptors are in props.Reviewed by Cursor Bugbot for commit 4d6064b. Bugbot is set up for automated code reviews on this repo. Configure here.