Skip to content

表单自动排版:多文件 / 多图字段占整行(与详情页一致) #34668

Closed

Description

@objectstack-fleet

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

立卡门类别:④ 协调节点的子单,承父单 #34571(控制台核心业务操作体验专题,维护者直派,「都是p1」);在飞卡 #34607 第 3 项的衍生,⛔ 不是认领。
维护者 2026-11-17 在 3 号座位线程的选择卡上选了「只放宽多文件附件」(裁定记录见 #34607 的 Ruled: 评论);同日原话「如果影响本专题相关任务落地的,你也应该挂到这个专题下继续开发」。

现状(读码,objectstack origin/main)

要做的

  1. 表单自动排版(整页和弹窗同一规则)里,对象字段声明 multiple: true 的 file / image 字段占整行,判据与 isWideDetailField 相同(只读对象字段的 multiple)。
  2. 单文件 / 单图字段保持一格;作者显式写了 span 的照作者写的来。

不做的

  • 不把 file / image 加进 WIDE_FIELD_TYPES(那会让单文件也占整行,推翻上面写明的设计)。
  • 不加新的元数据键。

验收

  1. 一个含 multiple: true 图片字段的对象,新建弹窗(3–4 列)里该字段占整行,缩略图不重叠;整页表单同样占整行。
  2. 单文件字段仍占一格;写了 span 的字段不受影响。
  3. 现有钉住单文件一格的测试保持绿,新增多文件整行的钉子。

业务理由与读者

Activity

  1. added
    priority:p1
    domain:ui
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: pm:queue on seat 3's request · 2026-11-17T05:21Z

    ⛔ Not a claim.

  3. added
    pm:queue
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs

    Claim: PM loop round 2 · 2026-11-17T06:23Z
    Session: session_01WGufzgwLiKcfujYUug7sPs
    Account: os-support-ai
    Branch: claude/issue-34668-multi-file-full-row
    Worktree: objectstack-issue-34668
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/plugin-form/src/autoLayout.ts (col-span rule), its callers in ui/packages/plugin-form/src/** only where they must pass the object field, tests, ui/packages/plugin-form/README.md if it describes wide fields, root .changeset/
    Container & model: S/M, mode:subagent (area o3-B), model: TIER_DEFAULT (dispatch-gates --tier on autoLayout.ts: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6939389827
    Premise: holds (card body read at fecd2e9: plugin-form WIDE_FIELD_TYPES module-private without file/image; plugin-detail MULTI_FILE_FIELD_TYPES + isWideDetailField at autoLayout.ts:85-115 reads the object field's multiple)
    Serial constraints cleared: #34607 (PR #34645) merged fecd2e95 as the card requires; overlap-check probe on autoLayout.ts + ModalForm.tsx vs origin/main fecd2e95: clean, #34642 merges cleanly; runs alongside #34604 (ModalForm header/size, disjoint hunks)
    Pre-claim lane: domain:ui — ui/packages/plugin-form/src/** (area o3-B roots)
    Pre-claim deps: #34607 merged; no Blocked-by:
    Prior rulings read: Ruled 6939109581 on #34607 (maintainer chose 「只放宽多文件附件」): form auto-layout, file/image with multiple: true take a full row, mirroring isWideDetailField; single-file stays one cell; applies to the full-page form too (accepted by the maintainer); WIDE_FIELD_TYPES is two module-private copies, not one shared set. Card 「不做的」: no file/image in WIDE_FIELD_TYPES, no new metadata key.

    Lease o3-B (seat post #34584); child of epic #34571.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
    os-dev-report

    {
      "issue": 34668,
      "status": "done",
      "branch": "claude/issue-34668-multi-file-full-row",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34698",
      "session": "session_01WGufzgwLiKcfujYUug7sPs",
      "premise_still_valid": true,
      "summary": "plugin-form autoLayout.ts gains a module-private isWideFormField(field): a wide type (isWideFieldType, unchanged) OR a file/image field (bare or field: spelling) whose OBJECT field declares multiple: true, a parallel copy of plugin-detail's isWideDetailField. resolveColSpan (behind applyAutoColSpan / applyAutoLayout / sectionFormLayout) and twelfthsFor (sectionedGridLayout's twelve-track path) ask it where they asked isWideFieldType; span:'full' and an authored colSpan still win. multiple is read off the object-field definition the object-bound builders stash on FormField.field (fromObjectSchema, ObjectForm's flat builder), never FormField.multiple, so no caller changed: ModalForm/DrawerForm/ObjectForm/TabbedForm/WizardForm untouched. README wide-kinds sentence and a patch changeset added; no export or metadata key changed.",
      "tests": "head f261912b: pnpm --dir ui exec vitest run packages/plugin-form/src/__tests__/multiFileFullRow-34668.test.tsx -> Test Files 1 passed, Tests 17 passed (lock VERDICT command-exit 0). Package suite (a52c87ea, later commit only adds 2 tests + changeset): vitest run packages/plugin-form/ -> Test Files 235 passed (235), Tests 2633 passed | 1 skipped, no existing test edited. type-check (tsc --noEmit && tsc -p tsconfig.test.json) exit 0 on f261912b; test file listed by tsconfig.test.json --listFilesOnly (1 hit). Ablation (src import, no dist leg) via ablation-replace.mjs: multi-file arm -> return false; mutation landed anchor 1->0, blob 808ab16b->59410cc1; Tests 12 failed | 3 passed (15) (the 3 green are the unchanged controls); restored blob == HEAD, git diff HEAD empty.",
      "gates": "local, head f261912b: 38/38 dispatch-gates --commands families run, each exit 0 (exit captured per command before any pipe; ui scripts vitest under the lock: Test Files 171 passed | 2 skipped, VERDICT command-exit 0); plus pnpm check:changeset-fixed exit 0 (roster under .changeset) and pnpm --dir ui run check:new-line-citations exit 0 (0 new citations). dispatch-gates --ran: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN. CI on f261912b: all completed, 39 success / 13 skipped / 0 failure: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI (16/16 shards), Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards all success; Build Core skipped (path filter).",
      "dogfood_battery": "n/a — no ! in the PR title and Clause-②: no carries no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 relay writes: pr_create (POST /repos/objectstack-ai/objectstack/pulls + its assignees leg POST /issues/34698/assignees, run 44037039339) and this os-dev-report comment via post-stamped.mjs (POST /issues/34668/comments); git push x2 (not REST)",
      "open_questions": [
        {
          "question": "os-dev.md bans dev-written HTML comments in GitHub text; the dispatch and the seat standard order require the PR body's last line to be an HTML-comment signed line. Which wins?",
          "options": [
            "A keep the dispatch's signed comment line (done here; read-back 10477 bytes sent == stored)",
            "B drop it and rely on the plain signature line under Fixes"
          ],
          "recommendation": "A for this seat, since the read-back proved it intact; the seat may want os-dev.md or the standard order reconciled"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted in PR Acceptance notes, not filed: a form-view entry restating multiple changes the widget but not the width (the ruling reads the object field only)",
        "carrier: none · noted: app-shell ObjectFormDesigner previews widths via isWideFieldType on the raw type, so its preview omits the multi-file rule",
        "carrier: #34604 · noted: ModalForm.tsx DIALOG_DEFAULT_COLUMNS docblock lists the wide kinds without the multi-file rule; still true as written, left to avoid the sibling's file"
      ],
      "files_changed": [
        ".changeset/34668-form-multi-file-full-row.md",
        "ui/packages/plugin-form/README.md",
        "ui/packages/plugin-form/src/__tests__/multiFileFullRow-34668.test.tsx",
        "ui/packages/plugin-form/src/autoLayout.ts"
      ],
      "head_sha": "f261912b6faf98420ad8dc44238cc743a562c763",
      "ci_state": "success (all completed, 0 failure)",
      "line_budget": "342 changed lines (+336/-6) vs 3000 threshold: under; no skills/** touched",
      "deviations": [
        "the single-file ablation test run went straight through ablation-replace without the verify lock (one small vitest file)",
        "pnpm check:new-line-citations was first typed at the repo root (exit 254, script not found, not a gate verdict) and rerun as pnpm --dir ui run check:new-line-citations exit 0",
        "package suite was measured on a52c87ea; f261912b only adds two tests to the new file (re-run 17/17 on f261912b) and the changeset"
      ]
    }
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

    Claim amendment · 2026-11-17T07:43Z

    From L1-a REWORK 6941942506 on PR #34698 (must-fix): the .describe() on FormField.span in packages/spec/src/ui/view.zod.ts (:4043) says only textarea, markdown, html, richtext and repeater resolve to the full column count; after this card a file or image field declared multiple: true does too, so the published text would be false. Seat ruling: fix it in this card, not a follow-up.

    File surface widens to:

    • packages/spec/src/ui/view.zod.ts (the FormField.span describe text only)
    • the outputs regenerated from it: content/docs/references/ui/view.mdx and the matching packages/spec/json-schema/** file(s)
    • the changeset gains '@objectstack/spec': patch

    Clause-②: no (description text only; no key, value or default changes)
    Metadata-protocol: none
    Review: published spec schema text ⇒ seat L2 at CONTRACT_REVIEW_TIER on the new head after L1-a's delta. Not on the governed register, so not Tier H.

  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
    os-dev-report

    {
      "issue": 34668,
      "status": "done",
      "round": "fix round 1 (L1-a REWORK 6941942506, claim amendment 6941965048)",
      "branch": "claude/issue-34668-multi-file-full-row",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34698",
      "head_sha": "d48fa36dd0260757074d70dfdd2dbde1b12dc191",
      "session": "session_01WGufzgwLiKcfujYUug7sPs",
      "premise_still_valid": true,
      "summary": "Amended the FormField.span .describe() in packages/spec/src/ui/view.zod.ts to read: only textarea, markdown, html, richtext and repeater, plus a file or image field whose object field declares `multiple: true`, resolve to the full column count (repeater parenthetical kept); an author's explicit span wins. Description text only, so no schema, key, value or default change; Clause-② no / Metadata-protocol none stand. Regenerated content/docs/references/ui/view.mdx (the FormField and FormSection.fields rows; exactly 2 lines changed). The JSON Schema output is gitignored. Added '@objectstack/spec': patch and one paragraph to the changeset. Updated the PR body through the relay (issue_patch): attribution first, signed line last. The CI red on ed2ed090 (Type Check · source gates, check:docs: view.mdx out of date) came from pushing the describe edit as a WIP commit before regenerating; d48fa36d carries the regenerated page and the job is green.",
      "tests": "plugin-form untouched this round, so its suite was not re-run. pnpm --filter @objectstack/spec build: VERDICT command-exit 0. check:generated before regen: exit 1 (check:docs stale); --fix: exit 0 (gen:docs, check:docs re-check green); on d48fa36d under the lock: exit 0, all 14 artifacts up to date.",
      "gates": "d48fa36d: dispatch-gates --commands derived 115 families; --ran reconciliation 115 derived / 115 run / 0 NOT-MEASURED. All exit 0 on the final reading. In the first batch run, run alongside other gates, 7 families failed and then passed alone: check:docs-transcript-drift, check:dual-build-cjs-loads, check:lean-entry-closure, lint check:doc-formula-expressions, lint check:doc-security-posture and spec check:skill-examples exited 3, then 0; spec check:generated exited 1 (check:test-typecheck tsc failed without diagnostics under contention), then 0 under the lock. check-plugin-teardown-shape --self-test exited 3 (shallow clone, positive-control commit unreachable); after git fetch of that one commit it exited 0. Local-only: check:skill-frame-freshness exit 0; check:dev-prereqs NOT MEASURED (precondition unmet: 34/107 workspace dists unbuilt in a fresh worktree; it judges local build state). check:changeset-fixed exit 0. ui scripts vitest under the lock exit 0. CI on d48fa36d: 72 check-runs, 61 success, 11 skipped, 0 failure; Type Check · source gates, TypeScript Type Check, Lint & Repo Gates, Test Core, Build Core, Test UI, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, Governed Surface Queue Guard all success.",
      "dogfood_battery": "n/a — no ! in the title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "this round: 2 relay writes: issue_patch on #34698 (PR body, run 44048078439, 13390 bytes sent == stored) and this os-dev-report comment; 2 git pushes (ed2ed090, d48fa36d)",
      "files_changed_this_round": [
        "packages/spec/src/ui/view.zod.ts",
        "content/docs/references/ui/view.mdx",
        ".changeset/34668-form-multi-file-full-row.md"
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: packages/spec/liveness/view.json's FormField note cites WIDE_FIELD_TYPES as the evidence for 'auto' sizing. It is still true as written (it names what that set widens, not an exhaustive list) and lies outside the amended surface"
      ],
      "deviations": [
        "ed2ed090 was pushed as a WIP commit with the describe edit before the docs were regenerated, so CI's check:docs went red on that head. d48fa36d fixes it.",
        "This round's PR-body rewrite went through the relay's issue_patch at the coordinator's explicit request; os-dev.md assigns post-create body edits to the seat"
      ]
    }
  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
    os-dev-report

    {
      "issue": 34668,
      "status": "done",
      "round": "fix round 2 (seat should-fix before L2) + clean origin/main merge",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34698",
      "head_sha": "eba9da323e37e236c05fce3a1962cc7af95513f1",
      "session": "session_01WGufzgwLiKcfujYUug7sPs",
      "summary": "31c82383: reworded the FormField.span describe clause from \"an author's explicit span wins\" to \"an authored `colSpan` still wins over that default (`colSpan: 1` keeps such a field in one cell)\". Checked against autoLayout.ts: resolveColSpan and twelfthsFor test span 'full', then colSpan, then isWideFormField, which covers the wide types and multi file/image alike, so the reading holds for every wide type. view.mdx was regenerated in the same commit, and the changeset sentence was aligned. eba9da32: clean --no-ff merge of origin/main f02f4f63 (18 commits, no hand resolution), pushed before the body refresh. The PR body now names eba9da32 (relay issue_patch, 14477 bytes sent == stored).",
      "gates": "31c82383: check:generated --fix and check:generated under the lock exit 0. dispatch-gates 115 derived / 115 run / 0 NOT-MEASURED. In the sequential batch 7 were non-zero (6 exit 3, check:generated exit 1); each exited 0 when re-run alone. ui check:new-line-citations exit 0. eba9da32: overlap-check clean exit 0; closure build, spec check:generated, plugin-form type-check and the plugin-form suite (237 files, 2653 passed | 1 skipped) all under the lock, VERDICT command-exit 0. CI on eba9da32: 72 check-runs, 61 success, 11 skipped, 0 failure.",
      "mcp_calls": "0",
      "api_writes": "relay issue_patch x2 on #34698 (31c82383 body, then eba9da32 body) + this comment; git push x2",
      "security_findings": "none",
      "out_of_scope_findings": [],
      "open_questions": []
    }
  10. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs

    Delivered · 2026-11-17T11:11Z

    • PR feat(plugin-form): a multi file / image field takes the whole row in the form auto-layout #34698 merged (merge commit a8aa6ab4e8c491d2863aa973966b07a5db7216f9); card closed by Fixes. L1 ACCEPT 6943670952 → delta ACCEPT 6944507418; Contract review PASS 6944618256 → delta PASS 6945472666 (merged head); landing 6945496487.
    • Delivered: in form auto-layout (dialog, page, wizard and tabbed hosts that lay out through resolveColSpan / twelfthsFor), a file or image field whose object field declares multiple: true takes the full row, per maintainer ruling 6939109581; a single file / image stays one cell; span: 'full' and an authored colSpan still win (colSpan: 1 keeps it in one cell). The FormField.span describe text in @objectstack/spec and its generated reference row now say the same (description text only, no key / value / default change). plugin-form README updated.
    • Left to others (follow-up, nothing filed by this area): the liveness evidence for the new clause. packages/spec/liveness/view.json row form.sections cites WIDE_FIELD_TYPES for the five wide types and nothing for the multi-file clause (isWideFormField / MULTI_FILE_FIELD_TYPES in ui/packages/plugin-form/src/autoLayout.ts); the note stays true and the gate is green, so a later card should add the read point. The ObjectFormDesigner preview gap went to epic 专题:控制台核心业务操作体验(详情、表单与子表、审批、通知、手机端、应用与 Studio 往返、云端入口) #34571's filer (seat).
    • State: pm:dispatched removed (card closed).
  11. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:uipriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions