Skip to content

Hook registration missing createSchema — all create fields render as plain text inputs, no object dropdown #2324

Description

@akarma-synetal

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

  1. Navigate to Metadata → Hook → Create new
  2. All fields are plain text inputs with no type-aware rendering
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions