Repository navigation
Commit f53a8d0
fix(react): carry the 18 form-view spec keys the bridge silently dropped (#6365)
`spec-bridge/bridges/form-view.ts` states in its own docblock that "every
serializable spec key is either mapped onto the `object-form` node or listed
here with an explicit reason for being ignored — the bridge must never silently
drop spec configuration (#2545)". Measured against `@objectstack/spec` 17.2.0
that was false for 18 keys: 2 on `FormViewSchema`, 2 on `FormSectionSchema`,
14 on `FormFieldSchema`.
Seventeen have a real destination the receiving layer already reads, so they are
mapped; the eighteenth is an explained refusal, which is what "not silently"
asks for:
buttons / defaults -> `ObjectFormSchema` declares both slots and
`ObjectForm` folds them at render.
section.pane -> `ObjectFormSection.pane`, read by `SplitForm`'s
`paneOf`; dropped, every authored placement fell
back to the positional rule.
section.visibleOn -> folded onto `visibleWhen`, reproducing the
contract's own `normalizeVisibleWhen` for the
never-parsed input class this bridge serves.
13 field keys -> same-name copies onto the runtime FormField, at the
destinations `normalizeSectionField` already pins.
field.publicPicker -> NOT carried: a server-side public-lookup
authorization opt-in with no client destination.
The conformance test is why it stayed green: its completeness loop iterated
`Object.keys(FIXTURE)`, so a key nobody remembered to write into the fixture was
a key it never asked about. Its key set is now derived from the contract's own
shape at all three levels, every key must be claimed by a behavioral row or a
reasoned ignore entry, and the fixture is asserted spec-valid before any row
runs.
Claude-Session: https://claude.ai/code/session_011SfZeFWrhGLHmfq61xbz4q
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9180fd1 commit f53a8d0
3 files changed
Lines changed: 558 additions & 96 deletions
File tree
- .changeset
- packages/react/src/spec-bridge
- __tests__
- bridges
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments