Skip to content

Bug: Store Sorting inconsistencies with Turbo Mode (Lazy Records) #9066

@tobiu

Description

@tobiu

Investigate and fix sorting behavior in Neo.data.Store when "Turbo Mode" (autoInitRecords: false) is active.

Symptom:
In DevRank, toggling the "Commits Only" checkbox triggers a sort on a different field (total_commits vs total_contributions). The user observed that "only the mounted row-range gets resorted".

Hypothesis:
When autoInitRecords is false, the Store holds a mix of Neo.data.Model instances (for accessed records) and raw JSON objects (for unaccessed records).
If the Sorter uses a property that exists on the Model (e.g. a calculated field like total_commits) but not on the raw JSON, the sort logic might fail or produce inconsistent results for the uninitialized records.

Task:

  1. Analyze Neo.data.Store.doSort and Neo.collection.Sorter.
  2. Determine if the Sorter correctly handles raw vs. record data.
  3. Implement a fix:
    • Option A: Force initialization of all records before sorting (heavy).
    • Option B: Ensure the Sorter can read/calculate fields from raw data (preferred for performance).
  4. Verify fix in DevRank grid.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreCore framework functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions