Skip to content

feat: sort search page based on relevance - #5175

Open
Chew wants to merge 2 commits into
RetroAchievements:masterfrom
Chew:feat/sorted-search-page
Open

feat: sort search page based on relevance#5175
Chew wants to merge 2 commits into
RetroAchievements:masterfrom
Chew:feat/sorted-search-page

Conversation

@Chew

@Chew Chew commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

This uses the logic found in SearchResults, specifically the sorting function and results wrapped in a SearchResult object, and brings it to SearchResultsContainer found on the /search page.

Using the scopeRelevance, which wasn't considered on this page before, and the sort function used in the modal should ensure the ordering is the same between the two pages, eliminating UX inconsistencies.

I just exported stuff from SearchResults, this doesn't seem to be an uncommon thing.

@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Search sections now share relevance-based ordering.

  • Exports the shared section type and comparator.
  • Sorts full-page search results consistently with global search.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "fallback for missing orders, rank them l..." | Re-trigger Greptile

These could have technically always been an issue, but now falls back to being last.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new exports build a tight coupling between SearchResultsContainer and the global search component.

I recommend extracting SearchSection to a dedicated model file, ie search-section.model.ts, and extracting sortSections to a util (maybe renamed to sortSearchSections).

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.

2 participants