Skip to content

feat(autolink): add native extension tooling#2582

Closed
jianliang00 wants to merge 1 commit into
lynx-family:mainfrom
jianliang00:codex/native-autolink-extension-codegen
Closed

feat(autolink): add native extension tooling#2582
jianliang00 wants to merge 1 commit into
lynx-family:mainfrom
jianliang00:codex/native-autolink-extension-codegen

Conversation

@jianliang00
Copy link
Copy Markdown
Contributor

@jianliang00 jianliang00 commented May 8, 2026

Summary

  • add @lynx-js/autolink-codegen for Native-only JS, Android, and iOS spec generation
  • add create-lynx-extension scaffolding for Native Module, Element, and Service extensions
  • use the lynx-autolink-codegen CLI name in package metadata, generated templates, docs, and tests
  • wire the new Lynx packages into TS references, Vitest projects, lockfile, instructions, and changesets

Validation

  • pnpm --filter @lynx-js/autolink-codegen test
  • pnpm --filter create-lynx-extension test
  • pnpm --filter @lynx-js/autolink-codegen build
  • pnpm --filter create-lynx-extension build
  • pnpm dprint check
  • pnpm biome check
  • targeted pnpm eslint --cache --fix --no-warn-ignored --flag v10_config_lookup_from_file packages/lynx/autolink-codegen packages/lynx/create-lynx-extension
  • CLI smoke test: create a temp extension and run autolink codegen against it

Summary by CodeRabbit

  • New Features
    • Added @lynx-js/autolink-codegen CLI for generating native Android/iOS bindings from types
    • Added create-lynx-extension CLI for scaffolding native Lynx extension projects with example app and scripts
  • Documentation
    • Added README and usage guides for both packages plus contributor instructions for native autolink extensions
  • Tests
    • Added test suites validating parsing, generation, and safety checks across platforms
  • Chores
    • Test runner updated to include new package test configs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

🦋 Changeset detected

Latest commit: 59f1be0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@lynx-js/autolink-codegen Minor
create-lynx-extension Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6f62b75e-6bd5-4399-946e-2a21f6dd3680

📥 Commits

Reviewing files that changed from the base of the PR and between a483288 and 59f1be0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (28)
  • .changeset/native-autolink-codegen.md
  • .github/autolink-extension.instructions.md
  • packages/lynx/autolink-codegen/CHANGELOG.md
  • packages/lynx/autolink-codegen/README.md
  • packages/lynx/autolink-codegen/package.json
  • packages/lynx/autolink-codegen/rslib.config.ts
  • packages/lynx/autolink-codegen/src/cli.ts
  • packages/lynx/autolink-codegen/src/index.ts
  • packages/lynx/autolink-codegen/test/codegen.test.ts
  • packages/lynx/autolink-codegen/tsconfig.build.json
  • packages/lynx/autolink-codegen/tsconfig.json
  • packages/lynx/autolink-codegen/tsconfig.test.json
  • packages/lynx/autolink-codegen/turbo.json
  • packages/lynx/autolink-codegen/vitest.config.ts
  • packages/lynx/create-lynx-extension/CHANGELOG.md
  • packages/lynx/create-lynx-extension/README.md
  • packages/lynx/create-lynx-extension/package.json
  • packages/lynx/create-lynx-extension/rslib.config.ts
  • packages/lynx/create-lynx-extension/src/cli.ts
  • packages/lynx/create-lynx-extension/src/index.ts
  • packages/lynx/create-lynx-extension/test/create.test.ts
  • packages/lynx/create-lynx-extension/tsconfig.build.json
  • packages/lynx/create-lynx-extension/tsconfig.json
  • packages/lynx/create-lynx-extension/tsconfig.test.json
  • packages/lynx/create-lynx-extension/turbo.json
  • packages/lynx/create-lynx-extension/vitest.config.ts
  • packages/lynx/tsconfig.json
  • vitest.config.ts
