-
Notifications
You must be signed in to change notification settings - Fork 109
feat: use item-key as beforeMap key in diffArrayLepus #1598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 32e8ce2 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 |
📝 WalkthroughWalkthroughHydration diffing was made list-item key-aware: during ListChildren hydration, same-type elements with differing Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-08-21T08:46:54.494ZApplied to files:
📚 Learning: 2025-08-21T07:21:51.621ZApplied to files:
🧬 Code graph analysis (1)packages/react/runtime/src/hydrate.ts (1)
⏰ 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). (3)
🔇 Additional comments (2)
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 |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Web Explorer#6101 Bundle Size — 366.7KiB (0%).32e8ce2(current) vs 04f2c39 main#6100(baseline) Bundle metrics
Bundle size by type
|
| Current #6101 |
Baseline #6100 |
|
|---|---|---|
240.68KiB |
240.68KiB |
|
93.8KiB |
93.8KiB |
|
32.22KiB |
32.22KiB |
Bundle analysis report Branch feat/list-diff-use-item-key Project dashboard
Generated by RelativeCI Documentation Report issue
React Example#6105 Bundle Size — 237.83KiB (+0.16%).32e8ce2(current) vs 04f2c39 main#6104(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch feat/list-diff-use-item-key Project dashboard Generated by RelativeCI Documentation Report issue |
CodSpeed Performance ReportMerging #1598 will degrade performances by 5.92%Comparing Summary
Benchmarks breakdown
Footnotes
|
|
This pull request has been automatically marked as stale because it has not had recent activity. If this pull request is still relevant, please leave any comment (for example, "bump"). |
8a5e9a5 to
491563b
Compare
|
bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.changeset/clear-numbers-call.md(1 hunks)packages/react/runtime/__test__/list.test.jsx(56 hunks)packages/react/runtime/src/backgroundSnapshot.ts(1 hunks)packages/react/runtime/src/hydrate.ts(6 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/clear-numbers-call.md
🧠 Learnings (6)
📓 Common learnings
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1782
File: packages/react/transform/crates/swc_plugin_inject/napi.rs:31-47
Timestamp: 2025-09-19T07:37:58.778Z
Learning: User gaoachao prefers to keep refactoring PRs minimal and focused, deferring non-essential improvements to separate PRs to maintain clear scope boundaries.
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#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/clear-numbers-call.md
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#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/clear-numbers-call.md
📚 Learning: 2025-08-19T11:25:36.127Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1558
File: .changeset/solid-squids-fall.md:2-2
Timestamp: 2025-08-19T11:25:36.127Z
Learning: In the lynx-family/lynx-stack repository, changesets should use the exact package name from package.json#name, not generic or unscoped names. Each package has its own specific scoped name (e.g., "lynx-js/react-transform" for packages/react/transform).
Applied to files:
.changeset/clear-numbers-call.md
📚 Learning: 2025-09-18T04:43:54.426Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1771
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_component_with_static_sibling.js:2-2
Timestamp: 2025-09-18T04:43:54.426Z
Learning: In the lynx-family/lynx-stack repository, the `add_pure_comment` function in packages/react/transform/src/swc_plugin_compat/mod.rs (around lines 478-482) is specifically for `wrapWithLynxComponent` calls, not `createSnapshot` calls. The PURE comment injection for `createSnapshot` is handled separately in swc_plugin_snapshot/mod.rs.
Applied to files:
.changeset/clear-numbers-call.md
📚 Learning: 2025-08-21T07:21:51.621Z
Learnt from: upupming
PR: lynx-family/lynx-stack#1562
File: packages/react/transform/src/swc_plugin_snapshot/jsx_helpers.rs:261-283
Timestamp: 2025-08-21T07:21:51.621Z
Learning: In packages/react/transform/src/swc_plugin_snapshot/jsx_helpers.rs, the team prefers to keep the original unreachable! logic for JSXSpreadChild in jsx_is_children_full_dynamic function rather than implementing defensive error handling.
Applied to files:
packages/react/runtime/src/hydrate.ts
🧬 Code graph analysis (2)
packages/react/runtime/__test__/list.test.jsx (3)
packages/react/runtime/src/snapshot.ts (1)
SnapshotInstance(278-658)packages/react/runtime/src/pendingListUpdates.ts (1)
__pendingListUpdates(7-44)packages/react/runtime/src/hydrate.ts (1)
hydrate(222-398)
packages/react/runtime/src/hydrate.ts (1)
packages/react/runtime/src/snapshot/platformInfo.ts (1)
PlatformInfo(25-35)
⏰ 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). (3)
- GitHub Check: build / Build (Windows)
- GitHub Check: build / Build (Ubuntu)
- GitHub Check: test-rust / Test (Ubuntu)
Co-authored-by: Zhiyuan Hong <28915578+hzy@users.noreply.github.com> Signed-off-by: BitterGourd <91231822+gaoachao@users.noreply.github.com>
Summary by CodeRabbit
Bug Fixes
Documentation
Tests
Checklist