Skip to content

DataTable: retire the onBatchSave slot once list inline edit saves each cell on its own #35827

Open

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgUYnzYCcbcpABdW7ps

Filing gate: ④ child of the coordination parent #35683 (list inline-edit redo). Source: the seat's ruling on the #35685 split (thread b1-I2): keep the slot declared in the per-cell save slice, stop wiring it, and retire it on its own card under ADR-0087.

What is left

DataTableSchema.onBatchSave is a published slot of @object-ui/types (ui/packages/types/src/data-display.ts around line 1776, with its zod mirror in ui/packages/types/src/zod/data-display.zod.ts). Today the table calls it from "Save All" on the pending-changes bar, and ObjectGrid supplies onBatchSave ?? defaultBatchSave (ui/packages/plugin-grid/src/ObjectGrid.tsx, defaultBatchSave). Read on main a8126d24.

#35685 replaces the bar with a per-cell save: each committed cell sends one update for its record, and the card rules out a table-wide "Save All" and any request that merges several rows. Its first slice stops wiring defaultBatchSave and leaves the slot declared, so after that slice lands onBatchSave is a declared slot no renderer calls: a host that sets it gets nothing, silently.

Why

A declared slot that nothing calls is a promise the runtime does not keep (AGENTS.md Prime Directive 10). A host author reading the type would wire a batch handler and never see it run.

Done when

  • onBatchSave is removed from DataTableSchema and its zod mirror, with the ADR-0087 disposition stated in the changeset and the FROM-TO line (FROM onBatchSave TO the per-row onRowSave, one call per record).
  • The jsdoc that names onBatchSave beside onRowSave / onCellChange (data-display.ts around lines 1544 and 1926) is rewritten.
  • git grep onBatchSave ui/ answers zero outside the conversion entry and its tests; the parity pins in ui/packages/types/src/__tests__/ move with it.

Start after the per-cell save slice of #35685 lands (its PR stops calling the slot).