✅ Files skipped from review due to trivial changes (18)
  • packages/lynx/autolink-codegen/turbo.json
  • packages/lynx/create-lynx-extension/CHANGELOG.md
  • packages/lynx/autolink-codegen/rslib.config.ts
  • packages/lynx/autolink-codegen/CHANGELOG.md
  • packages/lynx/autolink-codegen/tsconfig.json
  • vitest.config.ts
  • packages/lynx/tsconfig.json
  • packages/lynx/create-lynx-extension/README.md
  • packages/lynx/create-lynx-extension/package.json
  • packages/lynx/create-lynx-extension/tsconfig.build.json
  • packages/lynx/create-lynx-extension/tsconfig.test.json
  • packages/lynx/autolink-codegen/README.md
  • .changeset/native-autolink-codegen.md
  • packages/lynx/autolink-codegen/tsconfig.test.json
  • packages/lynx/create-lynx-extension/tsconfig.json
  • .github/autolink-extension.instructions.md
  • packages/lynx/autolink-codegen/tsconfig.build.json
  • packages/lynx/autolink-codegen/vitest.config.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • packages/lynx/create-lynx-extension/vitest.config.ts
  • packages/lynx/create-lynx-extension/turbo.json
  • packages/lynx/autolink-codegen/package.json
  • packages/lynx/autolink-codegen/src/cli.ts
  • packages/lynx/create-lynx-extension/src/cli.ts
  • packages/lynx/autolink-codegen/test/codegen.test.ts
  • packages/lynx/create-lynx-extension/rslib.config.ts
  • packages/lynx/create-lynx-extension/test/create.test.ts
  • packages/lynx/create-lynx-extension/src/index.ts
  • packages/lynx/autolink-codegen/src/index.ts

📝 Walkthrough

Walkthrough

Adds two Lynx packages: @lynx-js/autolink-codegen (parses @lynxmodule TypeScript declarations and generates TS/Android/iOS bindings) and create-lynx-extension (scaffolds native extension projects). Includes CLIs, templates, tests, build configs, docs, and monorepo integration.

Changes

Native Autolink Tooling Packages

