Summary
When creating a new Hook, ALL fields (label, name, object, description) render as plain text inputs. The Object field should be a <Select> dropdown of existing objects.
Root cause
In packages/app-shell/src/views/metadata-admin/anchors.ts, lines 90-103, Hook defines createFields: ['label', 'name', 'object', 'description'] but provides no createSchema at all. Without a schema, SchemaForm has no property type information — every field renders as plain text. The object field never receives widget: 'ref:object'.
Compare with Page (lines 110-187) and Validation (lines 288-326) — they both provide createSchema with proper widget: 'ref:object'.
Steps to reproduce
- Navigate to Metadata → Hook → Create new
- All fields are plain text inputs with no type-aware rendering
- Compare with Page → Create new — fields are properly typed, Object is a dropdown
Expected behavior
Proper typed fields with Object as a <Select> dropdown.
Fix
Add a createSchema with widget: 'ref:object' on the object property.
Impact
Typo-prone, bad UX, inconsistent with Page/View/Validation.
Summary
When creating a new Hook, ALL fields (label, name, object, description) render as plain text inputs. The Object field should be a
<Select>dropdown of existing objects.Root cause
In
packages/app-shell/src/views/metadata-admin/anchors.ts, lines 90-103, Hook definescreateFields: ['label', 'name', 'object', 'description']but provides nocreateSchemaat all. Without a schema, SchemaForm has no property type information — every field renders as plain text. Theobjectfield never receiveswidget: 'ref:object'.Compare with Page (lines 110-187) and Validation (lines 288-326) — they both provide
createSchemawith properwidget: 'ref:object'.Steps to reproduce
Expected behavior
Proper typed fields with Object as a
<Select>dropdown.Fix
Add a
createSchemawithwidget: 'ref:object'on theobjectproperty.Impact
Typo-prone, bad UX, inconsistent with Page/View/Validation.