Repository navigation
Implement Lynx Milestone 7 main-thread worklets - #227
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
trueadm
marked this pull request as ready for review
July 21, 2026 23:56
mrdiyorbek-juraev
added a commit
to mrdiyorbek-juraev/octane
that referenced
this pull request
Jul 22, 2026
Brings in 12 upstream commits, including the shared TSRX semantic analysis across client/server/universal/Volar compilation (octanejs#230), the deferred hydration fix (octanejs#229), Lynx Milestone 7 worklets (octanejs#227), template-free production hydration (octanejs#218), and the dependency/TSRX toolchain refresh (octanejs#223) with the release that followed it. Two conflicts, both in generated files, resolved by taking upstream and regenerating from the merged tree: - docs/packages.md — 47 publishable packages upstream, 48 here. Verified as a strict superset: every package upstream lists is still present, and the only additions are `@octanejs/cmdk` and `packages/cmdk`. - packages/octane-evals/.../manifest.jsonl — all 19 task ids match upstream, and a field-level comparison shows only environment.overlayLockfileHash and grader.graderDigest differ. No prompt, policy, reference or grader command changed, so task semantics are untouched; both fields derive from the lockfile, which necessarily moved. pnpm install also rewrote pnpm-workspace.yaml as a side effect — it flattened upstream's `*esrap_common` YAML anchor and appended [email protected] to minimumReleaseAgeExclude. Both are reverted, so the file differs from upstream by exactly one line: the `cmdk: 1.1.1` catalog pin this package needs. packages/cmdk is unchanged apart from one comparator re-wrapped by the refreshed prettier; the whitespace-only diff is the entire delta. Verified: 43/43 cmdk and cmdk-ssr against the new compiler, 48/48 evals (including the corpus freshness gate), tsrx-tsc, tsgo, prettier, and all five generated-artifact gates current.
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
main threadandbackground onlyfunctions with stable IDs, isolated captures, layer-specific dead-code/import removal, and source diagnosticsuseMainThreadRef, directmain-thread:*host props, and root-scopedrunOnMainThread/runOnBackgroundcallsoctanepatch changesetWhy
Milestone 6 established main-thread first paint and background adoption. Milestone 7 adds the native-capability boundary applications need after adoption without bringing ReactLynx, Preact, React Reconciler, or a copied worklet runtime into the bundle.
The acknowledgement-scoped publication protocol also prevents state-only main-thread refs from being collected between child-first mount calls, parent owner retention, and parent-first cleanup calls when ContextProxy delivery is asynchronous.
Validation
pnpm test— 1,274 files / 12,252 testspnpm typecheckpnpm format:checkRemaining native gates
This completes the private source/test/build implementation, not the formal native exit. Explorer, Android, and iOS still need to prove direct main-thread execution, adopted native ref identity, gesture/continuous-event behavior, and native latency/memory/cleanup budgets. Full runtime HMR and never-activated descriptor/module-removal invalidation remain Milestone 8 work.
Note
High Risk
Large cross-thread lifecycle and dual-graph adoption changes touch host commits, worklet/ref invalidation, and async call settlement; native behavior is still unproven despite extensive JS-host coverage.
Overview
Adds Lynx Milestone 7: opt-in
thread-functionscompiler support for'main thread'/'background only'directives (stable IDs, isolated captures, layer DCE, source diagnostics), plus Octane-owned runtime wiring without ReactLynx worklet imports.Lynx host and transport now understand
main-thread:*event props andmain-thread:ref, with registries for worklet activation, ref lifetimes, collision checks against background handlers, and subtree activate/deactivate on connect/disconnect, visibility, and fault paths. First-screen adoption compares adoptable worklet snapshots (ignoring background_execIdtokens) and transfers main-thread ref/event journals.Background transport gains
callMain/ inboundcall-backgroundwith clone-safe args/results, bounded pre-adoption queues, cancellation, stale-root rejection, andmain-call-publicationopen/close around ACK-time draining so queued main calls and ref-owner retains stay ordered under asyncContextProxydelivery. Client driver binds background function lifetimes into commit batches viaprepareLynxClientWorkletBatch.Docs, audit crosswalk, and changeset record private source/test completion; formal native exit (main-thread execution, ref identity, gestures) remains gated.
Reviewed by Cursor Bugbot for commit 8b1c0a2. Bugbot is set up for automated code reviews on this repo. Configure here.