Layer / File(s) Summary
Guidelines & Documentation
.github/autolink-extension.instructions.md, packages/lynx/autolink-codegen/README.md, packages/lynx/create-lynx-extension/README.md, packages/lynx/autolink-codegen/CHANGELOG.md, packages/lynx/create-lynx-extension/CHANGELOG.md
Adds repository guidance and package READMEs/changelogs specifying canonical codegen package/binary, Android/iOS marker names, generator usage, and scaffold command examples.
Package Manifests & Entry Points
packages/lynx/autolink-codegen/package.json, packages/lynx/create-lynx-extension/package.json
Declares ESM exports, type entrypoints, CLI binaries (lynx-autolink-codegen, create-lynx-extension), publish file allowlists, build/dev/test scripts, and Node engine constraints.
Build & Test Configuration
packages/lynx/*/rslib.config.ts, */tsconfig.*.json, */turbo.json, */vitest.config.ts
Adds rslib build configs, package-local tsconfig.build/test, turbo.json, and Vitest configs; configures ESM/es2022 output and per-package test discovery.
Codegen Public Types
packages/lynx/autolink-codegen/src/index.ts
Adds exported types: CodegenOptions, GeneratedFile, NativeModuleSpec, NativeModuleMethod/Param/Type types used by parsing and generation.
Native Module Parsing
packages/lynx/autolink-codegen/src/index.ts
Implements regex-based parsing of @lynxmodule class declarations, method splitting/tokenization, strict parameter name: type validation, supported types limited to `void
Code Generation & Orchestration
packages/lynx/autolink-codegen/src/index.ts
generate() discovers modules under types/**.d.ts, deduplicates module names, emits TS facades (generated/<Module>.ts), Android abstract spec classes with @Nullable boxed/primitives, and Objective-C protocol headers/impls; runCodegen() writes files with resolveInside() path-escape protection.
Codegen CLI
packages/lynx/autolink-codegen/src/cli.ts
Parses --help/-h and --root/-r, resolves root to absolute path, invokes runCodegen, logs generated paths, and handles errors with stderr and non-zero exit code.
Codegen Tests
packages/lynx/autolink-codegen/test/codegen.test.ts
Vitest tests for parseNativeModules (with/without semicolons), generate() and runCodegen() outputs/content markers, runCodegen disk writes, path traversal rejection, and negative cases for missing manifest, missing android.packageName, unsupported param types, and duplicate modules.
Extension Public Types
packages/lynx/create-lynx-extension/src/index.ts
Adds ExtensionType union, CreateLynxExtensionOptions, CreatedFile, EXTENSION_TYPES allowlist, and naming/templating helpers exposed for scaffolding logic.
Extension Scaffolding
packages/lynx/create-lynx-extension/src/index.ts
createLynxExtension validates target dir safety, derives normalized package/module/element/service names, builds scaffold file set (package.json, lynx.ext.json, tsconfig, types, README), Android/iOS templates, and an example React app; writes files with path-escape protection.
Extension CLI
packages/lynx/create-lynx-extension/src/cli.ts
Parses flags/positional arg, interactively prompts for missing dir/types when TTY, validates inputs, constructs CreateLynxExtensionOptions, calls createLynxExtension, logs created files, and handles errors.
Extension Tests
packages/lynx/create-lynx-extension/test/create.test.ts
Vitest tests for parseExtensionTypes flag parsing and createLynxExtension outputs across mixed/single-type scenarios, path-safety, non-empty dir protection, and test helpers for temp dirs/file reads.
Monorepo Integration
packages/lynx/tsconfig.json, vitest.config.ts
Adds package references for both new packages to packages/lynx/tsconfig.json and expands root vitest.config.ts test.projects glob to packages/lynx/*/vitest.config.ts.
Release Metadata
.changeset/native-autolink-codegen.md
Declares minor bumps for @lynx-js/autolink-codegen and create-lynx-extension with description that Native Autolink codegen and the create-extension packages were added.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • luhc228
  • HuJean
  • Sherry-hue

Poem

🐰 I found the types and hopped to write,

I crafted specs for Java, ObjC, and Type,
Two packages sprung from a notebook bright,
CLIs, templates, and tests took flight,
Extensions bloom at morning light.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(autolink): add native extension tooling' accurately summarizes the main changes—adding native autolink codegen and extension scaffolding packages.
Docstring Coverage ✅ Passed Docstring coverage is 93.24% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

❌ Patch coverage is 73.76093% with 270 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/lynx/create-lynx-extension/src/cli.ts 0.00% 149 Missing ⚠️
packages/lynx/autolink-codegen/src/index.ts 87.63% 58 Missing ⚠️
packages/lynx/autolink-codegen/src/cli.ts 0.00% 49 Missing ⚠️
packages/lynx/create-lynx-extension/src/index.ts 96.13% 14 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jianliang00 jianliang00 changed the title [codex] Add Native Autolink extension tooling feat(lynx): add native autolink extension tooling May 8, 2026
@jianliang00 jianliang00 changed the title feat(lynx): add native autolink extension tooling feat(autolink): add native extension tooling May 8, 2026
@jianliang00 jianliang00 force-pushed the codex/native-autolink-extension-codegen branch from c95c0c4 to 1cd3754 Compare May 8, 2026 11:01
@jianliang00 jianliang00 marked this pull request as ready for review May 8, 2026 11:03
Copilot AI review requested due to automatic review settings May 8, 2026 11:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-party Native Autolink extension tooling to the Lynx monorepo: a dedicated native codegen CLI/package and an interactive/non-interactive scaffolder for creating Native Module / Element / Service extension packages, and wires both into the repo’s TS/Vitest/Turbo/workflow setup.

Changes:

  • Added @lynx-js/autolink-codegen (CLI: lynx-autolink-codegen) to generate JS facade + Android/iOS native specs from types/**/*.d.ts and lynx.ext.json.
  • Added create-lynx-extension to scaffold Native Autolink extension projects (module/element/service) with example app + templates.
  • Integrated new packages into TS project references, Vitest workspace config, CI cache key patterns, lockfile, and changesets.

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vitest.config.ts Expands Vitest workspace coverage to include all packages/lynx/* projects’ Vitest configs.
pnpm-lock.yaml Adds the new Lynx package importers to the lockfile.
packages/lynx/tsconfig.json Adds TS project references for autolink-codegen and create-lynx-extension.
packages/lynx/create-lynx-extension/vitest.config.ts Adds Vitest configuration for the new scaffolding package.
packages/lynx/create-lynx-extension/turbo.json Defines Turbo tasks/outputs for build/test in the scaffolding package.
packages/lynx/create-lynx-extension/tsconfig.test.json Adds TS config for tests in the scaffolding package.
packages/lynx/create-lynx-extension/tsconfig.json Adds solution-style TS references for build + test configs.
packages/lynx/create-lynx-extension/tsconfig.build.json Adds TS build config used by the scaffolding package build tooling.
packages/lynx/create-lynx-extension/test/create.test.ts Adds tests covering scaffolding behavior and generated template contents.
packages/lynx/create-lynx-extension/src/index.ts Implements extension scaffolding + template generation logic.
packages/lynx/create-lynx-extension/src/cli.ts Implements the create-lynx-extension CLI (interactive + flags).
packages/lynx/create-lynx-extension/rslib.config.ts Configures rslib build for library + CLI outputs.
packages/lynx/create-lynx-extension/README.md Documents usage (interactive and non-interactive) for scaffolding.
packages/lynx/create-lynx-extension/package.json Defines package metadata and CLI bin entry.
packages/lynx/create-lynx-extension/CHANGELOG.md Introduces initial changelog entry for the new package.
packages/lynx/autolink-codegen/vitest.config.ts Adds Vitest configuration for the codegen package.
packages/lynx/autolink-codegen/turbo.json Defines Turbo tasks/outputs for build/test in the codegen package.
packages/lynx/autolink-codegen/tsconfig.test.json Adds TS config for tests in the codegen package.
packages/lynx/autolink-codegen/tsconfig.json Adds solution-style TS references for build + test configs.
packages/lynx/autolink-codegen/tsconfig.build.json Adds TS build config used by the codegen package build tooling.
packages/lynx/autolink-codegen/test/codegen.test.ts Adds tests for parsing and generating JS/Android/iOS artifacts plus error cases.
packages/lynx/autolink-codegen/src/index.ts Implements parsing of @lynxmodule declarations and multi-platform spec generation.
packages/lynx/autolink-codegen/src/cli.ts Implements the lynx-autolink-codegen CLI wrapper around generation.
packages/lynx/autolink-codegen/rslib.config.ts Configures rslib build for library + CLI outputs.
packages/lynx/autolink-codegen/README.md Documents the codegen package behavior and CLI name.
packages/lynx/autolink-codegen/package.json Defines package metadata and CLI bin entry.
packages/lynx/autolink-codegen/CHANGELOG.md Introduces initial changelog entry for the new package.
.github/workflows/workflow-website.yml Narrows Turbo cache key hashing inputs to specific Rust source trees.
.github/workflows/workflow-test.yml Narrows Turbo cache key hashing inputs to specific Rust source trees.
.github/workflows/workflow-bundle-analysis.yml Narrows Turbo cache key hashing inputs to specific Rust source trees.
.github/workflows/workflow-build.yml Narrows Turbo cache key hashing inputs and restore keys to specific Rust source trees.
.github/workflows/workflow-bench.yml Narrows Turbo cache key hashing inputs to specific Rust source trees.
.github/autolink-extension.instructions.md Adds repo guidance for current Native Autolink package/CLI/marker names.
.changeset/native-autolink-codegen.md Adds a changeset announcing the two new packages.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Nitpick comments (1)
packages/lynx/create-lynx-extension/package.json (1)

1-39: 💤 Low value

Add "sideEffects": false for consistency with the sibling package.

@lynx-js/autolink-codegen declares "sideEffects": false but this package does not. Adding it makes the intent explicit and keeps the two packages consistent.

✨ Proposed addition
   "license": "Apache-2.0",
+  "sideEffects": false,
   "type": "module",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/lynx/create-lynx-extension/package.json` around lines 1 - 39, The
