chore: mark the "multi-thread" deprecated#2030
Conversation
**NOTICE This will be a breaking change in the future** mark the thread strategy "multi-thread" as deprecated. Please use "all-on-ui" instead. If you still want to use multi-thread mode, please try to use a cross-origin isolated iframe. A console warning will be printed if `thread-strategy` is set to `multi-thread`.
🦋 Changeset detectedLatest commit: 91500f0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
📝 WalkthroughWalkthroughThis PR deprecates the "multi-thread" thread strategy in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/test.yml (1)
102-104: Remove dead code.Since MULTI_THREAD has been removed from the matrix (line 90), this conditional block will never execute and should be removed to avoid confusion.
🔎 Apply this diff to remove the dead code:
- if [ "${{ matrix.thread }}" = "MULTI_THREAD" ]; then - export ENABLE_MULTI_THREAD=true - fi
🧹 Nitpick comments (1)
.changeset/curvy-stars-kneel.md (1)
7-7: Consider using proper markdown heading.The emphasis (bold) could be replaced with a proper heading for better markdown structure.
🔎 Suggested formatting improvements:
-**NOTICE This will be a breaking change in the future** +## ⚠️ NOTICE: This will be a breaking change in the future
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.changeset/curvy-stars-kneel.md(1 hunks).github/workflows/test.yml(1 hunks)packages/web-platform/web-core/src/apis/LynxView.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
For contributions, generate and commit a Changeset describing your changes
Files:
.changeset/curvy-stars-kneel.md
🧠 Learnings (9)
📓 Common learnings
Learnt from: PupilTong
Repo: lynx-family/lynx-stack PR: 1706
File: .github/workflows/test.yml:0-0
Timestamp: 2025-09-10T10:27:32.903Z
Learning: MULTI_THREAD×SSR combination is NYI (Not Yet Implemented) in the Playwright test configuration, which is why it's excluded from the test matrix in .github/workflows/test.yml.
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.
Applied to files:
.changeset/curvy-stars-kneel.md
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, empty changeset files (containing only `---\n\n---`) are used for internal changes that modify src/** files but don't require meaningful release notes, such as private package changes or testing-only modifications. This satisfies CI requirements without generating user-facing release notes.
Applied to files:
.changeset/curvy-stars-kneel.md
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.
Applied to files:
.changeset/curvy-stars-kneel.md
📚 Learning: 2025-09-10T10:27:32.903Z
Learnt from: PupilTong
Repo: lynx-family/lynx-stack PR: 1706
File: .github/workflows/test.yml:0-0
Timestamp: 2025-09-10T10:27:32.903Z
Learning: MULTI_THREAD×SSR combination is NYI (Not Yet Implemented) in the Playwright test configuration, which is why it's excluded from the test matrix in .github/workflows/test.yml.
Applied to files:
.github/workflows/test.yml
📚 Learning: 2025-09-10T10:24:40.137Z
Learnt from: PupilTong
Repo: lynx-family/lynx-stack PR: 1706
File: .github/workflows/test.yml:109-109
Timestamp: 2025-09-10T10:24:40.137Z
Learning: In Playwright, when fullyParallel: true is set, the --shard option distributes individual tests across shards rather than splitting by files. This provides better load balancing compared to the default file-level sharding when fullyParallel is false.
Applied to files:
.github/workflows/test.yml
📚 Learning: 2025-10-10T08:22:12.051Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1837
File: packages/web-platform/web-mainthread-apis/src/prepareMainThreadAPIs.ts:266-266
Timestamp: 2025-10-10T08:22:12.051Z
Learning: In packages/web-platform/web-mainthread-apis, the handleUpdatedData function returned from prepareMainThreadAPIs is internal-only, used to serve web-core. It does not require public documentation, type exports, or SSR support.
Applied to files:
packages/web-platform/web-core/src/apis/LynxView.ts
📚 Learning: 2025-08-27T12:42:01.095Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1616
File: packages/webpack/cache-events-webpack-plugin/test/cases/not-cache-events/lazy-bundle/index.js:3-3
Timestamp: 2025-08-27T12:42:01.095Z
Learning: In webpack, properties like __webpack_require__.lynx_ce are injected during compilation/build time when webpack processes modules and generates bundles, not at runtime when dynamic imports execute. Tests for such properties don't need to wait for dynamic imports to complete.
Applied to files:
packages/web-platform/web-core/src/apis/LynxView.ts
📚 Learning: 2025-08-12T16:09:32.413Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1497
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_full_static.js:9-10
Timestamp: 2025-08-12T16:09:32.413Z
Learning: In the Lynx stack, functions prefixed with `__` that are called in transformed code may be injected globally by the Lynx Engine at runtime rather than exported from the React runtime package. For example, `__CreateFrame` is injected globally by the Lynx Engine, not exported from lynx-js/react.
Applied to files:
packages/web-platform/web-core/src/apis/LynxView.ts
🪛 markdownlint-cli2 (0.18.1)
.changeset/curvy-stars-kneel.md
7-7: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🔇 Additional comments (4)
.github/workflows/test.yml (1)
90-90: LGTM - Consistent with deprecation strategy.Removing MULTI_THREAD from the test matrix aligns with the deprecation plan. This ensures CI no longer validates the deprecated code path.
packages/web-platform/web-core/src/apis/LynxView.ts (2)
346-346: LGTM - Well-documented deprecation.The
@deprecatedJSDoc tag properly marks this API as deprecated and provides clear migration guidance for developers.
434-438: LGTM - Appropriate runtime warning.The console warning effectively notifies developers at runtime about the deprecation, complementing the JSDoc
@deprecatedtag. The message is clear and consistent with the documentation..changeset/curvy-stars-kneel.md (1)
1-13: LGTM - Appropriate changeset type for deprecation.The
patchchangeset type is correct for this deprecation notice. Since the multi-thread functionality still works and only warnings are added, this is not yet a breaking change. When multi-thread support is actually removed in the future, that change should be released as amajorversion bump.As per coding guidelines, the breaking change is clearly marked in the changeset description.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #2030 will improve performances by 8.42%Comparing Summary
Benchmarks breakdown
Footnotes
|
React Example#6550 Bundle Size — 236.9KiB (0%).91500f0(current) vs fb67780 main#6526(baseline) Bundle metrics
|
| Current #6550 |
Baseline #6526 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
162 |
162 |
|
65 |
65 |
|
46.74% |
46.74% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #6550 |
Baseline #6526 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
91.14KiB |
91.14KiB |
Bundle analysis report Branch PupilTong:p/hw/deprecate-all-on-... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#6710 Bundle Size — 372.84KiB (+0.06%).91500f0(current) vs fb67780 main#6686(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch PupilTong:p/hw/deprecate-all-on-... Project dashboard Generated by RelativeCI Documentation Report issue |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @lynx-js/gesture-runtime@2.1.0 ### Minor Changes - Initialize `'@lynx-js/gesture-runtime` ([#1984](#1984)) ## @lynx-js/rspeedy@0.12.3 ### Patch Changes - Support environment variants to enable multiple configurations for the same targets. ([#1969](#1969)) - Updated dependencies \[]: - @lynx-js/web-rsbuild-server-middleware@0.19.2 ## @lynx-js/lynx-bundle-rslib-config@0.0.2 ### Patch Changes - Introduce `@lynx-js/externals-loading-webpack-plugin`. It will help you to load externals built by `@lynx-js/lynx-bundle-rslib-config`. ([#1924](#1924)) ```js // webpack.config.js import { ExternalsLoadingPlugin } from "@lynx-js/externals-loading-webpack-plugin"; export default { plugins: [ new ExternalsLoadingPlugin({ mainThreadLayer: "main-thread", backgroundLayer: "background", externals: { lodash: { url: "http://lodash.lynx.bundle", background: { sectionPath: "background" }, mainThread: { sectionPath: "main-thread" }, }, }, }), ], }; ``` ## @lynx-js/react-rsbuild-plugin@0.12.2 ### Patch Changes - Support environment variants to enable multiple configurations for the same targets. ([#1969](#1969)) - Updated dependencies \[]: - @lynx-js/react-alias-rsbuild-plugin@0.12.2 ## @lynx-js/web-constants@0.19.2 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-worker-rpc@0.19.2 ## @lynx-js/web-core@0.19.2 ### Patch Changes - chore: mark the "multi-thread" deprecated ([#2030](#2030)) **NOTICE This will be a breaking change in the future** mark the thread strategy "multi-thread" as deprecated. Please use "all-on-ui" instead. If you still want to use multi-thread mode, please try to use a cross-origin isolated iframe. A console warning will be printed if `thread-strategy` is set to `multi-thread`. - fix csp issue for mts realm ([#1998](#1998)) - Updated dependencies \[]: - @lynx-js/web-constants@0.19.2 - @lynx-js/web-mainthread-apis@0.19.2 - @lynx-js/web-worker-rpc@0.19.2 - @lynx-js/web-worker-runtime@0.19.2 ## @lynx-js/web-explorer@0.0.15 ### Patch Changes - fix: web-explorer needs to actively send an iframeReady message to the parent, the parent uses `iframe load` listener cannot guarantee that the `message-listener` will complete execution. ([#2001](#2001)) ## @lynx-js/web-mainthread-apis@0.19.2 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-constants@0.19.2 ## @lynx-js/web-worker-runtime@0.19.2 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-constants@0.19.2 - @lynx-js/web-mainthread-apis@0.19.2 - @lynx-js/web-worker-rpc@0.19.2 ## @lynx-js/externals-loading-webpack-plugin@0.0.1 ### Patch Changes - Introduce `@lynx-js/externals-loading-webpack-plugin`. It will help you to load externals built by `@lynx-js/lynx-bundle-rslib-config`. ([#1924](#1924)) ```js // webpack.config.js import { ExternalsLoadingPlugin } from "@lynx-js/externals-loading-webpack-plugin"; export default { plugins: [ new ExternalsLoadingPlugin({ mainThreadLayer: "main-thread", backgroundLayer: "background", externals: { lodash: { url: "http://lodash.lynx.bundle", background: { sectionPath: "background" }, mainThread: { sectionPath: "main-thread" }, }, }, }), ], }; ``` ## create-rspeedy@0.12.3 ## @lynx-js/react-alias-rsbuild-plugin@0.12.2 ## upgrade-rspeedy@0.12.3 ## @lynx-js/web-core-server@0.19.2 ## @lynx-js/web-rsbuild-server-middleware@0.19.2 ## @lynx-js/web-worker-rpc@0.19.2 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
NOTICE This will be a breaking change in the future
mark the thread strategy "multi-thread" as deprecated.
Please use "all-on-ui" instead. If you still want to use multi-thread mode, please try to use a cross-origin isolated iframe.
A console warning will be printed if
thread-strategyis set tomulti-thread.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
Checklist