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
app-shell FormSectionSpec re-declares fields as REQUIRED, so the spec-legal { group } section does not compile — and SchemaForm's three unguarded s.fields reads are a fourth form-section consumer #8725
Found while implementing objectui#8641 (the apps/consoleFormPage half of form.sections[].group). Filed rather than fixed there: it is a different package, a different renderer and a widening of a shared authoring type, so it is outside that card's scope.
What was measured
@objectstack/spec 17.3.0 declares group on FormSectionSchema and makes fields OPTIONAL — a section declares its members exactly one way (objectstack#13855, ADR-0085 §5). Measured against the installed 17.3.0:
packages/app-shell/src/views/metadata-admin/form-spec.ts derives FormSectionSpec from that same spec symbol and then re-declares fields as REQUIRED:
exporttypeFormSectionSpec=&Omit<FormSection,'fields'|'label'|'description'|'visibleWhen'|'visibleOn'>&{
...
/** The authored field list. Element type is the converged leaf (objectui#5542). */fields: Array<string|FormFieldSpec>;};
Two consequences, both static readings of the current main:
Reachability was not measured. The reads above are unguarded by inspection; whether a { group } section can reach SchemaForm today (its inputs are this repo's own *.form.ts create/edit schemas, which do not author group) was not established, and neither was a DOM reproduction. Whoever takes this should reproduce first, exactly as objectui#8641 required of itself — a defect established only by reading is the thing this queue has been wrong about before.
Why it is a decision and not a mechanical widening
Making fields optional is one character in form-spec.ts and then a choice at each of the three read sites, and the choice is the card:
?? [] degrades a group-referencing section to an EMPTY one — today's silent drop, made non-throwing. That is a behaviour ruling on a renderer, not a type fix.
The standing constraint applies either way (objectui#7051, objectstack#13855): no assembly rule may be re-implemented on the objectui side. @object-ui/plugin-form now publishes resolveSectionGroupReferences for exactly this, so the second option is an import rather than a new derivation.
Refs
objectui#8641 — the apps/consoleFormPage half (this finding's parent measurement)
Found while implementing objectui#8641 (the
apps/consoleFormPagehalf ofform.sections[].group). Filed rather than fixed there: it is a different package, a different renderer and a widening of a shared authoring type, so it is outside that card's scope.What was measured
@objectstack/spec17.3.0 declaresgrouponFormSectionSchemaand makesfieldsOPTIONAL — a section declares its members exactly one way (objectstack#13855, ADR-0085 §5). Measured against the installed 17.3.0:packages/app-shell/src/views/metadata-admin/form-spec.tsderivesFormSectionSpecfrom that same spec symbol and then re-declaresfieldsas REQUIRED:Two consequences, both static readings of the current
main:The spec-legal shape does not compile. A TypeScript author writing
{ group: 'contact_info' }into aFormSectionSpecis refused by the very type whose header says it "describes what an AUTHOR WROTE, so it stays as wide as the document". objectui#8641's own pin fixture has to cast around it. This is the same declaration defect PR fix(plugin-form,types): resolveform.sections[].groupthrough the single field-group assembler, and bound the section loop that blanked the form #8644 fixed on the sibling type:ObjectFormSectiongainedgroupand madefieldsoptional so the spec-legal shape compiles.SchemaFormis a FOURTH form-section renderer, and itsfieldsreads are unguarded.packages/app-shell/src/views/metadata-admin/SchemaForm.tsx:for (const f of s.fields) {const fields = s.fields.map(normaliseField)s.fields.map(normaliseField).some(...)All three are above the JSX they feed, so a section carrying no
fieldsthrowsCannot read properties of undefined (reading 'map')out of the component body rather than degrading to an empty section — the same above-the-loop shape that blankedSimpleObjectFormbefore fix(plugin-form,types): resolveform.sections[].groupthrough the single field-group assembler, and bound the section loop that blanked the form #8644, which a per-section boundary could not have contained either.Not measured, stated as such
Reachability was not measured. The reads above are unguarded by inspection; whether a
{ group }section can reachSchemaFormtoday (its inputs are this repo's own*.form.tscreate/edit schemas, which do not authorgroup) was not established, and neither was a DOM reproduction. Whoever takes this should reproduce first, exactly as objectui#8641 required of itself — a defect established only by reading is the thing this queue has been wrong about before.Why it is a decision and not a mechanical widening
Making
fieldsoptional is one character inform-spec.tsand then a choice at each of the three read sites, and the choice is the card:?? []degrades a group-referencing section to an EMPTY one — today's silent drop, made non-throwing. That is a behaviour ruling on a renderer, not a type fix.FormPage, and fix(plugin-form,types): resolveform.sections[].groupthrough the single field-group assembler, and bound the section loop that blanked the form #8644 forObjectForm) needs the object definition, whichSchemaFormis not currently handed.The standing constraint applies either way (objectui#7051, objectstack#13855): no assembly rule may be re-implemented on the objectui side.
@object-ui/plugin-formnow publishesresolveSectionGroupReferencesfor exactly this, so the second option is an import rather than a new derivation.Refs
apps/consoleFormPagehalf (this finding's parent measurement)form.sections[].groupthrough the single field-group assembler, and bound the section loop that blanked the form #8644 — theplugin-formhalf, and the type widening this one mirrorsrecord:detailshalfGenerated by Claude Code