Repository navigation
fix(models): recover from invalid Hub detail responses - #4622
Merged
gabsprogrammer merged 1 commit intoSep 13, 2026
Merged
gabsprogrammer merged 1 commit into
gabsprogrammer merged 1 commit into
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
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.
Why this matters: A successful HTTP response containing HTML, an error envelope, or a missing artifacts array can crash the Hugging Face artifact dialog instead of offering its existing Retry details action. The response helper converts unreadable JSON to an empty object, which then reaches rendering.
Require the requested repository ID and an artifacts array before accepting detail data. Invalid metadata stays in the dialog's error path; retry requests the same repository and cannot start an import.
Validation:
Overlap check: all-state title/file searches; inspected #3050 (cancels obsolete detail requests). #4339 handles obsolete search results and #4356 gives the dialog native modal behavior. None rejects an unusable detail envelope before rendering.
AI assistance: implemented and validated with Codex. Review required before merge: independent review of the model-import UI. Browser API responses were synthetic; no model was downloaded.
Combined validation: c08b6695ff14 on public-beta base 9fc9f61. Dashboard: 906 passed; lint exits 0; production build passes.
Backlog compatibility: candidate includes #3050 and passes 63 affected UI tests. Retain request cancellation and ownership checks before validating the repository envelope. #4356 native-dialog compatibility was not exercised on this candidate.