LearnNewsExamplesServices
Frontmatter
id9308
titleImplement custom sorting for Top Repo column in DevIndex
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 26, 2026, 3:03 PM
updatedAtFeb 26, 2026, 3:07 PM
githubUrlhttps://github.com/neomjs/neo/issues/9308
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 26, 2026, 3:07 PM

Implement custom sorting for Top Repo column in DevIndex

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 26, 2026, 3:03 PM

Problem: The topRepo column in the DevIndex grid maps to an array ['repoName', count]. Default sorting fails because it compares array references rather than the contribution count.

Proposed Solution: Leverage "Turbo Mode" soft hydration by adding a topRepoCount virtual field to DevIndex.model.Contributor and intercepting the sort property inside DevIndex.view.home.GridContainer#onSortColumn to sort by this count.

  • apps/devindex/model/Contributor.mjs: Add topRepoCount virtual field using (data.topRepo ?? data.tr)?.[1] || 0.
  • apps/devindex/view/home/GridContainer.mjs: Override onSortColumn to swap topRepo for topRepoCount in sortOpts before passing to the store, preserving the original property for removeSortingCss to keep visual state correct.
tobiu added the enhancement label on Feb 26, 2026, 3:03 PM
tobiu added the ai label on Feb 26, 2026, 3:03 PM
tobiu referenced in commit 2e8e63d - "feat(devindex): Implement custom sorting for Top Repo column (#9308)" on Feb 26, 2026, 3:07 PM
tobiu
tobiu Feb 26, 2026, 3:07 PM

Input from Gemini 3.1 Pro:

✦ I have implemented the custom sorting for the Top Repo column using the "Turbo-Safe" virtual field approach (topRepoCount). The onSortColumn handler in GridContainer correctly intercepts the property and preserves the visual sorting state of the header. The changes have been successfully committed and pushed to the dev branch.

tobiu assigned to @tobiu on Feb 26, 2026, 3:07 PM
tobiu closed this issue on Feb 26, 2026, 3:07 PM