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
The dependency array in the useMemo hook for computing cellOrderNumber uses cell.query.cellList.length, but the logic reads from state.queries[cell.query.id].cellList. This mismatch can lead to stale values when the cell list changes. Update the dependencies to reflect the actual source.
The newly added empty StyledName component has no styling, overriding the previous StyledName definition and potentially breaking the UI layout. Merge or restore necessary styles.
The logic for parsing numeric indices in cell references uses parseFloat and subtracts one, but may not handle invalid or non-integer values robustly. Consider validation and using parseInt or proper error handling.
The queryId variable is undefined in this scope and will cause a runtime error. Replace it with the correct cell.query.id reference when constructing the template string.
Why: The queryId variable isn’t defined in this scope; replacing it with cell.query.id prevents runtime errors.
Medium
Validate integer index and bounds
Ensure the segment is an integer index and within the cells list bounds. Use parseInt and Number.isInteger to validate, then check it’s >= 1 and ≤ the cellList.length before indexing.
-const isNumber = !isNaN(parseFloat(path[1]))+const index = parseInt(path[1], 10)+const isIndexValid = Number.isInteger(index) &&+ index >= 1 &&+ index <= this._store.queries[variable.to].cellList.length
Suggestion importance[1-10]: 7
__
Why: Ensuring the index is an integer and within cellList bounds prevents runtime errors when accessing out-of-range cells.
Medium
General
Prevent mutating original array
Avoid mutating the original array by using slice to create a new array of the remaining segments. This preserves path for other operations and prevents unintended side effects.
-const p = path-p.splice(0,2)+const p = path.slice(2)
Suggestion importance[1-10]: 6
__
Why: p.splice mutates the original path causing side-effects; using slice preserves immutability and avoids unintended bugs.
Low
Simplify lookup and fix dependencies
Simplify the lookup using findIndex and include both cell.query.id and the actual nbCellList.length in the dependency array. This ensures the memo updates correctly when the list or query changes.
Added special syntax for referencing cells by order in expressions
Display and copy cell order numbers in notebook UI
to commit the new content to the CHANGELOG.md file, please type:
'/update_changelog --pr_update_changelog.push_changelog_changes=true'
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.
Description
Changes Made
How to Test
Notes