package.json for the create-lynx-extension package is missing the "sideEffects":
false field; add "sideEffects": false at the top-level of package.json
(alongside "type" and "exports") to explicitly mark the package as
side-effect-free, matching the sibling package `@lynx-js/autolink-codegen` and
ensuring consistent bundler/tree-shaking behavior for the create-lynx-extension
package.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/lynx/autolink-codegen/package.json`:
- Around line 37-39: The package.json "engines" field currently specifies
"node": "^22 || ^24", which excludes Node 20 LTS; either include Node 20 by
changing the "engines" value to include "^20 || ^22 || ^24" (or a suitable
semver range that covers Node 20) or, if Node 20 exclusion is deliberate, add a
short explanation referencing this decision (e.g., required runtime features or
flags) in the package README (or a nearby package.json-readable field) so
consumers understand why "engines" excludes Node 20; update the "engines" field
or add the explanatory note accordingly.

In `@packages/lynx/autolink-codegen/src/cli.ts`:
- Around line 26-36: The --root / -r handler currently accepts argv[index + 1]
even if it's another flag; update the guard in the CLI parsing loop so after
reading const value = argv[index + 1] you also reject values that look like
flags (e.g. start with '-' or '--') and throw an error (or show help) instead of
assigning; specifically modify the block that sets options.root (referencing
arg, argv, index, value, and options.root) to validate that value is not a flag
token before assigning and incrementing index.

In `@packages/lynx/autolink-codegen/src/index.ts`:
- Around line 143-146: The current loop writes outputs using path.join(root,
file.path) which can be escaped via ".." or absolute paths; update the logic in
the file-processing loop that computes target (used with fs.writeFileSync and
fs.mkdirSync) to resolve and validate the target before writing: compute an
absolute resolvedTarget using path.resolve(root, file.path) (or
path.join+path.normalize then path.resolve), verify that resolvedTarget is
inside the package root (e.g., ensure path.relative(root, resolvedTarget) does
not start with ".." and is not equal to ".." or that
resolvedTarget.startsWith(path.resolve(root) + path.sep)), and if the check
fails reject/throw and skip writing; only call fs.mkdirSync and fs.writeFileSync
when the resolvedTarget is confirmed safe.
- Around line 160-177: parseMethods() currently uses body.split(';') which
forces semicolons and rejects valid TS where class members are
newline-separated; replace that naive split with a tokenizer that iterates over
lines and accumulates into a declaration until it detects a complete signature
(balanced parentheses and optional return colon after the final ')' as checked
by openParen/closeParen/returnColon logic). Concretely, in parseMethods() stop
using body.split(';') and instead loop through body.split(/\r?\n/), append each
line to a buffer, skip empty buffers, and only treat the buffer as a declaration
when you can compute openParen/closeParen and returnColon to satisfy the
existing validity check; then reset the buffer and continue. This preserves the
existing validation logic (openParen/closeParen/returnColon) while supporting
semicolon-optional declarations.

In `@packages/lynx/autolink-codegen/tsconfig.build.json`:
- Around line 4-8: Remove the dead outDir setting from the tsconfig build file:
because composite: true and noEmit: true are intentionally used with rslib
(configured via rslib.config.ts) TypeScript will not emit artifacts, so delete
the "outDir": "dist" entry and keep composite and noEmit as-is to match the
established pattern used across packages.

In `@packages/lynx/create-lynx-extension/src/cli.ts`:
- Around line 123-147: fillInteractiveOptions currently always prompts via
readline which blocks CI; change it to fail fast when running non-interactively
by checking TTYs before asking. In fillInteractiveOptions (and any call-sites
like main that rely on it), if next.dir or next.types are missing and either
process.stdin.isTTY or process.stdout.isTTY is false, throw a clear Error (or
return a rejected Promise) instead of calling ask/creating readline; only create
the readline interface and call ask when both process.stdin.isTTY and
process.stdout.isTTY are true so prompts happen only in interactive sessions.

In `@packages/lynx/create-lynx-extension/src/index.ts`:
- Around line 66-70: The loop writing files currently joins user-controlled
file.path to targetDir and may allow directory traversal; before creating
directories or writing, resolve the intended destination with
path.resolve(targetDir, file.path) (replace the current path.join usage) and
verify it is inside targetDir (e.g., check that path.relative(targetDir,
resolvedPath) does not start with '..' or that
resolvedPath.startsWith(path.resolve(targetDir) + path.sep)); if the check
fails, throw or skip the file. Update references in this block (the for loop
handling files, the absolutePath variable, and the fs.mkdirSync/fs.writeFileSync
calls) to use the validated resolved path.

In `@packages/lynx/create-lynx-extension/test/create.test.ts`:
- Around line 44-90: The test asserts content of ios .h files (read(dir,
'ios/src/ButtonElement.h'), read(dir, 'ios/src/ButtonService.h'), and later
'ios/src/ViewService.h') but the expect.arrayContaining list in create.test.ts
only includes the .m files; update the expect.arrayContaining([...]) call (the
array inside the expect(files.map((file) =>
file.path)).toEqual(expect.arrayContaining(...))) to also include
'ios/src/ButtonElement.h', 'ios/src/ButtonService.h' (and
'ios/src/ViewService.h' where applicable) so the presence assertions match the
subsequent read(...) content checks; alternatively, if the generator produces .m
only, change the offending read(...) checks to target the .m files instead —
locate the arrayContaining usage and the read(...) lines in create.test.ts to
make the fix.

In `@packages/lynx/create-lynx-extension/tsconfig.build.json`:
- Around line 4-8: The tsconfig.build.json currently sets "composite": true
together with "noEmit": true which triggers TS5053; open the tsconfig.build.json
for this package and either remove "noEmit" or replace it with
"emitDeclarationOnly": true so declaration emission works with "composite": true
(alternatively remove "composite" if project references aren't needed); update
the JSON to use "emitDeclarationOnly": true (or delete "composite") and run a
local tsc -p tsconfig.build.json to verify the TS5053 error is resolved.

In `@packages/lynx/create-lynx-extension/tsconfig.test.json`:
- Around line 1-8: The test tsconfig (tsconfig.test.json) inherits "composite:
true" from tsconfig.build.json while also setting "noEmit": true, creating the
incompatible composite+noEmit combination; fix it by overriding the compiler
option in tsconfig.test.json to set "composite": false (or remove extends and
craft an explicit test config) so that the "noEmit" flag is compatible—update
the "compilerOptions" in tsconfig.test.json to explicitly set composite to false
to resolve the issue.

---

Nitpick comments:
In `@packages/lynx/create-lynx-extension/package.json`:
- Around line 1-39: The package.json for the create-lynx-extension package is
missing the "sideEffects": false field; add "sideEffects": false at the
top-level of package.json (alongside "type" and "exports") to explicitly mark
the package as side-effect-free, matching the sibling package
`@lynx-js/autolink-codegen` and ensuring consistent bundler/tree-shaking behavior
for the create-lynx-extension package.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: abbb493a-f99f-4c97-a3e0-8a5b6954e3dc

📥 Commits

Reviewing files that changed from the base of the PR and between 736ba38 and 1cd3754.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (33)
  • .changeset/native-autolink-codegen.md
  • .github/autolink-extension.instructions.md
  • .github/workflows/workflow-bench.yml
  • .github/workflows/workflow-build.yml
  • .github/workflows/workflow-bundle-analysis.yml
  • .github/workflows/workflow-test.yml
  • .github/workflows/workflow-website.yml
  • packages/lynx/autolink-codegen/CHANGELOG.md
  • packages/lynx/autolink-codegen/README.md
  • packages/lynx/autolink-codegen/package.json
  • packages/lynx/autolink-codegen/rslib.config.ts
  • packages/lynx/autolink-codegen/src/cli.ts
  • packages/lynx/autolink-codegen/src/index.ts
  • packages/lynx/autolink-codegen/test/codegen.test.ts
  • packages/lynx/autolink-codegen/tsconfig.build.json
  • packages/lynx/autolink-codegen/tsconfig.json
  • packages/lynx/autolink-codegen/tsconfig.test.json
  • packages/lynx/autolink-codegen/turbo.json
  • packages/lynx/autolink-codegen/vitest.config.ts
  • packages/lynx/create-lynx-extension/CHANGELOG.md
  • packages/lynx/create-lynx-extension/README.md
  • packages/lynx/create-lynx-extension/package.json
  • packages/lynx/create-lynx-extension/rslib.config.ts
  • packages/lynx/create-lynx-extension/src/cli.ts
  • packages/lynx/create-lynx-extension/src/index.ts
  • packages/lynx/create-lynx-extension/test/create.test.ts
  • packages/lynx/create-lynx-extension/tsconfig.build.json
  • packages/lynx/create-lynx-extension/tsconfig.json
  • packages/lynx/create-lynx-extension/tsconfig.test.json
  • packages/lynx/create-lynx-extension/turbo.json
  • packages/lynx/create-lynx-extension/vitest.config.ts
  • packages/lynx/tsconfig.json
  • vitest.config.ts

Comment thread packages/lynx/autolink-codegen/package.json
Comment thread packages/lynx/autolink-codegen/src/cli.ts
Comment thread packages/lynx/autolink-codegen/src/index.ts
Comment thread packages/lynx/autolink-codegen/src/index.ts Outdated
Comment thread packages/lynx/autolink-codegen/tsconfig.build.json Outdated
Comment thread packages/lynx/create-lynx-extension/src/cli.ts
Comment thread packages/lynx/create-lynx-extension/src/index.ts
Comment thread packages/lynx/create-lynx-extension/test/create.test.ts
Comment thread packages/lynx/create-lynx-extension/tsconfig.build.json Outdated
Comment thread packages/lynx/create-lynx-extension/tsconfig.test.json
@jianliang00 jianliang00 force-pushed the codex/native-autolink-extension-codegen branch from 1cd3754 to bc9c92a Compare May 8, 2026 11:26
@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

Web Explorer

#9511 Bundle Size — 900.02KiB (0%).

59f1be0(current) vs 5b6a33d main#9500(baseline)

Bundle metrics  no changes
                 Current
#9511
     Baseline
#9500
No change  Initial JS 44.46KiB 44.46KiB
No change  Initial CSS 2.22KiB 2.22KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 9 9
No change  Assets 11 11
No change  Modules 229 229
No change  Duplicate Modules 11 11
No change  Duplicate Code 27.28% 27.28%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#9511
     Baseline
#9500
No change  JS 495.88KiB 495.88KiB
No change  Other 401.92KiB 401.92KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch jianliang00:codex/native-autolin...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React MTF Example

#1069 Bundle Size — 206.69KiB (0%).

59f1be0(current) vs 5b6a33d main#1058(baseline)

Bundle metrics  no changes
                 Current
#1069
     Baseline
#1058
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 192 192
No change  Duplicate Modules 77 77
No change  Duplicate Code 44.36% 44.36%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1069
     Baseline
#1058
No change  IMG 111.23KiB 111.23KiB
No change  Other 95.46KiB 95.46KiB

Bundle analysis reportBranch jianliang00:codex/native-autolin...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React External

#1054 Bundle Size — 690.27KiB (0%).

59f1be0(current) vs 5b6a33d main#1043(baseline)

Bundle metrics  no changes
                 Current
#1054
     Baseline
#1043
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1054
     Baseline
#1043
No change  Other 690.27KiB 690.27KiB

Bundle analysis reportBranch jianliang00:codex/native-autolin...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React Example

#7939 Bundle Size — 235.77KiB (0%).

59f1be0(current) vs 5b6a33d main#7928(baseline)

Bundle metrics  no changes
                 Current
#7939
     Baseline
#7928
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 197 197
No change  Duplicate Modules 80 80
No change  Duplicate Code 44.85% 44.85%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7939
     Baseline
#7928
No change  IMG 145.76KiB 145.76KiB
No change  Other 90.01KiB 90.01KiB

Bundle analysis reportBranch jianliang00:codex/native-autolin...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 8, 2026

React Example with Element Template

#204 Bundle Size — 197.77KiB (0%).

59f1be0(current) vs 5b6a33d main#193(baseline)

Bundle metrics  Change 2 changes
                 Current
#204
     Baseline
#193
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
Change  Cache Invalidation 0% 26.7%
No change  Chunks 0 0
No change  Assets 4 4
Change  Modules 78(-1.27%) 79
No change  Duplicate Modules 23 23
Change  Duplicate Code 40.44%(+0.02%) 40.43%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#204
     Baseline
#193
No change  IMG 145.76KiB 145.76KiB
No change  Other 52.01KiB 52.01KiB

Bundle analysis reportBranch jianliang00:codex/native-autolin...Project dashboard


Generated by RelativeCIDocumentationReport issue

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 8, 2026

Merging this PR will degrade performance by 12.98%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 79 untouched benchmarks
⏩ 26 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
008-many-use-state-destroyBackground 9.5 ms 8 ms +19.24%
transform 1000 view elements 40 ms 46 ms -12.98%

Comparing jianliang00:codex/native-autolink-extension-codegen (59f1be0) with main (5b6a33d)

Open in CodSpeed

Footnotes

  1. 26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@jianliang00 jianliang00 force-pushed the codex/native-autolink-extension-codegen branch 2 times, most recently from 7f798d3 to a483288 Compare May 8, 2026 12:26
@jianliang00 jianliang00 force-pushed the codex/native-autolink-extension-codegen branch from a483288 to 59f1be0 Compare May 8, 2026 14:23
@jianliang00
Copy link
Copy Markdown
Contributor Author

Superseded by #2587 to remove the codex keyword from the head branch name.

@jianliang00 jianliang00 closed this May 9, 2026
@jianliang00 jianliang00 deleted the codex/native-autolink-extension-codegen branch May 9, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants