feat: make Repository Pull Requests table columns sortable#283
Merged
anderdc merged 2 commits intoentrius:testfrom Apr 15, 2026
Merged
Conversation
Contributor
Author
|
@anderdc can you please review my PR and let me know your feedback? |
9 tasks
anderdc
approved these changes
Apr 15, 2026
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.
Summary
On the Repository page's Pull Requests tab, the table columns are now clickable and sortable (PR #, Title, Author, Commits, +/-, Score, Status, Merged). Default sort remains Score desc so the current UX is preserved. Matches the
TableSortLabel-based sort pattern already used inRepositoryWeightsTableandLanguageWeightsTable.What changed
sortField/sortOrderstate with ahandleSorttoggle that flips asc ↔ desc on the active column and jumps to a sensible default when switching columns (strings default to asc, numbers/dates default to desc).sortedPRswith a dynamic comparator that handles:pullRequestNumber,commitCount,score, totallines= additions + deletions)pullRequestTitle,author) vialocaleComparemergedAtvianew Date().getTime()with unmerged PRs sorting to 0statusvia a stable rank order (OPEN → MERGED → CLOSED)<TableSortLabel>so users see MUI's standard arrow indicator on the active column.No behavior change on initial render (default is still score desc). No new API calls; all sorting is client-side on the already-fetched PR list.
Type of Change
Testing
Manual on any repo Pull Requests tab:
mergedAtabove the dashed placeholdersChecklist
TableSortLabelpattern already used elsewhere in the repoMedia to upload
2.mp4
Fixes #282