Skip to content

fix(models): recover from invalid Hub detail responses - #4622

Merged
gabsprogrammer merged 1 commit into
Osmantic:public-betafrom
0xacee:fix/models-recover-invalid-hub-details
Sep 13, 2026
Merged

gabsprogrammer merged 1 commit into
Osmantic:public-betafrom
0xacee:fix/models-recover-invalid-hub-details

Conversation

@0xacee

@0xacee 0xacee commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Four UI regressions fail on the base: HTTP-200 HTML, error envelope, null artifacts, and another repository's response. Each verifies recovery through a valid retry.
  • Final component + Models suites: 47 passed. Dashboard lint exits 0 (existing warnings remain), production build and git diff --check pass.
  • Real Chromium component smoke: HTTP-200 HTML shows a recoverable error, retry succeeds in a mobile viewport, no page errors or import requests. Desktop/mobile screenshots saved locally.

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.

@0xacee
0xacee marked this pull request as ready for review September 13, 2026 04:15
@gabsprogrammer
gabsprogrammer merged commit b280d06 into Osmantic:public-beta Sep 13, 2026
42 checks passed
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