fix(react/runtime): revert #239 'batch multiple patches for main thread communication'#637
Conversation
🦋 Changeset detectedLatest commit: d114e6d 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 |
❌ 16 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
CodSpeed Performance ReportMerging #637 will not alter performanceComparing Summary
|
Bundle ReportChanges will decrease total bundle size by 912 bytes (-0.14%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: @lynx-js/example-react-lynx-cjsAssets Changed:
|
…r main thread communication'
There was a problem hiding this comment.
Pull Request Overview
This PR reverts the changes introduced in #239 that batched multiple patches for main thread communication. The updates restore the previous commit flow and update the render calls accordingly.
- Revert batched patch commits.
- Replace renderBackground calls with direct render calls.
- Update test files and import statements to reflect these changes.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/testing-library/src/vitest-global-setup.js | Reverted snapshot import and cleared batched patch calls adjustments. |
| packages/react/testing-library/src/pure.jsx | Removed the extra commitToMainThread invocation and updated imports. |
| packages/react/testing-library/src/tests/worklet.test.jsx | Updated patch data format to remove batched patches. |
| packages/react/runtime/src/lynx/tt.ts | Replaced call to renderBackground with render in runWithForce. |
| packages/react/runtime/src/lynx-api.ts | Updated render call to use render instead of renderBackground. |
| packages/react/runtime/src/lifecycle/render.ts | Removed the renderBackground helper function. |
| packages/react/runtime/src/lifecycle/reload.ts | Replaced renderBackground with render to re-render the main thread. |
| packages/react/runtime/src/lifecycle/patch/commit.ts | Removed batching of patches and the associated commitToMainThread logic. |
| packages/react/runtime/src/lifecycle/destroy.ts | Updated to call render directly for component destruction. |
| Other test files | Adjusted imports to reference render instead of renderBackground. |
Summary
Reverts #239: "batch multiple patches for main thread communication"
This reverts the change that batched updates sent to the main thread in a single render pass.
Checklist