Skip to content

Studio: show Hugging Face address on hover for Hub and online model rows (#6382) - #6928

Merged
wasimysaid merged 4 commits into
unslothai:mainfrom
danielhanchen:fix-hub-address-tooltips-6382
Jul 8, 2026
Merged

wasimysaid merged 4 commits into
unslothai:mainfrom
danielhanchen:fix-hub-address-tooltips-6382

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Follow-up to the earlier local-path tooltip so #6382 is fully addressed. Hub and online model rows in the model selector now show their Hugging Face address on hover, the same way local rows already show their on-disk path.

What changed

studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx:

  • New optional hubUrl prop on ModelRow and a hubRepoUrl(id) helper returning huggingface.co/<id> (or undefined for an empty id, so no empty address line renders).
  • Consolidated the two tooltip branches into a single tooltipBody. Precedence is unchanged: VRAM estimate > local path > Hub address, and the VRAM tooltip now also appends the address line.
  • Wired hubUrl={hubRepoUrl(...)} on the five Hub and online call sites: Discover/recommended, search-recommended, search-hf, downloaded GGUF, and downloaded model rows.

Local rows keep their existing on-disk path tooltip (they never pass hubUrl), so there is no regression.

Testing

npm run typecheck (tsc -b) passes clean.

Closes #6382

The model selector already shows an on-disk path tooltip on local rows,
but Hub and online rows showed only the bare repo id, and nothing at all
when there was no VRAM estimate. Add an optional hubUrl prop and a
hubRepoUrl helper that mirrors localPathTooltip, and surface
huggingface.co/<repo_id> on hover for the Discover, search, and
downloaded Hub rows. Local and VRAM tooltips are unchanged; the VRAM
tooltip now also appends the address line.

Closes unslothai#6382

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a hubUrl prop to the ModelRow component to display Hugging Face repository URLs on hover within the model selector tooltips. The reviewer identified a potential issue where the Hugging Face URL line is omitted if both tooltipText and hubUrl are provided, and suggested a code improvement to ensure the URL is appended to the tooltip text in all cases.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +562 to +575
const tooltipBody = vramTooltipText ? (
<>
{label}
<span className="block text-[10px] mt-1">{vramTooltipText}</span>
{hubUrlLine}
</>
) : tooltipText ? (
tooltipText
) : hubUrl ? (
<>
<span className="block break-words">{label}</span>
{hubUrlLine}
</>
) : null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

If both tooltipText and hubUrl are provided to ModelRow, the current implementation will completely omit the hubUrlLine because tooltipText takes precedence and returns immediately without appending hubUrlLine.

To make the component more robust and prevent potential future bugs if both props are passed, we should append hubUrlLine to tooltipText as well.

  const tooltipBody = vramTooltipText ? (
    <>
      {label}
      <span className="block text-[10px] mt-1">{vramTooltipText}</span>
      {hubUrlLine}
    </>
  ) : tooltipText ? (
    <>
      {tooltipText}
      {hubUrlLine}
    </>
  ) : hubUrl ? (
    <>
      <span className="block break-words">{label}</span>
      {hubUrlLine}
    </>
  ) : null;

danielhanchen and others added 3 commits July 7, 2026 10:20
Give the model-row hover tooltip (the Hugging Face address, plus the VRAM
and local-path lines it shares) a 700ms open delay instead of showing it
instantly, so it does not flash while sweeping the mouse down the list.
@wasimysaid
wasimysaid merged commit f1a2621 into unslothai:main Jul 8, 2026
0 of 36 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48880cc5bd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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.

[Bug] Addresses of local and online models should appear in pop-up messages, upon hovering over them

2 participants