fix(web): web-explorer needs to actively send an iframeReady message …#2001
Conversation
🦋 Changeset detectedLatest commit: 7a98269 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 adds a patch release for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/few-rats-doubt.md(1 hunks)packages/web-platform/web-explorer/index.ts(1 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/few-rats-doubt.md
🧠 Learnings (5)
📓 Common learnings
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.
📚 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/few-rats-doubt.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, 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/few-rats-doubt.md
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:23:07.797Z
Learning: In the lynx-family/lynx-stack repository, changesets are only required for meaningful changes to end-users such as bugfixes and features. Internal/development changes like chores, refactoring, or removing debug info do not need changeset entries.
Applied to files:
.changeset/few-rats-doubt.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/few-rats-doubt.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build / Build (Windows)
- GitHub Check: test-rust / Test (Ubuntu)
🔇 Additional comments (2)
.changeset/few-rats-doubt.md (1)
1-5: Changeset looks good.The changeset correctly documents this bugfix as a patch release with a clear description of the race condition being addressed.
packages/web-platform/web-explorer/index.ts (1)
44-44: Verify handling of null iframeId in parent window.When the
iframeIdquery parameter is not present,URLSearchParams.get()returns null. The iframe sends this null value in the iframeReady message to the parent window. Since the parent window code that receives this message is not found in this repository, verify that the parent correctly handles receivingiframeId: nullin the message payload and does not break when this value is null.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #2001 will improve performance by 8.14%Comparing Summary
Benchmarks breakdown
Footnotes
|
React Example#6489 Bundle Size — 236.9KiB (0%).7a98269(current) vs 27dea6e main#6487(baseline) Bundle metrics
|
| Current #6489 |
Baseline #6487 |
|
|---|---|---|
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 #6489 |
Baseline #6487 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
91.14KiB |
91.14KiB |
Bundle analysis report Branch Sherry-hue:fix/web-explorer-load Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#6649 Bundle Size — 372.63KiB (+0.03%).7a98269(current) vs 27dea6e main#6647(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch Sherry-hue:fix/web-explorer-load Project dashboard Generated by RelativeCI Documentation Report issue |
lynx-family#2001) …to the parent <!-- Thank you for submitting a pull request! We appreciate the time and effort you have invested in making these changes. Please ensure that you provide enough information to allow others to review your pull request. Upon submission, your pull request will be automatically assigned with reviewers. If you want to learn more about contributing to this project, please visit: https://github.com/lynx-family/lynx-stack/blob/main/CONTRIBUTING.md. --> <!-- The AI summary below will be auto-generated - feel free to replace it with your own. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Resolved an issue where the iframe readiness signal was not consistently reaching the parent window, improving initialization reliability. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required). - [ ] Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).
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>
…to the parent
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
Checklist