Skip to content

feat: add sortable miner PR table columns#104

Open
Eruis2579 wants to merge 1 commit intoentrius:testfrom
Eruis2579:miner-pr-sorting
Open

feat: add sortable miner PR table columns#104
Eruis2579 wants to merge 1 commit intoentrius:testfrom
Eruis2579:miner-pr-sorting

Conversation

@Eruis2579
Copy link

Summary

  • Added interactive column sorting to the Pull Requests table on the Miner Details page (MinerPRsTable).
  • Users can now click any table header (PR #, Title, Repository, +/-, Score, Merged) to sort ascending or descending.

Details

  • Introduced SortField / SortOrder state and a sortedPRs list derived from the existing filteredPRs.
  • Implemented column-specific sorting rules:
    • PR #: numeric sort by pullRequestNumber.
    • Title: alphabetical, case-insensitive, by pullRequestTitle.
    • Repository: alphabetical, case-insensitive, by repository.
    • +/‑: numeric sort by total changed lines (additions + deletions).
    • Score: numeric sort by the effective displayed score:
      • Uses collateralScore for unmerged PRs when present, otherwise score.
      • Closed & unmerged PRs are treated as 0 for sorting.
    • Merged: sort by merge date when mergedAt is present; otherwise ordered by status (OPEN vs CLOSED).
  • Connected all headers to MUI TableSortLabel for a consistent sorting UX with other tables in the app.

Impact

  • Makes it easier for miners and reviewers to quickly inspect and compare PRs (e.g., highest score, largest diff, most recently merged) directly from the Miner Details page without leaving the dashboard.

Screenshots

###Before
image

###After
image

Checklist

  • New components are modularized/separated where sensible
  • Uses predefined theme (e.g. no hardcoded colors)
  • Responsive/mobile checked
  • Tested against the test API
  • npm run format and npm run lint:fix have been run
  • npm run build passes
  • Screenshots included for any UI/visual changes

@Eruis2579
Copy link
Author

When I pushed this PR, dashboard was not changed and github code was not changed for Table sort and nobody didn't mention about this in any PR.
So, I changed code and pushed. but now Dashboard was changed.
How can be this PR in this case?
If you close this PR, my credibilliy of 74 bittensor subnet will de decreased.
plz help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant