-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: search models result in hub should be sorted by weight #5954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 5211f1d in 1 minute and 27 seconds. Click for details.
- Reviewed
184lines of code in4files - Skipped
0files when reviewing. - Skipped posting
6draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/package.json:45
- Draft comment:
Added dependency 'fuse.js'. Ensure that any custom options (like threshold or key weights) are configured if needed in the future. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. web-app/src/lib/__tests__/utils.test.ts:3
- Draft comment:
Removed tests for the fuzzySearch function. Confirm that no external consumers rely on fuzzySearch and the removal is intentional. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. web-app/src/lib/utils.ts:90
- Draft comment:
The fuzzySearch function has been removed. Verify that no other part of the codebase depends on it now. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. web-app/src/routes/hub/index.tsx:200
- Draft comment:
Search filtering now uses Fuse.js with the given searchOptions. Consider memoizing the searchOptions (or the Fuse instance) to avoid recreating it on every rerender for better performance, especially if the sources array grows large. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. web-app/src/routes/hub/index.tsx:215
- Draft comment:
The HuggingFace repo (if available) is prepended to the filtered results. Double-check that this behavior aligns with the requirement to sort results purely by relevance score, as it overrides the Fuse-based ranking. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
6. web-app/src/routes/hub/index.tsx:200
- Draft comment:
Ensure that Fuse.js is returning results in the expected order (lower score indicates a better match) so that the best matches appear at the top. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_h42olztc19BEXdjR
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Minh141120
approved these changes
Jul 28, 2025
qnixsynapse
approved these changes
Jul 28, 2025
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.



Describe Your Changes
Fixed the Model Hub search result sorting by weight.
Fixes Issues
Self Checklist
Important
Replaces
fuzzySearchwithFuse.jsfor improved search result sorting by weight in the Model Hub and adds debouncing to search input.fuzzySearchwithFuse.jsfor search result sorting by weight inHubcomponent inindex.tsx.Hubcomponent to improve performance.fuse.jstopackage.json.fuzzySearchfunction fromutils.tsand its tests fromutils.test.ts.This description was created by
for 5211f1d. You can customize this summary. It will automatically update as commits are pushed.