Repository navigation
fix(plugin-form): a repeater on span 'auto' takes the whole row, on the record form and /forms/NAME - #37743
Conversation
The spec's form field `span` docblock lists `repeater` among the wide types. It reached the full row through the `field:grid` widget it used to map to; since objectui#11448 it maps to `field:object`, the JSON editor json/object/composite/record share, so both form renderers gave it one cell. The `span: 'auto'` default now also reads the object field's type (`WIDE_DECLARED_FIELD_TYPES`), so a repeater is wide and the shared widget id stays narrow. The bare `repeater` name joins `WIDE_FIELD_TYPES` for the designer, which passes raw types. The named-form page passes the object field's `type` to `resolveColSpan`, as it passed `multiple`. The docblock's stale mechanism clause and the liveness note are corrected and docs regenerated. Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 4a5c26eb693e3736902eda477548733b84e943ad && git checkout 4a5c26eb693e3736902eda477548733b84e943ad
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 468672a0dd3c54d6de7300e27e2045af0332710f 2e64358476fa8927577c561a2f6be24d740fa871 && git checkout -B drift-repro 468672a0dd3c54d6de7300e27e2045af0332710f && git merge --no-ff 2e64358476fa8927577c561a2f6be24d740fa871
node scripts/docs-audit/affected-docs.mjs --json 468672a0dd3c54d6de7300e27e2045af0332710f |
app-shell's richtextSurfaceParity test holds the form's and the detail view's isWideFieldType equal on every spec type. The bare `repeater` name now widens through the declaration rule in isWideFormField (matched on FormField.type for the designer's raw types, and on FormField.field.type), not through WIDE_FIELD_TYPES, so the detail view's width stays its own. Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Read: card #37677 (body, triage, claim), the PR body, the 8-file net diff, and the check-runs on this head (62 success, 11 skipped, 1 cancelled: the first ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
S1 (should-fix) —
Fix: have the canvas ask the declaration rule (an exported predicate, or S2 (should-fix) — N1 (nit) — N2 (nit) — parity. Out of the diff, not graded on this head: Card delivered: yes on its own terms. Both renderers give a repeater the row, each with a pin and a Implemented-by: VERDICT: PASS |
…orm does Contract review S1: the canvas asked `isWideFieldType` on the widget id, so a repeater stayed one cell there while the runtime form now gives it the row. It now asks the form's own `span: 'auto'` default (`resolveColSpan`) with the raw type in the stash; the repeater pin is turned over and a `json` control added. S2: the `span` describe no longer names `object`, which is not a spec field type; docs regenerated and the changeset matched. N1: the plugin-form docblocks name the repeater rule where they list the others. Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri Co-authored-by: Claude <noreply@anthropic.com>
…span the row The catalog sweep in ObjectFormDesigner.typeName-13148 derived its expected span from `isWideFieldType` on the widget id, the canvas's old rule. The canvas now asks the form's `span: 'auto'` default, which widens a repeater by its declared type, so the control says so. Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta round on record 7207845228 (head S1: closed No must-fix, no should-fix. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
The N3 (nit) — N4 (nit) — the canvas withholds N2 and the Card delivered: yes. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 2e64358 · card #37677 · area s2-ux · 2026-11-27T03:19ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
Requested by Sales · project thread
Fixes #37677
A
repeaterfield with nospanrendered one cell wide in a two-column form, on the record form and on/forms/NAME, though the spec's form fieldspandocblock lists repeater among the types that take the whole row onspan: 'auto'.Premise, measured on
main(94843b8)A two-column form with a text field, a textarea and a repeater, no
spananywhere:ModalForm,columns: 2)@md:col-span-2/forms/NAME(FormPage, 2-column section)sm:col-span-2The contract side is right and the renderers are wrong: repeater used to reach the full row through the wide
field:gridwidget it mapped to. Since objectui#11448 it maps tofield:object, the JSON editor thatjson,object,compositeandrecordalso take, andfield:objectis not on the wide list. Only the docblock's "through thefield:gridwidget" clause was stale.What changes
@object-ui/plugin-form(autoLayout.ts). Thespan: 'auto'default (isWideFormField) also reads the OBJECT field's type offFormField.field, through a newWIDE_DECLARED_FIELD_TYPES = {repeater}. The same set is matched onFormField.typetoo, for the caller that passes raw object-field types (app-shell'sObjectFormDesigner). Neitherrepeaternorfield:objectjoinsWIDE_FIELD_TYPES:isWideFieldTypeis the type-only answer app-shell'srichtextSurfaceParitytest holds equal to plugin-detail's.@object-ui/console(FormPage.tsx). The named-form page now passes the object field'stypebeside itsmultipleintoresolveColSpan, so both renderers read the same declaration.@object-ui/app-shell(ObjectFormDesigner.tsx). The Studio form designer canvas now asks the form's ownspan: 'auto'default (resolveColSpan, with the widget id astypeand the raw type in the stash) instead ofisWideFieldTypeon the widget id, so it lays a repeater out across the row as the runtime form does (contract review S1). Every other type answers as before: the stash carries nomultiple.@objectstack/spec(view.zod.ts, describe only). Thespandescribe now says repeater is wide "by its object-field type: the JSON editor it maps to is shared with json, composite and record, which stay one cell".liveness/view.jsonrowform.sectionscarries the re-read;content/docs/references/ui/view.mdxregenerated.Decisions made here
field:objectto the wide list would also widenjson,object,compositeandrecord, which the docblock does not list. The multi-file rule already readsFormField.fieldthe same way.spankey; the detail view's width is not part of this contract.Verification
mainand green here (4 red with the two source files reverted):plugin-form/src/__tests__/repeaterAutoSpan-37677.test.tsx(5): the record Edit dialog renders the repeater row@md:col-span-2; ajsonfield on the same widget and a text field stay one cell (control);resolveColSpanonfield:objectis 1 alone, full withfield.type: 'repeater', 1 withfield.type: 'json'; the bare designer type is wide throughresolveColSpanwhileisWideFieldType('repeater')stays false; an authoredcolSpan: 1still wins (control).app-shell/src/views/studio-design/ObjectFormDesigner.test.tsx: the repeater pin ("lays arepeaterfield out the way the runtime form resolves it") now assertscol-span-full; a newjsoncontrol on the same widget stays one cell.ObjectFormDesigner.typeName-13148.test.tsx's catalog sweep derived its expected span from the canvas's old rule and went red on5c42345811(Test UI 10/16); its control now expects a repeater to span the row (fourth commit). All 12ObjectFormDesigner*files: 82 green.console/src/components/FormPage.fieldSpan-37559.test.tsx(+3): a repeater takessm:col-span-2; ajsonfield stays one cell;colSpan: 1on a repeater wins.app-shell/src/views/richtextSurfaceParity.test.tsx(unchanged): the detail and form type-only wide sets still agree on every spec type. It went red on the first head (bb58f2016b, Test UI 5/16) whenrepeatersat onWIDE_FIELD_TYPES; the second commit moves it to the declaration rule, and the test is green locally.vitestover all ofplugin-formand everyFormPage*test: green; plugin-form__tests__re-run after the second commit: 1,031 passed.tsc -p tsconfig.test.jsonforplugin-form: no errors in the changed files.eslinton the changed files: 0 errors.ObjectFormDesigner.test.tsx,richtextSurfaceParity,repeaterAutoSpan-37677andautoLayout.test.ts: 80 green; app-shelltsc -p tsconfig.test.jsonclean on the designer files (with a rebuilt plugin-form dist);eslint: 0 errors.packages/spec: built, thencheck:generated(14 artifacts up to date) andcheck:api-surfaceunchanged.overlap-check: exit 0 (feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 and refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts #37366 share the spec files and merge cleanly).Clause-②: no
Metadata-protocol: none
Skills-docs: none
Human Minimum
packages/specholds no runtime logic. (Describe text only.)eslinton the changed files passes (the fullpnpm lintruns in CI).main, one pull request.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri