Repository navigation
fix(lynx): emit unquoted nodes-ref attribute selector for native SelectorQuery - #394
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
trueadm
approved these changes
Jul 29, 2026
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
[octane-ref=r1-h2-g3]instead of[octane-ref="r1-h2-g3"].Why
=verbatim, quotes included (core/renderer/dom/selector/matching/attribute_selector_matching.ccin lynx-family/lynx:GetSelectorAttrKeyOpValueslices the raw selector string and compares withEQ). The quoted form therefore never matches a native element, and every selector-query operation —invoke,measure,fields,setNativeProps— failed with native code 2 (node not found) on device.ref.invoke('autoScroll', …)from the Product Gallery tutorial port rejected withOctane Lynx NodesRef invoke failed with native code 2; with this change it scrolls.r<digits>-h<digits>-g<digits>), so the unquoted form stays valid for DOMquerySelectorin the JavaScript testing environment — the existing selector-shaped tests pass unchanged.Changes
createLynxNodesRefSelectoremits the unquoted form, with a comment pinning the native constraint.Validation
vitest run --project lynx— 259 tests passedtsgo --noEmit -p packages/lynx/tsconfig.jsonprettier --checkon the changed fileinvoke('autoScroll')succeeds on Lynx Explorer 3.9 (iOS) with this changeRisk / follow-ups
@octanejs/lynxis private.Note
Medium Risk
Touches the selector string used for all native NodesRef operations; wrong format breaks every selector-query call on device, but the change is narrowly scoped and validated on Lynx Explorer.
Overview
Fixes Lynx selector-query node lookup by changing
createLynxNodesRefSelectorto emit[octane-ref=r1-h2-g3]instead of a quoted value after=.Native Lynx attribute matching compares the substring after
=literally (quotes included), so the old quoted form never matched elements and invoke, measure, fields, and setNativeProps failed with native code 2 (node not found) on device. Ref tokens are plain CSS identifiers, so the unquoted selector stays valid for DOMquerySelectorin tests.Reviewed by Cursor Bugbot for commit d9aebf6. Bugbot is set up for automated code reviews on this repo. Configure here.