Skip to content

Conversation

@urmauur
Copy link
Member

@urmauur urmauur commented Sep 3, 2025

Describe Your Changes

This pull request updates the model search and filtering logic in the Hub page to improve the handling of HuggingFace repository searches and the "Downloaded Only" toggle. The changes ensure that switching between viewing all models and only downloaded models properly resets or re-triggers searches, and that duplicate models are prevented by checking both model name and developer.

Improvements to search and filtering behavior:

  • The HuggingFace repository search is now only triggered when not in "Downloaded Only" mode, preventing unnecessary searches.
  • When toggling "Downloaded Only" back to "All models," the HuggingFace search is re-triggered if the search value is a repository path or URL, ensuring the UI updates correctly.
  • Switching to "Downloaded Only" mode resets the selected HuggingFace repository to null for consistency.

Improvements to duplicate model prevention:

  • The logic for preventing duplicate models now checks both the trimmed model name and developer, ensuring that models from different developers with the same name are handled correctly. [1] [2]

Fixes Issues

Screen.Recording.2025-09-03.at.18.31.25.mp4

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Improves HuggingFace repo search and filtering logic in Hub component, ensuring proper handling of "Downloaded Only" mode and preventing duplicate models by checking both name and developer.

  • Search and Filtering:
    • fetchHuggingFaceModel() now only triggers when not in "Downloaded Only" mode.
    • Re-triggers HuggingFace search when toggling "Downloaded Only" back to "All models" if search value is a repo path or URL.
    • Resets selected HuggingFace repo to null when switching to "Downloaded Only" mode.
  • Duplicate Prevention:
    • Checks both model name and developer to prevent duplicates in fetchHuggingFaceModel().
  • Misc:
    • Adjusted handleSearchChange() to clear previous repo info and conditionally fetch models based on showOnlyDownloaded.

This description was created by Ellipsis for 38629af. You can customize this summary. It will automatically update as commits are pushed.

@urmauur urmauur added this to the v0.7.0 milestone Sep 3, 2025
@urmauur urmauur self-assigned this Sep 3, 2025
@urmauur urmauur added this to Jan Sep 3, 2025
@urmauur urmauur moved this to Needs Review in Jan Sep 3, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 5f9f766 in 1 minute and 59 seconds. Click for details.
  • Reviewed 72 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft 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/src/routes/hub/index.tsx:207
  • Draft comment:
    Good: Added condition to avoid triggering a HuggingFace repo search in 'Downloaded Only' mode. This prevents unnecessary network calls when the toggle is active.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining what a change does without suggesting any improvements or asking for clarifications. It doesn't align with the rules for useful comments.
2. web-app/src/routes/hub/index.tsx:223
  • Draft comment:
    Nice improvement: The duplicate check now includes a comparison of both trimmed model names and developers. This fixes the issue with models by different authors sharing the same name.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it praises the improvement without providing any actionable feedback or suggestions. It doesn't align with the rules for useful comments.

Workflow ID: wflow_xsTXGUcp1UMLsAr9

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 38629af in 1 minute and 21 seconds. Click for details.
  • Reviewed 133 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft 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/src/routes/hub/index.tsx:197
  • Draft comment:
    Consider wrapping fetchHuggingFaceModel in a useCallback to avoid recreating the function on every render and to ensure it captures the latest values of dependencies (like sources and huggingfaceToken).
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. web-app/src/routes/hub/index.tsx:207
  • Draft comment:
    Consider adding a cleanup effect to clear addModelSourceTimeoutRef on component unmount to prevent any delayed execution after unmount.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. web-app/src/routes/hub/index.tsx:216
  • Draft comment:
    Double-check that the duplication check using .split('/') and pop is robust for all expected HuggingFace repo URL formats. If model names differ in format, this may lead to false negatives.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_ipq4tCGDsm08Vqln

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@Minh141120
Copy link
Member

LGTM!
image
image

@urmauur urmauur merged commit f886434 into dev Sep 3, 2025
16 checks passed
@urmauur urmauur deleted the fix/search-model-hub branch September 3, 2025 13:05
@github-project-automation github-project-automation bot moved this from Needs Review to QA in Jan Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

bug: model lookup fails when different authors use the same model name

3 participants