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
finding(plugin-form): the same top-level fields silent-drop trap is undocumented on TWO more registrations — form/view:form and object-master-detail-form #8847
objectui#8738 (route 2, closed by objectui#8846) documents object-form's
top-level fields input: members are bare field names, { name } tolerated,
and the spec FormFieldSchema object ({ field: 'note', colSpan: 2 }) —
legal in sections[].fields — resolves to no name and is silently skipped
(SimpleObjectForm in ObjectForm.tsx; buildFlatFields in flatFields.ts).
Re-deriving the read sites for #8738 (against main @ e9d92120a) turned up
the identical, still-undocumented trap on two more ComponentRegistry
registrations in packages/plugin-form/src/index.tsx:
packages/plugin-form/src/index.tsx:~430 — object-master-detail-form's fields input, documented as 'Which parent fields to show, in order. Ignored when sections is given — sections carry their own field lists.'. MasterDetailForm.tsx's own comment says this is 'Parent form sections/fields — passed straight through to ObjectForm' —
i.e. the same SimpleObjectForm read site — so the same { field: 'note' } silent-drop applies, and the existing description does
not mention it.
Why this is a category-(c) trap, not a nit
Both entries let an author (or an AI generating metadata) write the spec's FormFieldSchema object into a fields array that looks identical in shape
to sections[].fields, and get a silent drop with no throw, warning, or
empty-state — exactly the population #8738 was opened to close, just reached
through a different registered type name.
Suggested fix
Same route-2 treatment as #8846: add/extend the description on both entries
to state the bare-name-only vocabulary and the contrast with sections[].fields, mirroring the text #8846 added to object-form.fields.
Route 1 (whether to also console.warn) is out of scope here too — that
question is still unruled for #8738 and this finding doesn't change that.
#8738's dispatch and its pinned probe
(objectFormFieldsMembers-8071.test.tsx) scope specifically to object-form;
widening that PR's diff to other registrations wasn't authorized, so this is
filed separately rather than folded in.
Context
objectui#8738 (route 2, closed by objectui#8846) documents
object-form'stop-level
fieldsinput: members are bare field names,{ name }tolerated,and the spec
FormFieldSchemaobject ({ field: 'note', colSpan: 2 }) —legal in
sections[].fields— resolves to no name and is silently skipped(
SimpleObjectForminObjectForm.tsx;buildFlatFieldsinflatFields.ts).Re-deriving the read sites for #8738 (against
main@e9d92120a) turned upthe identical, still-undocumented trap on two more
ComponentRegistryregistrations in
packages/plugin-form/src/index.tsx:packages/plugin-form/src/index.tsx:292—ComponentRegistry.register('form', ObjectFormRenderer, …), theview:formalias of the exact sameObjectFormRenderer/SimpleObjectFormcomponent
object-formuses. Its{ name: 'fields', type: 'array' }entryhas no description at all — the same gap finding(plugin-form):
object-formcarries TWO surfaces spelledfieldswith different member vocabularies — the specFormFieldSchemaobject is silently dropped by the top-level one #8738 closed forobject-form,left open here.
packages/plugin-form/src/index.tsx:~430—object-master-detail-form'sfieldsinput, documented as'Which parent fields to show, in order. Ignored whensectionsis given — sections carry their own field lists.'.MasterDetailForm.tsx's own comment says this is'Parent form sections/fields — passed straight through to ObjectForm'—i.e. the same
SimpleObjectFormread site — so the same{ field: 'note' }silent-drop applies, and the existing description doesnot mention it.
Why this is a category-(c) trap, not a nit
Both entries let an author (or an AI generating metadata) write the spec's
FormFieldSchemaobject into afieldsarray that looks identical in shapeto
sections[].fields, and get a silent drop with no throw, warning, orempty-state — exactly the population #8738 was opened to close, just reached
through a different registered
typename.Suggested fix
Same route-2 treatment as #8846: add/extend the
descriptionon both entriesto state the bare-name-only vocabulary and the contrast with
sections[].fields, mirroring the text #8846 added toobject-form.fields.Route 1 (whether to also
console.warn) is out of scope here too — thatquestion is still unruled for #8738 and this finding doesn't change that.
Not filed as part of #8846
#8738's dispatch and its pinned probe
(
objectFormFieldsMembers-8071.test.tsx) scope specifically toobject-form;widening that PR's diff to other registrations wasn't authorized, so this is
filed separately rather than folded in.