Repository navigation
feat(plugin-form): a multi file / image field takes the whole row in the form auto-layout - #34698
Conversation
…the form auto-layout Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-Authored-By: Claude <noreply@anthropic.com>
…plyAutoLayout; add changeset Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Final green head for L1 · 2026-11-17T07:39Z
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 (seat 3, L1-a) · 2026-11-17T07:42ZL1: REWORK The code, tests, changeset and CI hold, and points (a) to (e) in the request all read true (table below). One must-fix: the published spec text for Must-fix
Should-fixNone. Readings that hold
Notes
|
…full column count under 'auto' Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs 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, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 173 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 c7e6985f871775e1b9b396c3582e6d27ce59ed08 && git checkout c7e6985f871775e1b9b396c3582e6d27ce59ed08
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f02f4f63707bd05ae2186ca63babd54bfe37abcc eba9da323e37e236c05fce3a1962cc7af95513f1 && git checkout -B drift-repro f02f4f63707bd05ae2186ca63babd54bfe37abcc && git merge --no-ff eba9da323e37e236c05fce3a1962cc7af95513f1
node scripts/docs-audit/affected-docs.mjs --json f02f4f63707bd05ae2186ca63babd54bfe37abcc |
Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 delta (seat 3, L1-a) · 2026-11-17T09:08ZL1: ACCEPT The one must-fix is closed. The delta is two commits on top of Must-fix 1 (REWORK 6941942506): closed
Readings that hold
Notes
|
… span, still wins over the 'auto' full row Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 delta (seat 3, L1-a) · 2026-11-17T09:47ZL1: ACCEPT The delta is one commit (
The seat's L2 (per the amendment) reads this head. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Read: card #34668 (body and all six comments: triage 6939389827, claim 6940544964, report 6941857166, claim amendment 6941965048, fix-round report 6943607190), PR #34698 body and its six files, the net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings:
No must-fix. Implemented-by: VERDICT: PASS |
Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Delta on the merged head. Supersedes PASS 6944618256 @ What changed: only the merge. Check-runs on this head: 72 completed: 61 success, 11 skipped, 0 failure. Should-fix status:
No must-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Landing · area o3-B · 2026-11-17T10:31Z
State change: ready for review + auto-merge (merge queue). Card #34668 closes on merge via |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44065829231 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Yibo Wang · project thread
Fixes #34668
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
Clause-②: no
Metadata-protocol: none
维护者速读
multiple: true的文件 / 图片字段默认占整行;弹窗、整页表单、分页签表单、向导表单走同一条规则。单文件 / 单图仍占一格。[2, 3, 3]个,即与普通字段同宽)。详情页早已按同一判据让多文件字段占整行,这次表单与它对齐(裁定 6939109581「只放宽多文件附件」)。FormField.span的说明文字同步改为如实描述(只改文字,不改键和取值);作者写了span: 'full'或colSpan的照写的来(显式span: 'auto'不收窄,colSpan: 1才保持一格)。回滚即还原autoLayout.ts一个提交。ui/packages/plugin-form/src/autoLayout.ts(新增isWideFormField,resolveColSpan与twelfthsFor改为问它);ui/packages/plugin-form/src/__tests__/multiFileFullRow-34668.test.tsx;packages/spec/src/ui/view.zod.ts中FormField.span的一句说明。pnpm --dir ui exec vitest run packages/plugin-form/src/__tests__/multiFileFullRow-34668.test.tsx,预期 17 passed。What changes
ui/packages/plugin-form/src/autoLayout.ts: a module-privateisWideFormField(field)answers thespan: 'auto'default. It returns true for a wide type (isWideFieldType, unchanged), and for afile/imagefield (bare orfield:spelling) whose object field declaresmultiple: true. This is a parallel copy of plugin-detail'sMULTI_FILE_FIELD_TYPES/isWideDetailField, with a docblock that points at it. plugin-form does not import from plugin-detail.resolveColSpan(the CSS-grid path behindapplyAutoColSpan,applyAutoLayoutandsectionFormLayout) andtwelfthsFor(the twelve-track path ofsectionedGridLayout) now askisWideFormFieldwhere they askedisWideFieldType. The precedence is unchanged:span: 'full', then an authoredcolSpan, then the default. The author's width still wins.multipleis read. It is read off the object-field definition that the object-bound builders stash on the FormField (FormField.field, set byfromObjectSchemaand byObjectForm's flat builder). It is never read offFormField.multiple, which a form view entry can restate. This is the card's "只读对象字段的multiple". Reading the stash means no caller had to change: every host that lays out through these helpers gets the rule, and the diff does not touchModalForm.tsx,DrawerForm.tsx,ObjectForm.tsx,TabbedForm.tsxorWizardForm.tsx.WIDE_FIELD_TYPES,isWideFieldType's signature or answer, or the package'sindex.tsx/core.tsexports. No metadata key is added.ui/packages/plugin-form/README.md: the wide-kinds sentence names the multi-file rule.packages/spec/src/ui/view.zod.ts: theFormField.span.describe()said that under'auto'"only textarea, markdown, html, richtext and repeater resolve to the full column count". That is no longer true, so it now reads "only textarea, markdown, html, richtext and repeater, plus a file or image field whose object field declaresmultiple: true, resolve to the full column count (…); an authoredcolSpanstill wins over that default (colSpan: 1keeps such a field in one cell)." The colSpan clause was corrected in round 2:resolveColSpanandtwelfthsForcheckspan: 'full', thencolSpan, thenisWideFormField(which covers both the wide types and multi file / image). So an explicitspan: 'auto'does not narrow any of them, and only an authoredcolSpandoes. This is description text only: no schema, key, value or default changes, soClause-②: noandMetadata-protocol: nonestand (L1-a REWORK 6941942506, claim amendment 6941965048). Regenerated output:content/docs/references/ui/view.mdx(theFormFieldandFormSection.fieldsrows). The JSON Schema output is gitignored, andcheck:authorable-surfaceregenerates it and is green..changeset/34668-form-multi-file-full-row.md:@object-ui/plugin-formpatch and@objectstack/specpatch (the description text).Tests
New file
ui/packages/plugin-form/src/__tests__/multiFileFullRow-34668.test.tsx, 17 tests. The rendered cases read per-row counts from the real form renderer's classes at@md/@2xl/@4xl, the same reading asdialogContainerColumns-34607.fulldialog (four wide), undeclared sections, the object'sfieldGroups, and a mixed-density (twelve-track) dialog. Multi image and multi file take the row ([1, 1, 1]).ObjectFormsectioned,ObjectFormflat (span equals the inferred grid width),TabbedForm,WizardForm.[2, 3, 3]). An authoredcolSpan: 1keeps a multi image in one cell.span: 'full'still widens a single file.multiplealone does not widen);multipleon select / lookup does nothing; authoredcolSpanwins; twelve-track twelfths;applyAutoLayout.field:file/field:imagein the package's tests). The full package suite is green unedited (below).Acceptance notes
multiple. A form view entry restatingmultipleover the object field changes the widget (sectionFieldsmergesfd.multiple). It does not change the width, because the ruling reads the object field only. A view that turns a single-file object field into a multi-file widget therefore keeps one cell, and the author can widen it withspan: 'full'. This follows the ruling and is recorded here, not changed.video/audio. These map to thefield:filewidget. If their object field declaredmultiple: true, they would widen in the form but not in the detail view, which matches on the raw type. The spec's multi-capable types are select / lookup / file / image, so this is not reachable through validated metadata. No card filed.ModalForm.tsxdocblock. TheDIALOG_DEFAULT_COLUMNSdocblock lists the wide kinds viaisWideFieldTypeand does not mention multi-file. It is still true as written. It was left alone because the file belongs to the sibling 表单弹窗:加放大图标,原地展开为整页,与记录抽屉的放大一致 #34604 work.ObjectFormDesignerpreviews widths withisWideFieldTypeon the raw type, so its preview does not show the multi-file rule. Not a defect class under the card. Noted only.customFieldsmember, or a form mounted with no object schema, carries no stashed object field and keeps the type-only answer.Verification
Head:
eba9da32, a clean merge oforigin/mainf02f4f6 into31c82383(no hand resolution). Sincef261912bthe plugin-form code and tests in this PR are unchanged. The blocks after the spec block were taken onf261912b; the merge block was taken oneba9da32.After the origin/main merge (head eba9da3)
Spec text (head 31c8238)
Round 1: CI on
ed2ed090failedType Check · source gates(check:docs:view.mdxout of date; that commit carried the describe edit without the regenerated page).d48fa36dwas green on every check.New test file (17/17) and ablation
Before / after for a
multiple: trueimage in the 17-field create dialog (three wide), per row at @md / @2XL / @4XL: before (the ablated leg, which is origin/main's rule)[2, 3, 3], one cell. After:[1, 1, 1], the whole row.Package suite and type-check
Local gate subset (dispatch-gates --commands, narrowed by diff)
Every other family (the wide-population and roster families, Type Check UI, Test UI, Lint UI, the full farm) is CI's. See the PR check-runs.
Overlap:
node scripts/pm/overlap-check.mjsreportedVERDICT clean exit 0(origin/main fecd2e9 merges cleanly; 0 open PR heads share a file).Generated by Claude Code