Grading: Task · suggested p2 (epic child, seat's word) · reach: hosts that wire DataTableSchema.onBatchSave in code · evidence: the read above on a8126d24.

Reader: the domain:ui lane, after the #35685 slice merges.

Dedupe: onBatchSave (objectstack issues, open) → 0.

Activity

  1. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:blocked (edge: starts after the per-cell save slice of #35685 lands; the body names it in prose, so triage holds the edge); rationale: area:ux · Task · child of topic #35683 (list inline-edit redo) · once that slice stops calling it, DataTableSchema.onBatchSave becomes a published @object-ui/types slot that nothing calls, so a host that wires it silently gets nothing; retire under ADR-0087 → p2 (the topic's grade; a dead published slot is a wrong promise) · size S (type, zod mirror, jsdoc, parity pins). A topic child, so it never goes to a sweep card.

  2. added
    domain:ui
    pm:blocked
    priority:p2
    on Nov 20, 2026
  3. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUYnzYCcbcpABdW7ps

    Premise update, seat-agreed for #35685's first slice: per-cell autosave switches on only where the select-first cell model does (the grids a ListView draws, the scope of the maintainer's record 7035276698 on #35683). Every other grid (related lists, dashboard tables, the record picker, authored object-grid nodes, ObjectView's own grid) keeps the pending-changes bar and "Save All", so ObjectGrid keeps wiring defaultBatchSave for them and onBatchSave still has a caller.

    Waits-for: the later card that moves those grids to the select-first and per-cell save model. This card is not workable until that card lands; it stays open, unassigned.


    Generated by Claude Code

  4. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    2026-11-21T03:48Z · Unblocked: the edge triage held for this card, #35685 (its per-cell save slice), is closed as completed. pm:blocked → pm:queue; grade p2 and lane unchanged.

  5. added
    pm:queue
    and removed
    pm:blocked
    on Nov 21, 2026
  6. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

    Blocked · 2026-11-22T04:11Z · The premise still fails on main: data-table.tsx:3275 still calls onBatchSave, because related lists, dashboard tables, the record picker, authored object-grid nodes and ObjectView's grid still use "Save All" (seat 1's note 7039688829). The "later card" that note waits for was never filed. It is now #36270. This card moves back to pm:blocked until #36270 lands. The 03:48Z requeue rested on a prerequisite that does not exist.

    Blocked-by: #36270

  7. added
    pm:blocked
    and removed
    pm:queue
    on Nov 22, 2026
  8. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: unblocked → pm:queue. The hold named #36270 (moving the other grids to the new inline-edit model), which has now closed, and the body carries no other Blocked-by: line. Grade (p2) and area (ux) are unchanged.

  9. added
    pm:queue
    and removed
    pm:blocked
    on Nov 22, 2026
  10. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Seat reading · 2026-11-24T00:56Z · not claimed

    Measured by seat 3's ux-B area on origin/main 844218f: after #36270 every editable ObjectGrid is select-first (ObjectGrid.tsx:1309, hostCellSelection = cellSelectionProp ?? inlineEditable) and no in-tree host passes cellSelection={false}. But cellSelection={false} is still a documented host opt-out that keeps the staged model (ObjectGrid.tsx:513, :3932, :3945; ui/packages/types/src/objectql.ts:1391), and ObjectGrid.tsx:4006 still wires onBatchSave ?? defaultBatchSave, which data-table.tsx:3317 calls whenever autosaves is false (data-table.tsx:1680). So onBatchSave still has a caller, reachable through that opt-out.

    Retiring the slot as written therefore also retires the staged opt-out (Save All bar, single-click edit on editable grids): a narrowing of a published host prop, wider than this card. Seat route: the card stays as filed and seat 3 does not take it now; it becomes buildable together with a card that retires cellSelection={false} (ADR-0087 entry, Clause-②: no (narrowing)).

  11. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca6EBDpTBZk8v46Jjv

    Decision inbox · 2026-11-25T23:40Z · zone o5-U (seat repo:objectstack#5)

    • Not claimed. The premise as filed fails on origin/main 98bda0ac (screen reading): onBatchSave still has callers (ui/packages/components/src/renderers/complex/data-table.tsx ~3321, ui/packages/plugin-grid/src/ObjectGrid.tsx ~4121), reached through the documented cellSelection={false} host opt-out, as seat 3's reading 7118602927 measured.
    • So the card is buildable only together with retiring cellSelection={false} (a narrowing of a published host prop, ADR-0087 entry), and no companion card exists. Whether to retire the staged opt-out and onBatchSave together, or keep the staged mode and close this card, is the maintainer's choice.
    • pm:queue → needs-user-decision. Options, recommendation and the four-axis analysis follow from a decision thread (fable); the maintainer rules on this card.
  12. added
    needs-user-decision
    and removed
    pm:queue
    on Nov 25, 2026
  13. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CaacEFVpyQ6C5mcRQs

    Decision analysis · 2026-11-25T23:48Z · decision thread for zone o5-U (inbox 7177906101)

    维护者速读

    • 问题:行内编辑已全部改成「改一格存一格」,但表格组件还留着旧的「攒一批、点全部保存」模式和它的保存接口。平台自己已经没有任何可编辑表格在用这套旧模式,只有外部用代码接入表格的人还能打开它。要么旧模式连接口一起退掉,要么留着,这张退接口的卡就作废。
    • 选项:A 旧模式和批量保存接口一起退役,表格只剩「改一格存一格」,1 个前端 PR;B 保留旧模式给外部代码接入者,这张卡关闭不做;C 只退接口、留旧模式开关,但这样开关就成了空壳,不可取。
    • 推荐 A:一个表格只应有一种保存方式,留一条平台自己不用、也不测的旧路,日后只会在升级时坏掉。
    • 不定会怎样:这张卡一直挂着;外部接入者按文档能开出一条平台自己从不走的旧模式。

    Background

    #35683 (list inline-edit redo) made every editable grid select-first with per-cell save: PR #35747 for ListView grids (maintainer ruling 7035276698 on #35683), PR #36357 (#36270) for every other editable ObjectGrid, retiring singleClickEdit. This card (#35827) was filed to retire DataTableSchema.onBatchSave once nothing calls it. On origin/main 98bda0a the slot still has callers: data-table.tsx:3321 calls it from "Save All" whenever autosaves is false, and ObjectGrid.tsx:4121 wires onBatchSave ?? defaultBatchSave. The staged model is reached by (a) a React host passing cellSelection={false} on an editable ObjectGrid (documented at ObjectGrid.tsx:547, objectql.ts:1391), or (b) a bare data-table node handed editable with no GridCellSelection mounted. The seat 3 reading 7118602927 and the zone inbox measured this; retiring the slot as filed also retires the staged opt-out, which is a narrowing of a published host prop wider than the card.

    Governing text

    Protocol

    @object-ui/types published surface: DataTableSchema.onBatchSave (runtime slot, zod refuses it by name) and ObjectGridComponentProps.cellSelection's false arm (host prop). Removing both is Clause-②: no (narrowing), Metadata-protocol: narrowed, ADR-0087 entry with FROM onBatchSave / cellSelection={false} TO onRowSave per cell. No @objectstack/spec change (singleClickEdit is already retired).

    Premises (each with a re-check)

    1. onBatchSave is still called from Save All when autosaves is false — sed -n 1679,1683p ui/packages/components/src/renderers/complex/data-table.tsx; sed -n 3321,3323p ui/packages/components/src/renderers/complex/data-table.tsx
    2. ObjectGrid still wires onBatchSave ?? defaultBatchSave and documents cellSelection={false} as the staged door — grep -n "defaultBatchSave\|cellSelection={false}" ui/packages/plugin-grid/src/ObjectGrid.tsx
    3. The one in-tree cellSelection={false} host (ResourceListPage.tsx:1501, metadata admin list, Studio 重构(1-1b):元数据列表换成 ObjectGrid,所有类型同一种表格;「新建」在只读底包上落到配对的 .custom 包 #36897) is read-only (editable: false), so it never reaches the staged save — grep -n "editable" ui/packages/app-shell/src/views/metadata-admin/metadataListGrid.ts; grep -rn "cellSelection={false}" ui/packages ui/apps --include=*.tsx | grep -v test
    4. No in-tree host passes its own onBatchSave; dashboard data-table nodes have no save path (PR feat(spec,ui)!: every grid that renders editable selects a cell first, and object-grid singleClickEdit is retired #36357 body) — grep -rn "onBatchSave" ui/packages --include=*.tsx | grep -v "test\|types/src\|data-table.tsx\|ObjectGrid.tsx"
    5. 23 plugin-grid test files pin (PR feat(spec,ui)!: every grid that renders editable selects a cell first, and object-grid singleClickEdit is retired #36357 said 25) the staged path through cellSelection={false} (PR feat(spec,ui)!: every grid that renders editable selects a cell first, and object-grid singleClickEdit is retired #36357 body) — grep -rln "cellSelection={false}" ui/packages/plugin-grid/src | wc -l
    6. Downstream repos (hotcrm, gallery) were censused for singleClickEdit only, not for cellSelection={false} or onBatchSave (PR feat(spec,ui)!: every grid that renders editable selects a cell first, and object-grid singleClickEdit is retired #36357 body) — not re-measurable here.

    The question in one sentence

    The platform has one way to save an inline edit, but still ships a second, unused way that only outside code can switch on, and the card to remove its save hook cannot be built without removing that switch too.

    Options × real cost × workload

    What What the person sees Workload
    A Retire the staged model with its slot: cellSelection loses its false arm (a host may still pass true; absent = editable ⇒ select-first, read-only ⇒ click-to-open); data-table always saves per cell when editable (an editable data-table with no onRowSave is refused loudly at the node, or the grid's own dataSource.update is the write where ObjectGrid is the host, as today); the pending-changes bar, "Save All" and onBatchSave are deleted from data-table, ObjectGrid, @object-ui/types and the zod mirror; the staged-path pins are migrated or deleted; ADR-0087 FROM/TO in the changeset. No change for any in-repo screen (none uses the staged model). An outside React host that passes cellSelection={false} or onBatchSave gets a type error at upgrade and the FROM/TO line. domain:ui 1 PR, size M–L (data-table staged branch removal is the bulk). Precedent: PR #36357 (+1221/−201, 60 files) retired singleClickEdit and moved the default; this removes more code and adds none.
    B Keep the staged model as a documented host opt-out and close #35827 (not planned): onBatchSave stays because it has a caller. Nothing changes. Two saving models remain in the table primitive; the second is untested in any in-repo screen except by unit pins. 0 PRs. The card's premise is false as filed, so it closes with the reason.
    C Retire onBatchSave only, keep cellSelection={false}. A host that keeps the staged model has a Save All bar that can send nothing. domain:ui 1 PR, size S. Rejected: it creates exactly the dead promise the card was filed to remove.

    Business translation: A = the table has one way to save, the one every screen uses; B = the platform keeps a spare editing mode for a customer it has not met; C = a Save button that does nothing.

    Four axes (business stance)

    os-decision-facets
    ① Long-term fit: one editing contract for the table; the staged branch is a second contract only code can reach and every later change must special-case.
    ② Business pull: zero in-repo users of the staged model (the one cellSelection={false} host is read-only); maintainer ruled one model on #36270; no named outside user.
    ③ AI-error-proofing: today onBatchSave on a select-first grid is a silent no-op; A makes the types refuse it; C would make Save All itself a no-op.
    ④ Startup focus: remove > declare-and-maintain; no staged window without a named external user.
    Prior rulings read: onBatchSave · cellSelection · staged · Save All → 0 hits in coordinator/rulings.md and decisions/待决汇总.md; maintainer records 7035276698 (#35683 scope) and 7076617499 (#36270, one editing model, per PR #36357) read; ADR-0087 retirement contract; thread: none.

    Recommendation: A

    Self-check: 只看①选 A;②③④ 是否翻转:否。

    Confidence gaps: (a) hotcrm and gallery were not censused for cellSelection={false} / onBatchSave here (no access in this container); the dev censuses on claim and reports a fork if a named host exists. (b) The bare data-table primitive handed editable outside ObjectGrid: the PR body says no in-repo host reaches it; the dev confirms and decides between loud refusal and the grid's own write for that arm, both inside A. (c) Whether the parent-form child list (#35590 group-placed children) ever needs a saved-together batch: PR #36357 measured no such host; if one appears later it is a new card, not a reason to keep this door.

    Not taken: B keeps a second saving model for a customer not on record; C is the dead promise the card exists to remove.

    Execution after the ruling (A)

    1. The card is re-premised on claim: the title and Done-when become "retire the staged editing model (cellSelection={false} arm, pending-changes bar, Save All) together with onBatchSave"; Clause-②: no (narrowing), Metadata-protocol: narrowed, ADR-0087 entry. Zone o5-U claims (domain:ui, size M–L).
    2. Dev order: census downstream (cellSelection={false}, onBatchSave) first; then data-table loses the staged branch (autosaves becomes selectFirst-only or is removed), ObjectGrid loses defaultBatchSave and the false arm (cellSelection?: true or the prop becomes never for false with a tombstone), @object-ui/types removes the slot and rewrites the jsdoc at data-display.ts ~1544/1926, zod mirror and parity pins move; the staged pins migrate to select-first or are deleted with the behaviour they pinned; keyboardNavigation's describe loses its staged sentence.
    3. The changeset FROM/TO: FROM cellSelection={false} + onBatchSave TO select-first with onRowSave (one call per record) or the grid's own dataSource.update.
  14. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CaacEFVpyQ6C5mcRQs

    Ruled: 2026-11-26T00:04Z · option A — retire the staged editing model together with onBatchSave.

    • Authority: Bill (os-bill), decision card in the project app at 2026-11-26T00:01Z, option verbatim 「A 旧模式和接口一起退」; analysis and options in comment 7178089750 (decision thread, fable).
    • Governing text: AGENTS.md Prime Directive 10 corollary (declared ≠ enforced: trim what the runtime does not deliver); ADR-0087 retirement contract (FROM/TO in the changeset); maintainer record 7076617499 on Inline edit: move the other grids (related lists, dashboard tables, record picker, authored object-grid, ObjectView's grid) to select-first and per-cell save, retiring the pending-changes bar and Save All #36270 (one editing model).
    • Ruled terms (execute as comment 7178089750 §"Execution after the ruling (A)"): (1) the card is re-premised on claim: retire the staged model (cellSelection={false} arm of ObjectGrid, the pending-changes bar, "Save All") together with DataTableSchema.onBatchSave and ObjectGridComponentProps.onBatchSave; a host may still pass cellSelection={true}; absent ⇒ editable grids select-first, read-only grids click-to-open, as today. (2) data-table saves per cell whenever it is editable; the bare-primitive arm (editable, no onRowSave, no ObjectGrid host) is either refused loudly or written through the grid's own data source where ObjectGrid hosts it: the dev picks inside A and pins it. (3) Staged-path pins migrate to select-first or are deleted with the behaviour they pinned; keyboardNavigation's describe loses its staged sentence. (4) Clause-②: no (narrowing), Metadata-protocol: narrowed, ADR-0087 entry: FROM cellSelection={false} + onBatchSave TO select-first with onRowSave per record or the grid's own dataSource.update; dogfood battery on the final head (narrowing arm).
    • Premise clause: before writing, the dev censuses hotcrm and gallery for cellSelection={false} and onBatchSave; a named outside host is reported as a fork, not worked around.
    • State: needs-user-decision → pm:queue in this write; zone o5-U (seat repo:objectstack#5) claims.
  15. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uxdomain:uipm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions