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
feat(form): SplitForm honours the spec's new FormSection.pane
A split form's panel assignment was a hardcoded positional rule — first section
left, everything else right (slice(0,1)/slice(1)). The rule was invisible in the
metadata: nothing in the JSON records the assignment, so reordering sections
silently moved them across the divider, and an author (human or AI) could not
place two sections in the left pane at all.
Sections now declare their panel: `pane: 'primary' | 'secondary'`
(@objectstack/spec FormSection.pane, objectstack#4160). Placement follows the
KEY, not the array position — reordering paned sections never changes the
layout. Omitted keys keep the exact legacy rule (first section primary, rest
secondary), so existing metadata renders unchanged.
ObjectForm's split dispatch copies the key through its per-key section mapping —
the path that once silently dropped `visibleOn` — and ObjectFormSection declares
it (it is the "aligns with spec FormSection" runtime type). The spec side
rejects `pane` on non-split form types at parse, so the key can never be an
accepted-but-ignored no-op.
Tests (verified failing against the unfixed renderer first — 3 red / 9 green):
sections group by declared pane not position (two sections side by side in the
primary pane, previously inexpressible); reversing the section array changes
nothing; ObjectForm forwards the key through its mapping.
No compile-time dependency on the new spec version — the key arrives as plain
JSON — but objectstack#4160 merges first per cross-repo convention.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments