Skip to content

refactor(FR-1929): remove all model_card_metadata.json related code#6226

Draft
yomybaby wants to merge 1 commit intomainfrom
03-27-refactor_fr-1929_remove_all_model_card_metadata_json_related_code
Draft

refactor(FR-1929): remove all model_card_metadata.json related code#6226
yomybaby wants to merge 1 commit intomainfrom
03-27-refactor_fr-1929_remove_all_model_card_metadata_json_related_code

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented Mar 27, 2026

Resolves #5068(FR-1929)

Summary

  • Delete useModelCardMetadata hook, model_card_metadata.json, and model_card_metadata.schema.json
  • Remove all references to model card metadata in ModelStoreListPage (sorting logic, thumbnail lookup) and ModelCardModal (metadata list check, ModelCardChat conditional render)
  • Clean up .gitignore entry for model_card_metadata.json

Files changed

  • Deleted: react/src/hooks/useModelCardMetadata.tsx
  • Deleted: resources/model_card_metadata.json
  • Deleted: resources/model_card_metadata.schema.json
  • Modified: react/src/pages/ModelStoreListPage.tsx — removed import, models/sorting usage, sorting logic, and thumbnail lookup from metadata
  • Modified: react/src/components/ModelCardModal.tsx — removed import, modelMetadataList references, ModelCardChat conditional block, and unused ModelCardChat import
  • Modified: .gitignore — removed resources/model_card_metadata.json entry

Test plan

  • Verify Model Store list page renders correctly without sorting or metadata-based thumbnails
  • Verify Model Card modal opens and displays details without metadata-dependent chat section
  • Verify no TypeScript or lint errors introduced

🤖 Generated with Claude Code

@github-actions github-actions bot added the size:XL 500~ LoC label Mar 27, 2026
Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.14% (+0.02% 🔼)
1403/17231
🔴 Branches
7.34% (+0.03% 🔼)
883/12033
🔴 Functions
5.35% (+0.01% 🔼)
258/4821
🔴 Lines
7.84% (+0.02% 🔼)
1316/16785

Test suite run success

773 tests passing in 36 suites.

Report generated by 🧪jest coverage report action from dde4314

Remove the useModelCardMetadata hook, model_card_metadata.json,
model_card_metadata.schema.json, and all references in ModelStoreListPage
and ModelCardModal. Also delete orphaned ModelCardChat.tsx component
whose only import was removed. The team decided not to use
model_card_metadata.json anymore.
@yomybaby yomybaby force-pushed the 03-27-refactor_fr-1929_remove_all_model_card_metadata_json_related_code branch from 37ad3a0 to dde4314 Compare March 27, 2026 04:34
@github-actions github-actions bot added quick-capture size:L 100~500 LoC and removed size:XL 500~ LoC labels Mar 27, 2026
@yomybaby yomybaby requested a review from Copilot March 27, 2026 04:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the deprecated model_card_metadata.json mechanism from Backend.AI WebUI, eliminating the associated hook/resources and simplifying Model Store UI behavior that depended on that metadata.

Changes:

  • Deleted useModelCardMetadata hook and the model_card_metadata.json + schema resources.
  • Removed metadata-dependent sorting and thumbnail lookup from ModelStoreListPage.
  • Removed metadata-dependent chat rendering from ModelCardModal and cleaned up .gitignore.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
react/src/hooks/useModelCardMetadata.tsx (deleted) Removes the client-side fetch/caching hook for model card metadata JSON.
resources/model_card_metadata.json (deleted) Removes unused metadata JSON artifact.
resources/model_card_metadata.schema.json (deleted) Removes unused JSON schema for the metadata file.
react/src/pages/ModelStoreListPage.tsx Removes sorting/thumbnail lookup based on deleted metadata; uses default thumbnail.
react/src/components/ModelCardModal.tsx Removes metadata list lookup and the metadata-gated chat UI block.
react/src/components/ModelCardChat.tsx (deleted) Removes now-unreferenced chat component previously gated by metadata presence.
.gitignore Removes ignore rule for the deleted metadata JSON file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove all code related to model_card_metadata.json

2 participants