docs: consolidate component conventions into CLAUDE.md and skill

- Add "Dynamic add-item form fields" guidance to CLAUDE.md (pick
  component by field schema: LabelSelector / ListInput / MetadataList)
- Fold StatusTag status-display recipe into create-crud-page skill
- Remove DESIGN.md (content migrated to the above)
This commit is contained in:
jialin
2026-06-29 19:44:28 +08:00
committed by jialin
parent f719c11606
commit 6509f2a4ff
3 changed files with 52 additions and 47 deletions
+8
View File
@@ -93,3 +93,11 @@ Avoid `styled-components` for complex or large-scale styling. Prefer:
- **Permission-gated visibility**: `Access` / `useAccess`.
- **Request hooks**: `useRequest` / `useQueryData` / `useQueryDataList` from `@gpustack/core-ui`.
- **Table data fetching**: `useTableFetch` from `@gpustack/core-ui`.
# Dynamic add-item form fields
When building a form, select the add-item component from the **shape of the field's data** (its schema). Match the schema, don't hand-roll a list UI:
- **Plain object** (key→value map) → `LabelSelector`.
- **String array** → `ListInput`. Ref `src/pages/llmodels/forms/backend-parameters-list.tsx`.
- **Object array** → `MetadataList` with a custom item renderer per entry. Ref `src/pages/llmodels/forms/model-lora-list.tsx`.