You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(table-core): point sorted row model rowsById at sorted branch clones - #6635
When sorting re-orders a parent's subRows, createSortedRowModel clones that parent, but rowsById was reused from the pre-sorted row model. As a result, table.getRow(id) returned the original parent with unsorted subRows, which is not the row rendered in getRowModel().rows.
rowsById is now copied the first time a branch row is cloned, and each clone is written into the copy. When no branch is cloned, the existing map is still reused. Two regression tests are added to createSortedRowModel.test.ts.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Nested sorting now updates rowsById to reference cloned rows. When sorting does not clone rows, the sorted model reuses the original lookup map.
When nested sorting clones rows, the sorted model copies rowsById and indexes the clones. Tests check lookup results, unchanged row identity, sorted child order, and reuse of the original map when there are no clones. The changeset documents the update.
The sorted-row lookup change has no identified merge-blocking issue in the supplied evidence; proceed with normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the primary change: updating table-core sorted row models so rowsById points to sorted branch clones.
Description check
The description includes the required Changes, Checklist, and Release Impact sections. It explains the problem, implementation, tests, and changeset, and all applicable checklist items are marked comp…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description includes the required Changes, Checklist, and Release Impact sections. It explains the problem, implementation, tests, and changeset, and all applicable checklist items are marked complete.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Changes
When sorting re-orders a parent's
subRows,createSortedRowModelclones that parent, butrowsByIdwas reused from the pre-sorted row model. As a result,table.getRow(id)returned the original parent with unsortedsubRows, which is not the row rendered ingetRowModel().rows.rowsByIdis now copied the first time a branch row is cloned, and each clone is written into the copy. When no branch is cloned, the existing map is still reused. Two regression tests are added tocreateSortedRowModel.test.ts.✅ Checklist
pnpm testandpnpm test:e2e, or these tests do not apply to this pull request.🚀 Release Impact
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests