You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Flow createDefaults missing type field — save may fail server validation if type not explicitly selected #2326
Flow createFields asks for type, but createDefaults does not include a default value for type. If a user saves without selecting a type, the body may fail server validation against FlowSchema.
Root cause
In packages/app-shell/src/views/metadata-admin/anchors.ts, lines 253-267:
The spec's FlowSchema (spec/src/automation/flow.zod.ts, line 253) defines type: z.enum(['autolaunched', 'record_change', 'schedule', 'screen', 'api']) as non-optional. The authoritative BUILTIN_METADATA_CREATE_SEEDS correctly seeds type: 'autolaunched', but anchors.ts createDefaults is out of sync.
There is also no createSchema, so the type enum is not constrained client-side.
Steps to reproduce
Create a new Flow, enter name and label
Don't explicitly pick a type value
Save — may fail server validation because type is missing
Expected behavior
createDefaults should include type: 'autolaunched'.
Activity
fix(metadata-admin): seed flow createDefaults with required `type` (#…