Repository navigation
Conversation
agammann
reviewed
Nov 11, 2026
agammann
left a comment
There was a problem hiding this comment.
Could you add a fractional-index regression case, such as reorder({ from: 0.5, to: 0 }) or swap({ from: 0, to: 0.5 })? Number.isInteger is a distinct new part of isListIndex, and the old code coerces fractional indices in splice or writes a non-index array property, so a fractional input can corrupt the list just as a missing index can. The current tests exercise the bounds checks but would still pass if the integer check were removed. I reviewed the diff; I did not run tests locally.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is the problem?
A reorder event with an out-of-range source index can insert an undefined item and change the list length. A swap with a missing index can overwrite a valid item. This can occur when a handler receives indices from an earlier list state.
What does this change?
Ignore reorders whose source is missing and swaps with either index missing. Valid reorders retain the existing splice behavior for the destination.
Validation
Both regressions fail on master. All 18 hook tests and targeted formatting and lint passed. The repository build passed during verification. Full typecheck reached an implicit-any error in the docs sponsor component.
AI disclosure: OpenAI Codex assisted with implementation, verification, and review.