Skip to content

feat(list): select a cell with a click, edit with a double-click, Enter or typing; no inline-edit toggle (#35684, #35687) - #35747

Merged
objectstack-fleet[bot] merged 19 commits into
mainfrom
claude/issue-35684-inline-edit-select-keys
Nov 20, 2026
Merged

objectstack-fleet[bot] merged 19 commits into
mainfrom
claude/issue-35684-inline-edit-select-keys

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #35684
Part of #35687

Clause-②: yes (widening)
Metadata-protocol: semantic
Skills-docs: none — skills/objectstack-ui/rules/list-views.md already teaches that inline editing is on by default for a user who may update the object, with userActions: { editInline: false } as the opt-out, which the list page now does with no toggle; no skill teaches the toggle or a single-click edit.

维护者速读

  • 所有用列表组件(ListView)画出的表格都不再有"行内编辑"开关:对象列表页、界面列表页、对象数据页、Studio 数据区,以及页面里的列表块。单击只选中单元格(出现选中框),双击、回车或直接打字进入编辑,按空格或点名称打开记录;不能编辑的格子会说明原因,触屏轻点仍打开记录。
  • 这是"列表行内编辑重做"系列的第一步,替列表用户解决单击就打开记录、编辑前要先开模式、中文输入法按回车被提前保存这三个问题。
  • 碰到问题的是在列表里改数据的用户:最坏是某个格子进不了编辑或输入被误提交;修改仍先停在"全部保存"前、可"全部取消",整个改动可以直接撤回。
  • 页面里的列表块原来"点一行就打开详情或编辑面板"(例如示例 Task Desk、CRM 工作台),现在点其它格只选中,要点标题或按空格才打开。范围请在席位转来的决策卡上定:按现在的范围上、收回到只改对象列表页,或推广到相关列表、仪表盘表格等其余表格。合入前等你的答复。
  • 拼音输入回车只在 Chrome 实测,Safari 没测,所以 行内编辑键盘与输入法:回车保存下移、Tab 保存右移、打字即编辑、Esc 取消;拼音选词不误提交 #35687 合入后保持打开,只剩 Safari 这一项。

What changes

data-table gains a select-first cell model (@object-ui/components), switched on by a new React context, GridCellSelectionProvider. A host mounts it; nothing authorable turns it on. With it:

  • A click selects a cell (an outline ring, no layout shift) and neither edits nor opens the record. A link or button the cell draws keeps its own click (the name, a lookup, a phone, an email). A touch tap opens the record and never edits in place.
  • Double-click, Enter or F2 edits with the value kept and the caret at its end. Typing replaces the value (a picker or a date opens instead). Backspace or Delete opens an empty editor and writes nothing.
  • While editing: Enter commits and moves down; Tab and Shift+Tab commit and move right and left; Escape cancels and keeps the cell selected. In a multi-line editor Enter is a new line and Ctrl/Cmd+Enter commits. "Commit" is the grid's existing staged edit, saved by the row's Save and Save All as before. The save pipeline, the save bar, the row buttons and defaultRowSave are untouched (that is 行内编辑保存:逐格自动保存,失败保留并整行一起发,可撤销,只更新当前行;去掉保存栏和行尾按钮 #35685), except that on every ListView grid the trailing row-button column is drawn only while a row has changes (see Acceptance notes).
  • On the selected cell: arrows and Tab move the selection; Space opens the record (a two-state cell flips and commits instead, as a second click on it does); Ctrl/Cmd+C copies (CapsLock on or off); Ctrl/Cmd+V converts the text to the field's type and commits it; Escape clears the selection.
  • An input method's composition stays whole. The selected cell's focus is an invisible input, so a composition lands in it. Keys pressed while composing (isComposing) never commit, cancel or move, and neither does the keyCode-229 Enter. The composed text opens the editor. This guard applies to every data-table editor.
  • A cell that opens no editor says why, in a small notice on the cell.

ObjectGrid gets a runtime host prop, cellSelection (@object-ui/plugin-grid). When the host passes it, the grid mounts the provider and answers, per cell:

  • Why the cell is read-only, in this order: the field (read-only, calculated, not editable in a list); the reader's field grant; the reader's object grant; the object's editability; the view's opt-out; the record's approval lock; the record-level verdict.
  • What typing does there, whether the cell is a toggle, and how pasted text reads in a choice field.

@object-ui/core exports resolveAffordanceGrant, the grant half of resolveAffordance (which now calls it, with the same result). The cell's read-only reason reads the reader's object grant through it, so the reason order holds and every grant read goes through the affordance map (objectui#12082).

The approval lock is read per record from GET /api/v1/approvals/records/:object/:id/lock. The read is sent when a cell of that row is selected, never once per row on screen. The answer goes through resolveApprovalLock, the record page's rule, reused as is, with the row's approval_status standing in until it answers where the view fetches that column (see Acceptance notes, "Approval lock window"). A 501 is latched, and a failed read fails open: the server still refuses a locked write. The explain-engine verdicts also wait for the first selected cell, so the list keeps its lazy posture (objectui#34208).

The list page (ListView, @object-ui/plugin-list)

  • No inline-edit mode, and no toggle on the toolbar or in Options → More. Its grid is editable wherever the permission gate admits the reader and the view does not declare userActions.editInline: false.
  • A view's boolean inlineEdit still folds into that switch.
  • It passes cellSelection to every object-grid view it draws, on every host (below).
  • Every view of an editable list now carries the concurrency token updated_at, so switching between the grid and another view re-reads nothing (objectui#7394).
  • ListViewProps.onInlineEditChange is deprecated and never called.

Console (@object-ui/app-shell)

  • The session-mode plumbing is gone (keepInlineEditModeForTheSession and the onInlineEditChange relay).
  • The interface page writes the canonical userActions.editInline instead of the legacy inlineEdit its relay census refused.

Locale packs (@object-ui/i18n, all 11)

Docs and checklist

  • plugin-grid.mdx § Inline Editing gains "On an object's list page".
  • plugin-view.mdx drops the toggle.
  • ux-conventions.write-feedback is reworded, at revision 14.

Which grids select first. ListView passes cellSelection to each object-grid view it draws (ListView.tsx:8129-8134, the only producer), and ObjectGrid is the only place the provider is mounted. So every grid a ListView draws has the model: the console's object list pages, interface list pages, the object data page (/apps/:app/:object/data), the Studio Data pillar's records artboard (through plugin-view ObjectView's renderListView slot), and every list-view block, whether an SDUI page node or a ListView on a kind: 'react' page (the showcase Task Desk, CRM workbench and renewals pipeline among them). A grid no ListView draws mounts no provider and keeps its click-to-edit (singleClickEdit) and click-to-open: an authored object-grid node, plugin-view ObjectView's own grid (the object-view block, or a host that passes no renderListView), a related list, a dashboard table, the record picker and the designer's grids. packages/spec is untouched.

Known, intentional gap: the spec's singleClickEdit prose. It says "Enter cell edit on single click (default true when editable)" (packages/spec/src/ui/component.zod.ts). That stays true for every grid no ListView draws. On a ListView grid it is not true any more: a click there selects and never edits. The gap is left open on purpose until the rollout decision (list page only, or every grid) is ruled. The rollout card then brings the prose and the hosts together.

Read first (by risk)

  1. ui/packages/components/src/renderers/complex/data-table.tsx — selectCell, attemptEdit, handleSelectFirstKeyDown, the cell-type-catcher input and the cell's onMouseDown / onDoubleClick / onClick branches.
  2. ui/packages/plugin-grid/src/ObjectGrid.tsx — gridCellSelection (describeCell, onCellSelect), with objectGridCellFacts.ts and hooks/useRowApprovalLocks.ts.
  3. ui/packages/plugin-list/src/ListView.tsx — inlineEditOffered → the grid's editable, rowsCarryConcurrencyToken, and the cellSelection host prop.

Two-minute verification

cd ui && pnpm exec vitest run --maxWorkers=2 packages/components/src/__tests__/data-table-select-first-35684.test.tsx packages/components/src/__tests__/data-table-keys-35687.test.tsx packages/plugin-grid/src/__tests__/ObjectGrid.cellSelection-35684.test.tsx should pass 3 files and 38 tests.

Or click through by hand: open any object list in the console and click a plain cell. A ring appears and nothing opens. Double-click it and the editor opens with the caret after the value; Escape puts the value back.

Tests

New (48 tests):

  • components/src/__tests__/data-table-select-first-35684.test.tsx (17): click selects (with a no-provider control), double-click / Enter / F2, a double-click over selected text, a re-click keeping focus, Space and two-state cells, links, read-only reasons, touch, and the edit column drawn only while a row has changes (with a no-provider control).
  • components/src/__tests__/data-table-keys-35687.test.tsx (14): arrows / Tab / Escape on the selection, typing, 5 then Esc, Backspace / Delete, paste, copy, Enter / Tab / Shift+Tab commit-and-move, multi-line Ctrl/Cmd+Enter, IME composition (zhong → 中), keys while composing, and with CapsLock on: Ctrl+C (key C) still copies, and Ctrl+V (key V) types nothing into the cell while the paste still commits.
  • plugin-grid/src/__tests__/ObjectGrid.cellSelection-35684.test.tsx (7): the relay and its control, each reason in its words, the lock read on select, the approval_status fallback, an unlocked answer overriding the column.
  • plugin-grid/src/objectGridCellFacts-35684.test.ts (8): reason order, typing per type, pasted choices.
  • core/src/utils/__tests__/affordanceGrant-35684.test.ts (2): the grant half answers apart from the object's API operations, and reads open with no object or no principal.

Migrated (they pinned the toggle, the mode or a click that opened the record):

  • ListView.permissions.test.tsx: the security/explain 与写入路径对同一条记录给出相反答案:VAMA 持有者对无主 private 记录 explain 答 allowed:true,PATCH 回 403 #4647 toggle blocks, the editInline switch block and the objectui#5144 fold block (19 tests) are one 11-row it.each on the grid's editable, plus one test that no toggle is drawn on either toolbar (the compact case uses main's openDisplayWithoutMore). Retired: "the toggle reports to the host" (there is no toggle).
  • ListView.test.tsx: "inline-edit toggle drives grid editability" (2) became "the grid is editable with no mode and no toggle" (3).
  • ListView.displayPopover-12423.test.tsx: with Row numbers (gone in fix(list): one 16px left edge on the list page, a 40px selection column at any width, no row numbers #35706) and Edit inline both gone, this list's Options menu draws no More level, and the test asserts that no Edit inline or Row numbers switch is on any level.
  • ListView.personalization-28950 (the live Display report now uses the row height), ListView.restoreViewDefaults-28948 and ListView.toolbarIconButtons-12695 (they clear the row colour), and the harness displayMenuClose-12621 block (the Escape target is the Row height row; the control clears the row colour and picks a row height). fix(list): one 16px left edge on the list page, a 40px selection column at any width, no row numbers #35706 had moved all four onto the Edit inline switch this PR removes.
  • ListViewBlock.specInputs-13047.test.tsx: the compactToolbar test no longer uses the toggle. "inlineEdit: true renders editable" became the fold: absent → editable, true → editable, false → not.
  • ListView.harness.test.tsx, concurrency-token block (objectui#12292): a view that declares nothing now asks for updated_at; the negative case is userActions.editInline: false.
  • ObjectView.inlineEditSessionOnly-5144.test.tsx and ObjectView.fallbackTabSessionOnly-11643.test.tsx: the callback is asserted absent and the toggle calls are gone.
  • InterfaceListPage.editInlineFold-5144.test.tsx and InterfaceListPage.relayCensus-11572.test.ts: the page writes userActions.editInline, and the census entry for the legacy inlineEdit is deleted. InterfaceListPage.userActionsSpecDefaults.test.tsx: the spec-default toolbar the page composes now includes editInline: true, which is UserActionsConfigSchema's own default.
  • ObjectView.rowOpensNothing-33317.test.tsx and ObjectView.listOnlyRecordPage-33219.test.tsx: the CONTROL cases open the record through the name link or Space on a selected cell. The negative cases add a Space probe, because a click on a data cell now opens nothing in any mode. The ⌘-click control asserts that the record link keeps the browser's default.
  • Projection pins that measured a read-only default grid now declare userActions: { editInline: false } on their fixture. The editable grid's token is pinned once in the harness 12292 block. Files: allDeniedSelect-10275, calendarDateWindow-12081, deadlineSettledSelect-11815, dependsOnSelect-13214, groupingProjection-7179, harvestInputsFetchKey-10689, mapLocationSelect-10370, referenceViaSelect-13036, rowColorSelect-12376, timelineMetaFieldsRetired-10222, and the harness draftOnlyColumn-34807 / nameFieldSelect-13116 blocks. elementDataSource instead expects updated_at: it pins the page-component binding on its default path.

Acceptance notes

Verification

Browser, before (main 238661f) and after (head 79006b0), Chromium at 1600 wide in zh-CN, own showcase backend: 21/21 scenarios pass on 79006b0. The commits since then are the merges with main, the restored pack key, the CapsLock copy fix (pinned in jsdom, with an ablation), a zh-Hant regeneration, the edit column at rest and the grant reader (b6ae293, fb14114). The last two were checked by the #35554 e2e spec on its own bundle and by jsdom pins, not by the showcase journey. So after-* screenshots may show an empty trailing column at rest, which is now gone on the list page, and with #35706 merged after-01 shows an Options More level that is gone too. Screenshots before-01…05 and after-01…21 and journey.log are in the seat's evidence folder build-seat1/35684/.

Browser journey (summary)
  • Before: the inline-edit switch is in Options → More; a click on a data cell opens the record; with the mode on, a click edits and focus stays on the cell. A real composition (imeSetComposition('zhong'), then the IME's Enter with keyCode 229 and isComposing: true, then insertText('中')) commits "zhong" early: the editor closes and the save bar shows 1 change.
  • After: no toggle anywhere, including after a reload. A click selects; a double-click edits, caret at the end, Esc restores. Enter and F2 edit. The same composition leaves 中 in the editor, still editing. Typing replaces; Enter commits and moves down; Tab moves right. Space and the name link open the record. A calculated total says 「此值由计算得出,不能编辑。」. An approval-locked report (EXP-DEMO, lock read true) says 「此记录正在审批中,已锁定。」. A number takes 5, and Esc gives back 7. A boolean flips on its second click and again on Space. Paste commits 12. Backspace on a required amount opens an empty editor and sends no write. A lookup's link navigates, its blank area selects, and a double-click there opens the picker. A textarea takes Enter as a newline and Ctrl+Enter commits. editInline: false says 「此视图已关闭列表内编辑。」. A contributor on a project budget gets 「您没有编辑此字段的权限。」. A touch tap opens the record.
Local test and gate readings (head fb14114; fe93cd9 and 28d1557 change changeset prose only)
  • 28d1557 rewrites three more changeset sentences in place (L2 nit N5: the model's lead-in, the edit column on every ListView grid, the approval_status stand-in): numstat 3 3, size still 2988; the same 21 derived gates exit 0; overlap-check against main 7878cf0: clean.

  • fe93cd9 rewrites one changeset sentence in place (the host list above): git diff --numstat is 1 1, the size stays 2988. Its derived gates (21 commands, including check-empty-changeset, check-changeset-no-major and check:published-files) all exit 0, --ran 0 NOT-MEASURED; overlap-check against main d9be915: clean.

  • Size: 2988 changed lines (+2292 / -696, 61 files) against merge base 03bce5c, under the 3000 human-merge line. check-governed-merges --pr 35747: NOT governed, 0 of 61 paths.

  • CI on bd5c58c had 3 red checks, all this PR's: Build & E2E UI (the 列表取消「操作」列:选中后在页面栏换操作、右键菜单;默认滚动加载、记录数在视图名旁 #35554 spec's last column) and Test UI (15/16) (the objectui#12082 census), plus the Test UI rollup. Both are fixed in b6ae293.

  • e2e on its own Vite bundle, Chromium: list-no-actions-column-35554 red on bd5c58c (2 failed at :378, both viewports), green on fb14114 (16 passed). The other list-* specs: 30 passed.

  • Unit, on fb14114: plugin-list, plugin-grid, components data-table* and renderers/complex/__tests__, all of core, and the census: 782 files (1 skipped), 9508 tests passed, VERDICT 0. The six targeted files (select-first, keys, cellSelection, cell facts, affordanceGrant, census): 103 tests, VERDICT 0.

  • Earlier, on bd5c58c: the i18n package tests and the app-shell subset (225 files, 2292 tests), VERDICT 0; this round touched neither.

  • type-check, VERDICT 0 each: core, components, plugin-grid, plugin-list (i18n and app-shell on bd5c58c).

  • i18n gates on bd5c58c, all exit 0: check:i18n-keys, check:i18n-drift, check:i18n-dead-keys, check:i18n, check:i18n-walk-parity, check:i18n-stale-fill, check:i18n-coverage (OK: 14 configs, 423 baselined untranslated strings, none new). This round changed no locale pack.

  • Derived gates: the full dispatch-gates --commands set (74 commands) was 76 of 76 exit 0 on ef7ba2b. Each round since reran the families its files moved: 42 on bd5c58c and 39 on fb14114, each with --ran reporting 0 NOT-MEASURED and every command exit 0. check-nul-bytes OK.

  • Ablations, each red then restored with git diff HEAD empty:

    • The IME guard (isImeKey → false): 2 of the 12 keys pins fail (before the CapsLock pins were added).
    • The double-click text-selection fix: 1 of 15 fails.
    • The CapsLock copy fix (back to e.key === 'c'): 1 of 14 fails.
    • The edit-column gate (drawRowActionsColumn = rowActions): 1 of 17 fails.
    • The grant read put back as perms.can(objectName, 'update'): the census fails and names ObjectGrid.tsx.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG

…t, projection pins read-only, changeset

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
…switch re-reads nothing

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
…ve to the link and Space

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
…ditInline

The page now writes the canonical userActions.editInline, on by default as
UserActionsConfigSchema declares it, so the composed block carries it.

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
Resolves the ListView conflicts with #35706 by keeping both sides: no row
numbers and no Row numbers switch (#35706), no inline-edit mode and no Edit
inline switch (this branch). With both switches gone, a list with no
record-open choice draws no More level, so the tests main moved onto the
Edit inline switch now use the row colour and the row height.

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
The key stays, at main's value, so the locale packs only gain keys; its
retirement goes with the dead toggle props in a later change.

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
The copy shortcut read only a lower-case 'c', so CapsLock (key 'C') copied
nothing. Both letter shortcuts are read case-insensitively; a pin per letter.

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
…ve Display report reads the row height

zh-Hant is generated from zh-Hans, and its new reason strings had been
written by hand, so the generator pin read the catalogue as stale. The
personalization pin moves from the row colour, whose reset the host owns in
that mount, to the row height.

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
…height as Comfortable

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 20, 2026
…reason reads the affordance map

Under the select-first model the trailing edit-only column, whose one
populated state is a changed row's Cancel and Save, is drawn only while a row
has pending changes, so the list at rest ends on its last data column. Hosts
without the cell selection draw it as before.

The read-only reason's object-grant half now reads resolveAffordanceGrant, a
new export beside resolveAffordance in the affordance map, instead of asking
the grant on its own.

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

Final head for review: fb14114856ced976d2174d3972490f399fa66842 · 2026-11-20T07:51Z


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

Contract-review-claim: session_01L6bhgTC8kn7AdeMpMmyhJG · head fb14114 · 2026-11-20T07:53Z

Reviewer brief (contract review) — PR #35747 @ fb14114856ced976d2174d3972490f399fa66842 (cards #35684, #35687)

You review at TIER_DEFAULT. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --face declaration — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· cards #35684 and #35687 (folded into this PR): their bodies and EVERY comment (rulings and earlier records included), and the parent epic #35683's rulings they cite
· PR #35747: its body, its file list, and the net diff against main at fb14114856ced976d2174d3972490f399fa66842
· the check-runs on fb14114856ced976d2174d3972490f399fa66842: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is SCRATCHPAD/pr-35747/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U

维护者速读

  • 用户能看到什么变化:对象列表页的表格去掉了"行内编辑"开关,只要用户有修改权限、视图没有关掉编辑,就始终可以改。单击只是选中一格,不会打开记录,也不会进入编辑。双击、回车、F2 或者直接打字才进入编辑。按空格或点名称打开记录。回车保存并下移,Tab 保存并右移,Esc 取消。用拼音输入法选词时按的回车不会再把没打完的拼音提前存进去。不能改的格子会在格上说明原因,比如只读、公式字段、没有权限、记录正在审批。触屏轻点仍是打开记录。相关列表、仪表盘表格等其他表格的行为不变。
  • 出错会怎样:最坏的情况是某个格子进不了编辑,或者一次输入被误提交。所有修改仍先停在"全部保存"之前,可以"全部取消",整个改动可以一次撤回。有两处已知缺口:一是记录还在读审批锁、尚未返回时就双击,可能打开编辑框,但保存会被服务器拒绝;二是 Safari 浏览器没有实测,只在模拟环境里验证过。
  • 要你做什么:现在不需要。合并后,席位会把"单击选中"是只用于列表页还是推广到所有表格这个问题交给你决定。

席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head fb14114856ced976d2174d3972490f399fa66842 · 2026-11-20T07:56Z

  • Shape — draft, base main, merge-base 03bce5c2, 17 commits, 61 files, +2292/−696 = 2988 changed lines, 12 under the 3000 human-merge line.
    • Fixes #35684, Fixes #35687 (a fold, one line per card).
    • Clause-②: yes (widening), Metadata-protocol: semantic. The changeset puts the four moving packages at minor, as semantic requires, and i18n/app-shell at patch. Skills-docs: none is argued from list-views.md, which already teaches editable-by-default with editInline: false as the opt-out.
    • check-governed-merges: NOT governed. packages/spec is untouched.
    • Merge cf0941e2 (main with fix(list): one 16px left edge on the list page, a 40px selection column at any width, no row numbers #35706) carries 17 hand-resolved hunks, in ListView.tsx and six of its tests. They sit inside this PR's diff against the merge-base, so I read them as part of it. Merge 55bcf9c2 has 0.
  • Read against 行内编辑:去掉开关,始终可改;单击选中、双击或回车编辑;只读格说明原因 #35684's 要做的 and 验收
    1. No mode, no toggle. inlineEdit state, updateInlineEdit and both toggle sites are removed: the toolbar button and ViewSettingsPopover's showInlineEdit, which is no longer passed. The grid's editable is inlineEditOffered alone, which is still the security/explain 与写入路径对同一条记录给出相反答案:VAMA 持有者对无主 private 记录 explain 答 allowed:true,PATCH 回 403 #4647 gate: resolved affordance AND can(obj, 'update'), editInline !== false, and the inlineEdit fold. The personalization part inlineEdit and its reset are gone too. onInlineEditChange is deprecated, and the console stops passing it.
    2. Click selects. In data-table.tsx, onClick under selectFirst stops propagation and calls selectCell. It neither edits nor reaches onRowClick. A link, button or checkbox the cell draws keeps its click (isCellWidgetTarget), and a touch press falls through to the row and opens it. A second click on a selected two-state cell flips it.
    3. Double-click, Enter or F2 edits (attemptEdit), with the caret at the end (caretToEnd). An injected editor gets its first control focused. That closes the "focus stays on the cell" defect 行内编辑键盘与输入法:回车保存下移、Tab 保存右移、打字即编辑、Esc 取消;拼音选词不误提交 #35687 measured.
    4. Open the record. Space on a selected non-toggle cell calls schema.onRowClick. The name link keeps its href, so ⌘-click still opens a new tab. The row-open control pins (rowOpensNothing-33317, listOnlyRecordPage-33219) move to the link and Space.
    5. Read-only reasons. cellReadOnlyKind checks, in this order: field kind (readonly, computed, notInline), then field grant, object grant (resolveAffordanceGrant, the extracted half of resolveAffordance), object editability, the view's opt-out, the approval lock, and the record verdict. The table falls back to table.cellReadOnly whenever its own isEditable test refuses. So a cell opens an editor only when both the host and the table admit it. There is no path where the host says editable and the table disagrees.
    6. Approval lock. useRowApprovalLocks reads GET /api/v1/approvals/records/:object/:id/lock once per touched row, on onCellSelect, and judges through resolveApprovalLock, the record page's rule, with approval_status standing in. A 501 is latched, and a failed read fails open, because the server's beforeUpdate refuses a locked write.
    7. Declared deviations.
    8. Touch. isTouchPress covers the click and the double-click. A tap never selects or edits.
  • Read against 行内编辑键盘与输入法:回车保存下移、Tab 保存右移、打字即编辑、Esc 取消;拼音选词不误提交 #35687
    • Selection keys: arrows and Tab move the selection. Typing opens the editor with the typed text (inlineTyping: text, number and contact types replace; pickers and dates open). Backspace and Delete open an empty editor and write nothing until a commit. Copy matches the letter case-insensitively (isCommandLetter, the CapsLock fix). Paste goes through fromText: choice fields by value or label, lookups never, numbers and booleans parsed, undefined writes nothing. Escape clears the selection.
    • Editing keys: Enter commits and moves down, and Tab and Shift+Tab commit and move right and left. Both the built-in editor and the injected wrapper do this, which supersedes the 64d937c53 Tab-stays rule outside providers only. In a textarea, Ctrl/Cmd+Enter commits. Escape cancels and refocuses the selection.
    • IME. isImeKey (isComposing, or keyCode 229 on either event) returns first in handleSelectFirstKeyDown, handleEditKeyDown and the injected wrapper. The catcher input receives the composition: onChange skips while composing, and onCompositionEnd hands the composed text to typeIntoCell. So "zhong" then Enter leaves 中 in an open editor. The browser journey measured that in Chromium. The guard is table-wide, which is a safe widening, because it only stops early commits.
  • Hosts outside the list page are unchanged. GridCellSelectionProvider defaults to null. Every new branch is behind selectFirst, except two: the IME guard, and drawRowActionsColumn, which is gated on selectFirst too. ObjectGrid mounts a non-null value only on cellSelection, which only ListView passes, and only for object-grid. updateOnMount turns off only under the provider (the objectui#34208 lazy posture).
  • Locale packs — table.cellReadOnly and nine grid.readOnlyReason.* keys are in all 11 packs. I spot-checked approvalLocked in every pack: each is a real translation, and zh-Hant is generated from zh-Hans. No key is removed. The two dead keys retire in List inline edit: drop the Options menu's dead toggle props and retire the toggle's two pack words #35749.
  • Not re-measured here. There is no node_modules, so I did not run the jsdom or e2e suites. I lean on CI at this head and the dev's readings: 9508 unit tests at fb141148, and five ablations each red, among them the IME guard, the CapsLock copy, the edit-column gate and the grant census.
  • Nits (nothing owed)
    • Safari. 行内编辑键盘与输入法:回车保存下移、Tab 保存右移、打字即编辑、Esc 取消;拼音选词不误提交 #35687's 验收 asks for Chrome AND Safari. Safari is NOT MEASURED: no WebKit build is installed here, and the post-composition 229 Enter is pinned in jsdom only. The card's close-out should say so, or a maintainer check on Safari should be asked for.
    • Paste and state machines. A paste into a state-machine select resolves any declared option. The in-cell picker offers only stateMachineNextValues. The server refuses an illegal transition, so this is cosmetic.
    • Provider value. gridCellSelection is a fresh object each render, so the provider value changes every render. That costs re-renders only.
    • Size. At 2988 lines, a push of 13 or more changed lines crosses the human-merge line.
  • Gates — at this head: 56 success, 12 skipped, 0 failure, mergeable clean. The l1-face flag on the second Fixes is the fold's, and is expected.
  • Landing terms — not governed, under 3000. A same-head ## Contract review PASS is owed for the declared widening and the semantic kind: TIER_DEFAULT, declaration face, claim and brief 7033748360, running. The card thread lands this head after that PASS, with every check green. The rollout question (list page only, or every grid) goes to the maintainer and does not block this landing. A new push needs a fresh L1 unless it is a clean main merge.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

Contract review

Served-tier: TIER_DEFAULT
Head-sha: fb14114856ced976d2174d3972490f399fa66842
Local-runs: none

① Derived judgments

Read: the net diff at the head against merge base 03bce5c2 (61 files, +2292 / −696); cards #35684 and #35687 with every comment; the epic #35683 rulings they cite; the head's 68 check-runs, every one success or skipped, none pending or red. packages/spec is untouched and no governed path is in the diff, so this is the declaration face.

Public surface, each change judged:

  • @object-ui/components exports GridCellSelectionProvider, useGridCellSelection and the types GridCellSelection and GridCellFacts (src/index.ts). dataTableCellSelection.ts stays internal. The additions are opted into by a host through a React context that is null by default, and no metadata key turns them on. Right.

  • data-table with no provider. The click, double-click, mouse-down, tabIndex, cursor and row-actions branches all key on selectFirst, so a host without the provider draws and behaves as it does on main, with two table-wide exceptions. (1) The IME guard (isImeKey: isComposing, or keyCode 229) sits in handleEditKeyDown and in the injected-editor wrapper. (2) Ctrl/Cmd+C copies in either letter case (isCommandLetter). Both only stop a wrong commit or add a missed copy; nothing that was accepted before is refused now. There is a new default string, table.cellReadOnly. Right.

  • @object-ui/core exports resolveAffordanceGrant. resolveAffordance now calls it, and the expression is the same: !(objectName && perms && !perms.can(objectName, AFFORDANCE_GRANTS[affordance].grant)), where main had row.grant inline. Every existing verdict is unchanged. Right.

  • @object-ui/plugin-grid.

    Right.

  • @object-ui/plugin-list ListView: what a view's metadata now gets with no declaration.

    • The grid gets editable: inlineEditOffered, which is the permission gate AND userActions.editInline !== false.
    • Its object-grid uses the select-first model.
    • There is no toggle on either toolbar or in the Display menu.

    This makes the spec's existing default (editInline is true by default, spec: ListView.userActions.editInline defaults to true in v18 and editInline: false is the opt-out; objectui reads an absent key as on (maintainer ruling 2026-10-10, after objectui#5144) #22605) take effect without a mode, as epic point 1 rules. inlineEdit still folds into it: true reads on, false reads off, and an explicit editInline wins. The 11-row it.each in ListView.permissions.test.tsx pins this. rowsCarryConcurrencyToken = inlineEditOffered adds the platform column updated_at to every view of an editable list, and the projection pins were migrated. Right.

  • Retirements, none of them a narrowing.

    • ListViewProps.onInlineEditChange stays in the type, marked @deprecated, and is never called.
    • ListPersonalizationPart keeps 'inlineEdit'.
    • ViewSettingsPopover's props are not edited; ListView just stops passing them.
    • keepInlineEditModeForTheSession was internal to @object-ui/app-shell. That package is private: true, and its index never exported the function.
    • InterfaceListPage writes the canonical userActions.editInline, with the same effect as before.

    Right.

  • Locale packs. All 11 packs gain the same 10 keys (table.cellReadOnly and nine grid.readOnlyReason.*), translated, at +13 / −0 lines each. No key is removed: list.inlineEditLabel and list.inlineEditShort are byte-equal to main. Right.

  • singleClickEdit. ListView forwards no singleClickEdit, so no authored key stops working on the list page. The spec prose stays true for every authored object-grid node, and the PR declares the gap. Right.

  • Narrowing. Nothing published is narrowed or removed, so Clause-②: yes (widening) holds.

Findings:

  • should-fix (S2): more hosts change than the "list page" that the changeset and the maintainer read name.

    • Where it lands. cellSelection: true is passed on every ListView whose view is object-grid. So the select-first model, under which a click on a data cell no longer reaches onRowClick, also lands on these hosts:
      • interface list pages;
      • list-view page blocks, both SDUI nodes and the ListView of a kind:'react' page;
      • ObjectDataPage;
      • Studio's Data pillar artboard (StudioDesignSurface.tsx). It declares inlineEdit: true, so its click-to-edit becomes click-to-select.
    • What the PR says instead. The changeset ships as the CHANGELOG, and it says "A grid outside the list page, which mounts no provider, keeps its click-to-edit (singleClickEdit) and click-to-open behaviour unchanged". Open question 1 and the maintainer-read item list only the hosts that stay.
    • Example. The showcase examples/app-showcase/src/ui/pages/task-desk.page.ts uses ListView with navigation: { mode: 'none' } and an onRowClick that opens the edit drawer, and its prose says "Click a task to edit it in a drawer". The drawer now opens only from the title link or Space. Checklist records-forms.form-view-gallery steps[4] ("click a task row — ObjectForm formType=drawer opens") reads that page.
    • Fix. Name these embeddings in the changeset and in the maintainer read, since they are part of option A as built. Re-point that checklist step, or the page prose, to the title link.

    Metadata-protocol: semantic is still the right declaration; the host inventory is what is wrong.

  • nit (N1). ListView no longer destructures onInlineEditChange. A host that still passes the deprecated prop therefore forwards it through {...props} into the active view component (ListView.harness.test.tsx:2302 still passes it). ObjectGrid ignores the prop. Destructuring it and dropping it would keep the containment that the file documents for host props.

② Semver level

The changeset .changeset/35684-35687-list-cells-select-first.md grades @object-ui/components, @object-ui/core, @object-ui/plugin-grid and @object-ui/plugin-list as minor, and @object-ui/i18n and @object-ui/app-shell as patch.

  • Metadata-protocol: semantic is true. Two meanings change. An omitted inlineEdit / editInline on a list view now means a grid that is editable at rest, where it used to be read-only until toggled. A click on a data cell of a ListView grid no longer opens the record. No key is added (cellSelection is a runtime prop) and none is refused, so the kind is neither added nor narrowed.
  • Level axis (ruling A, scripts/check-changeset-no-major.mjs).
    • A declared kind needs at least one moved package at minor or above. @object-ui/plugin-list, where the meaning changes, is minor.
    • The new locale keys are a widening that is not a protocol change, so patch is right for @object-ui/i18n.
    • @object-ui/app-shell is private and takes patch.
    • The other minors are permitted next to a declared kind. All six packages sit in the one fixed group, so the release level is the same either way.
  • The declaration lines. Clause-②: yes (widening) and Metadata-protocol: semantic start their lines and read the same in the PR body and in the changeset. Both are true of the diff, since ① found no narrowing. No BREAKING banner or ADR-0087 marker is owed. Both Check Changeset runs concluded success.

No finding.

③ Boundary flags

Inputs: the dev's reports on #35684 (7030939998, 7032241059 and 7033363366), read as the dev's flags only, never as evidence.

open_questions (round 1; rounds 2 and 3 have none):

out_of_scope_findings:

deviations: all are process-only.

  • The app-shell subset and the suites declared to CI are covered by the head's check-runs: Test UI 1/16 through 16/16, Type Check UI, Build & E2E UI and Live E2E UI all concluded success.
  • fb14114 changes comments only (3 files), and Check PR Size is success at 2988 lines.
  • The commit trailers are not a contract question.
  • The Safari leg is covered in S4.

Findings:

SQL push-down (AGENTS.md, Prime Directive 5):

  • The per-row approval-lock read (useRowApprovalLocks).

    • What it sends. One GET /api/v1/approvals/records/:object/:recordId/lock for each row the reader selects. The answer is cached per row and dropped when that object's data is invalidated, and no read is sent for each row on screen.
    • No batched or server-side read is available. That per-record route is the only read of a lock (packages/rest/src/approvals-routes.ts:444), and it has no recordIds form. The batched explain read that the list already uses does not see approvals.
    • The reason is given, in the hook's doc and in the PR body.

    Record verdicts stay one batched explain per page (requestVerdicts). There is no id materialisation or in-app join anywhere else in the diff. No Prime Directive 5 finding.

  • nit (N2). Arrow-key navigation turns the lazy probe into one GET for every row it passes. A batched lock read on the approvals route (like explain's recordIds) is the push-down shape, and it would also close S3's window for a whole page. That is a follow-up, not this PR.

Implemented-by: claude/issue-35684-inline-edit-select-keys
Reviewed-by: session_01L6bhgTC8kn7AdeMpMmyhJG

VERDICT: PASS


Generated by Claude Code

…hes, and the grids that keep click-to-edit

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

2026-11-20T08:24Z · Seat ruling on the contract review of this PR (record 7034067196, head fb14114856ced976d2174d3972490f399fa66842): how each should-fix and nit is closed. The seat ruled; this thread records it here so the delta record can cite it.

Landing waits for the maintainer's answer on the scope question (list page as built, list page only, or every grid). The PR is not queued before that.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

Final head for review: fe93cd99617fc91ebdad14be8a825accbb30c899 · 2026-11-20T08:49Z

Contract-review-claim: session_01L6bhgTC8kn7AdeMpMmyhJG · head fe93cd9 · 2026-11-20T08:49Z

  • The delta from fb14114856ced976d2174d3972490f399fa66842 (L1-a ACCEPT 7033803806, L2 PASS 7034067196) is one commit, rework round 3: one sentence of .changeset/35684-35687-list-cells-select-first.md rewritten in place to name every host the select-first model reaches (L2 S2). git diff --numstat is 1 1; size stays 2988 changed lines.
  • CI at this head: 56 success, 12 expected skip, 0 failed, 0 pending; mergeable, state clean. l1-face --pr 35747: CLEAN, 13 items, none flagged.
  • The PR body was brought to this head under the seat's ruling 7034328768: the host list, the approval-lock window as it is, the master-detail react pages, and Part of #35687 (the card stays open for the Safari leg, 7034313280).
  • L1: thread L1-a reads the delta. L2: the same isolated reviewer reads the delta at TIER_DEFAULT (declaration face) on this head, under the brief 7033748360; the record follows. Landing waits for the maintainer's answer on the scope card; the PR is not queued before it.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U

维护者速读

  • 用户能看到什么变化:和上一版相同,代码没有改动。这次只把更新说明里的一句话改准了。"单击选中"实际覆盖所有用列表组件画出来的表格,不只是对象列表页,具体包括:对象列表页、界面列表页、对象数据页、Studio 的数据画板,以及页面里嵌入的列表块。相关列表、仪表盘表格、记录选择器等其他表格不受影响。
  • 出错会怎样:不涉及代码,没有新增风险。
  • 要你做什么:要等你决定范围:新交互只用于列表组件画出的这些表格,还是推广到所有表格。在你回复之前,本单不进入合并队列。

席位核对 — delta ACCEPT (L1-a) · repo:objectstack#1 · head fe93cd99617fc91ebdad14be8a825accbb30c899 · 2026-11-20T08:51Z

  • Delta — one commit, fe93cd99, on fb141148 (my ACCEPT 7033803806). It touches one line of .changeset/35684-35687-list-cells-select-first.md (numstat 1/1, still 2988 lines). No main merge. It answers L2 S2.
  • The rewritten sentence, checked against the code at this head.
    • The sentence names who gets the model. "Every grid a ListView draws has this model, because ListView passes cellSelection to each object-grid view". cellSelection: true is set in exactly one place outside tests, ListView.tsx:8133, and only when viewComponentSchema.type === 'object-grid'. ObjectGrid mounts a non-null provider only on that prop.
    • The named hosts match the sites that draw a ListView:
      • InterfaceListPage.tsx;
      • ObjectDataPage.tsx, the data page;
      • objectViewListRenderer.tsx and ObjectView.tsx, the console list page through renderListView;
      • StudioDesignSurface.tsx, the Studio Data artboard;
      • ListViewBlock.tsx, the list-view block;
      • a kind: 'react' page, as in the console's sdui-workbench-preview.tsx.
    • The grids that keep click-to-edit draw no ListView: an authored object-grid node, ObjectView's own grid when no renderListView is passed, related lists, dashboard tables, the record picker and the designer's grids. So "mounts no provider" holds for each.
    • The sentence replaces the old "outside the list page", which was narrower than the code. The PR body's r4 host list says the same thing.
  • Gates — at this head: 56 success, 12 skipped, 0 failure, mergeable clean.
  • Landing terms — unchanged, plus one added hold:
    • A same-head ## Contract review delta PASS is owed. The original L2 reviewer is running it (claim 7034828737).
    • Per the seat's ruling (7034328768), the card thread does not enqueue until Sales answers the rollout-scope card.
    • Then it lands this head with every check green.
    • A new push needs a fresh L1 unless it is a clean main merge.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

Contract review

Served-tier: TIER_DEFAULT
Head-sha: fe93cd99617fc91ebdad14be8a825accbb30c899
Local-runs: none

This is the delta record on my record 7034067196 (head fb14114856ced976d2174d3972490f399fa66842), under the same brief (7033748360).

Inputs:

① Derived judgments

The delta. It is one fast-forward commit (merge-base --is-ancestor holds). It rewrites one line of .changeset/35684-35687-list-cells-select-first.md in place, and no code changes. The net diff against merge base 03bce5c2 is still 61 files, +2292 / −696. Every ① judgment from 7034067196 therefore stands unchanged on this head.

The new changeset sentence, checked against the code. It is right.

  • One producer and one mount. cellSelection is produced in exactly one place: ListView.tsx:8133, for each object-grid view. ObjectGrid.tsx:714 reads it as a React prop, and ObjectGrid.tsx:4300 is the only mount of GridCellSelectionProvider. The record drawer (NavigationOverlay) sits outside that provider. A nested ObjectGrid resets the context to null. No field widget or plugin-grid cell renders a data-table of its own, so the model reaches nothing beyond the grids a ListView draws.

  • Every host named as changed draws a ListView:

    • the console's object list pages (objectViewListRenderer.tsx, through plugin-view ObjectView's renderListView);
    • interface list pages (InterfaceListPage.tsx);
    • the object data page (ObjectDataPage.tsx, route :objectName/data in AppContent.tsx:178);
    • the Studio Data pillar's artboard (renderStudioGridList at StudioDesignSurface.tsx:5466, wired as renderListView at :7920);
    • every list-view block. A ListView in a kind:'react' page resolves to that block: buildComponentScope in react-page.tsx maps the registry type list-view to a PascalCase wrapper, which renders through ListViewBlock.
  • Every grid named as unchanged draws no ListView:

    • authored object-grid nodes;
    • plugin-view ObjectView's own ObjectGrid (ObjectView.tsx:3275), which the object-view block draws with no renderListView;
    • related lists (RelatedList.tsx builds object-grid and data-table nodes);
    • dashboard tables;
    • the record picker, whose built-in table is made of Table primitives, not data-table;
    • plugin-designer's FieldDesigner and ObjectManager, which render ObjectGrid directly.

    None of these packages renders a ListView.

The PR body's host claims, checked against the code. They are right.

  • The "Which grids select first" paragraph and the maintainer-read lines match the code read above.
  • The react pages that hand ListView an onRowClick exist: task-desk.page.ts:44, crm-workbench.page.ts:91, renewals-pipeline.page.ts:140 and :174, and sdui-workbench-preview.tsx:112.
  • The body says these pages now open from the title link, Space or a touch tap. That is consistent with the code read, though I did not measure it on those pages:
    • The title is LinkCell's RecordLink, which calls onActivate itself.
    • select-first leaves a cell widget's click alone.
    • Space reaches schema.onRowClick.
    • A touch press falls through to the row.

Findings (new, both nits):

② Semver level

The changeset's frontmatter is unchanged: @object-ui/components, @object-ui/core, @object-ui/plugin-grid and @object-ui/plugin-list are minor; @object-ui/i18n and @object-ui/app-shell are patch.

Clause-②: yes (widening) and Metadata-protocol: semantic still start their lines and still read the same in the changeset and the PR body.

The new sentence adds disclosure only: authored list-view page blocks now get the select-first model. That is a changed meaning, still semantic, with no key added or refused. @object-ui/plugin-list is still minor, which satisfies ruling A.

Both Check Changeset runs concluded success. The 7034067196 judgment stands. No finding.

③ Boundary flags

Check-runs on fe93cd9: 68 complete, 56 success, 12 skipped, none failed or pending. They include Test UI, Type Check UI, Build & E2E UI, Check Changeset, Check PR Size, the PR-body guards and the Governed Surface Queue Guard.

Dispositions of the 7034067196 findings under the seat's ruling 7034328768.

The dev's delta flags (7034433777).

SQL push-down. The delta changes no code, and the 7034067196 reading stands: no Prime Directive 5 finding.

No new must-fix or should-fix.

Implemented-by: claude/issue-35684-inline-edit-select-keys
Reviewed-by: session_01L6bhgTC8kn7AdeMpMmyhJG

VERDICT: PASS


Generated by Claude Code

… view; the approval_status stand-in needs the column fetched

Claude-Session: https://claude.ai/code/session_01L6bhgTC8kn7AdeMpMmyhJG
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

Regen-provenance: 7034984717 · fe93cd99617fc91ebdad14be8a825accbb30c899 → 28d1557b0f5bbd714f5df042c21413f30cb46a9d · git diff --no-renames --name-only fe93cd99617fc91ebdad14be8a825accbb30c899 28d1557b0f5bbd714f5df042c21413f30cb46a9d → .changeset/35684-35687-list-cells-select-first.md

2026-11-20T09:23Z · The head moved by changeset prose only (L2 delta nit N5, after the maintainer's scope ruling 7035276698 on #35683): three sentences rewritten in place, numstat 3 3, size still 2988. The changeset is a prose face outside the review surface, so the L2 delta record 7034984717 carries to this head. L1-a reads the delta.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U

维护者速读

  • 用户能看到什么变化:和上一版相同,代码没有改动。这次把更新说明里三句写得比实际窄的话改准了。第一句改成:所有由列表组件画出的表格都用新交互。第二句改成:所有列表组件画的表格,平时都不显示末尾的编辑列。第三句补充:审批状态那一列,只有视图本身取了这一列时才能临时兜底。
  • 出错会怎样:只改说明文字,没有新增风险。
  • 要你做什么:不需要。你 09:08Z 已经选了"按现在的范围上",这单可以在检查全绿后落地。

席位核对 — delta ACCEPT (L1-a) · repo:objectstack#1 · head 28d1557b0f5bbd714f5df042c21413f30cb46a9d · 2026-11-20T09:26Z

  • Delta — one commit, 28d1557b, on fe93cd99 (my delta ACCEPT 7034857792). It touches only .changeset/35684-35687-list-cells-select-first.md (numstat 3/3, still 2988 lines). No main merge. It answers L2 delta nit N5.
  • The three sentences, each checked against the code at this head
    1. The model's opening. It now reads "ListView passes it for every object-grid view it draws, on the hosts listed below". That is ListView.tsx:8133, the one cellSelection: true outside tests, gated on viewComponentSchema.type === 'object-grid'. It also agrees with the host sentence I checked at 7034857792.
    2. The approval stand-in. It now reads "until it answers, the row's approval_status stands in only where the view fetches that column…". useRowApprovalLocks.isLocked reads row?.approval_status as recordStatus, so the stand-in exists only when the row carries that key. A view that authors its columns projects only what a column, a row predicate or a grouping names. So the old unconditional wording overstated the cover, and the new wording is the code's. The approval-lock race my first ACCEPT noted (7033803806) is therefore wider on an authored-column view without approval_status, and the server's beforeUpdate still refuses the save. The sentence now says so honestly. No code is owed.
    3. The edit column. It now reads "On every ListView grid (the select-first model)". That is drawRowActionsColumn, which is gated on selectFirst, and selectFirst is the provider that only ListView's grids mount. Same scope as sentence 1.
  • Scope ruling — Sales chose 「按现在的范围上」 at 09:08Z (专题:列表行内编辑重做(始终可改、先选中再编辑、浮层编辑框、逐格保存;对照 Twenty 与 Attio) #35683 comment 7035276698): every grid a ListView draws, with related lists, dashboards and child grids assessed separately. The changeset now states exactly that scope.
  • Gates — CI on this head was still running when the asking thread wrote (09:25Z: 16 success, 12 skipped, 0 failure). This ACCEPT holds when that run finishes green.
  • Landing terms — the L2 record 7034984717 is carried to this head by Regen-provenance 7035679669. The seat confirms that carry and adopts the record, and the card thread lands this head with every check green. A new push needs a fresh L1 unless it is a clean main merge.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

L2 adoption and landing · 2026-11-20T09:42Z · The seat adopts area b1-I's isolated L2 delta record 7034984717 (served at TIER_DEFAULT, the declaration face for Clause-②: yes (widening)), PASS with no open must-fix or should-fix. Its head fe93cd99 carries to 28d1557b by Regen-provenance 7035679669: the only change is three changeset sentences (N5, numstat 3 3). The first L2 record 7034067196 raised S1 to S4; each was closed or deferred by the seat's ruling 7034328768, and the delta record accepts every disposition (S1/S3/N2/N3 to #35794, #35795, #35797; S4 by Part of #35687, which stays open for the Safari pinyin leg only).

Scope is the maintainer's ruling 7035276698 on #35683 (decision card, 2026-11-20 09:08:05Z, 「按现在的范围上」): select-first on every grid ListView draws; related lists, dashboard tables, master-detail subtables, the record picker and hand-written grids are evaluated separately.

L1-a ACCEPT 7033803806, deltas 7034857792 and 7035770629 (this head). check-governed-merges --pr 35747 reads NOT governed, 2988 changed lines (under 3000). landing-k reads K = 3. All check-runs on the head are success or skipped. The seat readies this PR and arms auto-merge in this same stroke. It Fixes #35684 and is Part of #35687.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 20, 2026 09:43
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 811858c Nov 20, 2026
69 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35684-inline-edit-select-keys branch November 20, 2026 10:05
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ears, a refused value stays, and Enter stays on the cell (objectstack-ai#36023 S4) (objectstack-ai#36054)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuYSfiVTtk3DgbcGUxvr9M3o)_

repo:objectstack#1 · os-sales · session_01L6bhgTBQ7DZYZt5GQadGKZ

Part of objectstack-ai#36023 (slice S4: pop-up panels under the cell and the keyboard
rules. The card stays open: the rich-text panel, the related-list tab
and the long-text / address placement are recorded on objectstack-ai#36023 by the
seat, which closes the card when they are delivered or moved)

Clause-②: yes (widening) — `GridCellFacts` (`@object-ui/components`,
`dist/context/gridCellSelection.d.ts`) gains three optional keys:
`editor`, `clearRefusal`, `validate`. Nothing is removed or narrowed; a
host that sets none of them keeps its editor placement and commits.
Metadata-protocol: none

## 维护者速读

-
**选择型格子的面板开在格子下方**:单选、多选、状态、标签、日期、日期时间、时间、颜色、关联、人员,按回车或双击后,列表/日历/色板出现在格子正下方,格子本身照常显示原值(彩色标签还是彩色的),整行高度不变(实测
33 → 33)。日期的可输入框移到面板顶部,日历就在它下面。长文本、地址、普通输入框仍在原格编辑。
- **退格 / Delete 直接清空并立即保存**。必填字段不清空,格子上提示「××为必填」;只读格照旧说明原因;复选框格不受影响。
-
**不合规的值不保存**:规则和记录表单一样(必填、长度、范围、邮箱和网址格式),数字框里读不出数字的文本也拒绝。编辑框保持打开,留着刚输入的内容,下方写明原因;改对再提交,或按
Esc 放弃。拒绝状态下点别处不生效。
- **回车保存后留在原格**(Sales 裁定 D2,7060745834)。这**反转了已合并的
objectstack-ai#35687「回车保存并下移」**,单独一个 commit;Tab / Shift+Tab 仍保存并右移 / 左移。
- **选中框不再画到冻结列上**,Esc 取消选中后不再留下浏览器默认的(macOS 上是橙色的)焦点框。
- **人员头像不再撑高行**:原来 32px 头像让行高变 41px,编辑时又掉回 33(行高跳动);现在头像 24px,行高始终 33。
- 表单、对话框、记录页的控件不变。手机宽度(375)列表画成卡片,没有格子,本切片不涉及。

## What changes

**Host facts** (`@object-ui/components`,
`context/gridCellSelection.tsx`). `GridCellFacts` gains:

- `editor?: 'cover' | 'below'` — `below` draws the cell's editor as a
panel under the cell, which keeps drawing its value; absent or `cover`
keeps the layer over the cell.
- `clearRefusal?: string | null` — why Backspace / Delete leave the cell
as it is.
- `validate?: (value) => string | null | undefined` — why a committed
value is refused.

The table cannot tell a select column from a text one
(`TableColumn.type` has eight literals), so the placement is a host
signal. `ObjectGrid.describeCell` (`objectGridCellFacts.ts`) answers all
three from the field definition: `inlineEditorPlacement(type)` (select,
status, radio, multiselect, checkboxes, tags, date, datetime, time,
color, lookup, master_detail, user, owner → `below`), `clearRefusalText`
(a required field; `required_message` or `validation.required`), and
`cellValueRefusal`, which reads the record form's own
`buildValidationRules` (required, min/max length, min/max, email / URL
pattern) and says each with the form's sentence.

**Panel under the cell** (`dataTableCellOverlay.tsx`, `data-table.tsx`).
`CellOverlay` takes `placement`; `below` offsets the layer 2px under the
cell instead of minus the cell's height, and the cell keeps its drawn
value while the panel is open. No preview size is seeded for a panel.

**Date panel** (`@object-ui/fields`, `DatePickerField.tsx`). The in-cell
face is one panel: the typeable box on top, the calendar always showing
beneath it (the panel root gives it the panel's surface and centres it
over the quick picks; the calendar's own `className` literal stays as
the phone-touch spec reads it), then the time row (datetime) and Today /
Tomorrow / Next week / Clear. The form face is unchanged.

**Backspace / Delete** on a selected cell write `null` through the same
`writeCell` path a paste uses (confirm, stage, save), except a two-state
cell (nothing written) and a cell with `clearRefusal` (its sentence
shows on the cell; nothing written). A read-only cell says why, as
before.

**A refused commit** — `saveEdit` now returns whether it committed.
Before staging, the select-first table asks `editRefusalOf`: first the
browser's own reading of the editor's inputs (`validity.badInput` /
`typeMismatch` → `table.cellNotNumber`, `validation.email`,
`validation.url`, `table.cellInvalid`), then the host's `validate`. A
refusal keeps the editor open with what was typed, puts the focus back
in it and draws the reason under it (`role="alert"`,
`data-testid="cell-edit-refusal"`). Enter / Tab do not move; a press
outside is swallowed (pointerdown and its click); Escape discards. The
refusal line hides as soon as the value is edited.

**Enter stays on the cell** (own commit `383cbb2a`). `commitMoves`
replaces `moveSelection`: Enter commits and refocuses the selected cell;
Tab / Shift+Tab commit and move right / left.

**Frame and focus ring.** The selected cell's frame is a child span
(`data-slot="cell-selection-frame"`, `absolute inset-0 border-2
border-primary`, `z-[1]`) instead of the cell's outline: an outline
painted over a frozen column the cell had scrolled under, a child paints
in the cell's layer, which the sticky `z-10` columns cover. Select-first
cells are `outline-none`, so the cell that keeps the focus after Esc
deselects shows no ring.

**User cell face** (`@object-ui/fields`, `UserCellRenderer`). The avatar
is `size-6 -my-0.5` (24px drawn, 20px laid out) in both the single and
the stacked branch, so it is no taller than the cell's line of text.

`@object-ui/i18n` adds `table.cellNotNumber` and `table.cellInvalid` in
all 11 packs (zh-Hant regenerated with `scripts/gen-zh-hant.mjs`).

## Reversal of objectstack-ai#35687 (merged), named per the ruling

Two objectstack-ai#35687 behaviours are reversed:

1. **Enter in an editor saves and moves down → saves and stays on the
cell** (Sales D2, 7060745834).
2. **Backspace / Delete open an empty editor without saving → clear and
save at once; a required field refuses** (objectstack-ai#36023 S4 scope item 3).

Tests migrated
(`ui/packages/components/src/__tests__/data-table-keys-35687.test.tsx`):

- "Enter commits and moves down …": now expects the selection to stay on
`0:0` with the focus on the cell, then Tab → `0:1`, Shift+Tab → `0:0`.
- The multi-line editor case: Ctrl/Cmd+Enter commits and stays (`0:2`).
- "Backspace opens an empty editor" removed; replaced by the clearing
cases below.

Sentences on objectstack-ai#35687 to reword (the seat edits the card text):

| Where on objectstack-ai#35687 | Now reads | Reword to |
|---|---|---|
| 要做的 › 编辑时 | 回车:保存并下移一格。 | 回车:保存并留在原格。 |
| 要做的 › 未编辑 | 退格、Delete:进入编辑并清空,不直接保存。 | 退格、Delete:清空并立即保存;必填字段不清空并提示。 |
| 验收 (Safari / Chrome pinyin) | …单元格里是「中」字并仍在编辑;再按回车才保存。 |
…单元格里是「中」字并仍在编辑;第二次回车保存并留在原格。 |
| 验收 | 编辑中按 Tab:保存并选中右边一格;按回车:保存并选中下面一格。 | 编辑中按
Tab:保存并选中右边一格;按回车:保存并留在原格。 |
| 验收 | 选中必填的金额格按退格:进入编辑且为空,没有发保存请求。 | 选中必填格按退格:值不变,格上提示必填,没有发保存请求。 |

## Tests

- `data-table-keys-35687.test.tsx`: new describe "clearing, the panel
under the cell, a refused commit (objectstack#36023)", 10 cases —
Backspace / Delete clear and save; a `clearRefusal` keeps the value and
says why; a two-state cell writes nothing; a read-only cell is not
cleared; `below` vs `cover`; a host refusal keeps editor and input and
Enter does not move, then Tab after correcting moves; Escape after a
refusal discards; `badInput` refused by the table; a press outside a
refused injected editor is swallowed (control: an accepted value
commits); the frame is a child under frozen columns and Esc leaves no
ring.
- `data-table-select-first-35684.test.tsx`: the ring assertion reads the
frame child instead of `outline-primary`.
- `objectGridCellFacts-35684.test.ts`: placement per type,
`clearRefusalText`, `cellValueRefusal` (required, length, range,
pattern, messages).
- `ObjectGrid.cellSelection-35684.test.tsx`: a select cell opens below
and keeps its value; a required cell refuses Backspace; a `maxLength`
refusal keeps the editor.
- New `userCell.rowHeight-36023.test.tsx`: single and stacked faces are
`size-6 -my-0.5`, never `size-8`.
- Local runs: `@object-ui/components` + `@object-ui/plugin-grid` full
(793 files) passed; `@object-ui/fields` + `@object-ui/i18n` full 6723
passed / 20 skipped; form-field channel census (3 files, 141) passed;
`turbo run type-check` for components, fields, plugin-grid, i18n: 57/57;
eslint on every changed file: 0 errors; `check:i18n`,
`check:i18n-coverage`, `check:i18n-walk-parity`,
`check:i18n-stale-fill`, `check:i18n-keys`, `check:i18n-dead-keys`:
pass.

## Verification (browser)

Showcase field zoo, a temporary 22-column probe view with the name
column frozen (not in this PR), Chromium, light and dark, 1280 and 768.
Shots: `/mnt/project-files/build-seat1/36023/S4/shots/`.

| Kind | Placement | Row before → while open | Panel top vs cell bottom
|
|---|---|---|---|
| date, datetime, time | below | 33 → 33 | 227 vs 225 |
| select, multi-select, tags | below | 33 → 33 | 227 vs 225 |
| colour | below | 33 → 33 | 227 vs 225 |
| lookup, user | below | 33 → 33 | 227 vs 225 |
| long text, address, email | cover (in place) | 33 → 33 | — |

The same at 768 (date, select, multi-select, user) and in dark (date,
select, tags, colour, long text). At 375 the list draws as cards, so
there is no cell to edit.

Keyboard journeys (1280): Enter on a text cell saves and stays (`1:2`,
focus on the cell), Tab moves to `1:3`; number "1e" is refused with
"Enter a number.", a click away keeps the editor, Esc restores 420;
Backspace on phone clears it to "—"; Backspace on the required name says
"Name is required"; Esc twice leaves no outline (`outline-style: none`,
was the browser's `auto` ring).

Frozen column: a selected cell scrolled under the frozen name column —
before, its outline was drawn over the name column; after, the frame is
clipped at the column's edge like the cell's text
(`frozen-1-2-scrolled.png`).

User face: a row holding "Dev Admin" — before 41px at rest and while
editing, face 32px; after 33px at rest, while editing and after Esc,
face 24px (`avatar-after-rest.png`).

## Acceptance notes

- **Required rating, handed over from S3 (done after objectstack-ai#36045 merged).**
`main` is merged in (S3 1c87956). The rating's Backspace / Delete and
the `0` key all go through `clearCell` (`setStars(0)` is a clear), so a
required rating keeps its stars and says it is required; a digit above
zero still sets the stars. Pinned in
`data-table-cell-overlay-35688.test.tsx` ("a required rating is never
cleared: 0, Backspace and Delete …"), next to S3's own rating cases,
which pass unchanged.
- **No second sentence for a number box.** S3's in-cell number, currency
and percent boxes draw their own bad-input line under the box and mark
it `aria-invalid`. For such a box the table refuses the commit without
adding its own line (`editRefusalOf` returns `''`), so the reader sees
one reason, not two. Pinned in `data-table-keys-35687.test.tsx`.
- **DELIBERATE CORRECTION of a pending release note** (`Check Changeset`
stays red on it by design; the seat confirms it by its own record).
Note: `.changeset/35684-35687-list-cells-select-first.md` (from objectstack-ai#35747,
not yet released). This PR changed the behaviour two of its sentences
describe, so they are rewritten in commit df048a4 rather than left
false in the same release:
- "Backspace or Delete opens an empty editor and saves nothing." →
"Backspace or Delete clears the cell and saves at once, and a required
field keeps its value and says it is required (objectstack#36023)."
- "While editing, Enter commits and moves down, Tab and Shift+Tab commit
and move right and left, …" → "While editing, Enter commits and stays on
the cell (objectstack#36023), Tab and Shift+Tab commit and move right
and left, …"
Nothing else in that note changes; restoring it from the base would
republish the two false sentences.
- The lookup and user record lists inside the panel are S3's (objectstack-ai#36045);
this slice only places them below.
- A refused value whose cell scrolls out of sight is discarded (the
scroll-away path closes the editor as before, and a refused value is not
saved).
- While a refused value is open, a press outside does nothing
(pointerdown and the click it starts are swallowed for one second at
most).
- Overlap: the release PR objectstack-ai#35129 rewrites the same pending changeset and
regenerates itself. S3 objectstack-ai#36045 has merged and `main` is merged in here
(conflicts in `data-table.tsx`, the Backspace / digit branch, and
`dataTableCellOverlay.tsx`, the layer classes, resolved by keeping both
sides). objectstack-ai#36033 still overlaps `data-table.tsx`; the second of the two to
land merges `main`.

## How to try it

Open any object list, select a select or date cell and press Enter (the
panel opens under the cell; the cell still shows its value). Press
Backspace on an optional cell (cleared and saved) and on a required one
(refused with a hint). Type a too-long value into a text field with a
max length and press Enter (the editor stays and says why).

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the 维护者速读 block and
the objectstack-ai#35687 sentences are in the maintainer's language).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgTBQ7DZYZt5GQadGKZ)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgTBQ7DZYZt5GQadGKZ
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgTBQ7DZYZt5GQadGKZ -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…k before it edits, and a page's locks are read in one request (objectstack-ai#35795) (objectstack-ai#36295)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu3ktGWQBYiYJq1ThpuDKTbF)_

repo:objectstack#1 · os-sales · session_01L6bhgXSK9qt8je9QbZvhKb

Fixes objectstack-ai#35795

Clause-②: yes (widening)
Metadata-protocol: none

## 维护者速读

- 列表里直接改格子时:如果这条记录「是否被审批锁住」或「我能不能改这条」还没查回来,双击、回车、F2
或直接打字都不会立刻弹出编辑框,格子上先显示「正在确认这条记录能否编辑…」;答案一回来,没锁就自动打开编辑框(打的那个字也保留),锁了就显示「此记录正在审批中,已锁定。」。不会再出现「能进编辑、保存才被拒」。
-
查询中点了别的格子,就放弃这次等待,不会突然在别处弹出编辑框。查询中点开关、粘贴、清空:同样先提示正在确认,答案回来没锁才写入,锁了就不写并说明原因。
- 一页数据只发一个锁查询:第一次点格子时把整页的锁一起问;之后用方向键走动不再发请求。新增服务端批量接口 `POST
/api/v1/approvals/records/:object/locks`(一次最多 200 条,读不到的记录和不存在的一样答
null),SDK 有对应方法。
- 风险:查询很慢时,用户第一次操作要等一下才出编辑框;没装审批服务的部署照旧(501 后不再问)。可直接撤回本 PR 回到原样。
- 需要你决定的:无。

## What changes

**Server (new route, contract, SDK).**
- `IApprovalService.getRecordLocks?(object, recordIds, context)`
(`packages/spec/src/contracts/approval-service.ts`, optional like
`getRecordLock`): entry `i` answers `recordIds[i]` exactly as
`getRecordLock` answers it (`{ locked }`, or `null` for an unreadable or
missing record, never told apart). New export
`APPROVAL_RECORD_LOCKS_MAX_RECORD_IDS = 200` (the explain batch's cap,
so a page splits the same way for both reads).
`api-surface/contracts.json` and `export-origins/contracts.json`
regenerated.
- `ApprovalService.getRecordLocks` (plugin-approvals): two engine reads
whatever the page size: the caller's `id $in` read of the ids (the same
anchor `getRecordLock` reads as the caller), then one pending-request
lookup judged by the record-lock hook's own judgement through the new
`recordsHeldByLockingApproval` (`lifecycle-hooks.ts`, the many-record
form of `recordHeldByLockingApproval` over the same
`lockingRequestsForRecords`).
- `POST /api/v1/approvals/records/:object/locks`
(`approvals-routes.ts`): body `{ "recordIds": [...] }` answers `{
success: true, data: { records: [{ recordId, locked }] } }` in order,
`locked: null` where the single read answers 404. Closed query set EMPTY
(`APPROVAL_RECORD_LOCKS_PARAMS`); the body is closed too
(`readRecordLocksBody`): any other key, a non-list, a non-string or
blank id, an empty list or more than the cap is refused whole with `400
VALIDATION_ERROR`, the service never asked. A service without
`getRecordLocks` answers 501, never one `getRecordLock` per id. Route
ledger row `sdk` → `client.approvals.getRecordLocks(object, recordIds)`.

**List grid.**
- `useRowApprovalLocks` asks the locks of the page in one request per
`APPROVAL_RECORD_LOCKS_MAX_RECORD_IDS` ids when a cell is first selected
(`ObjectGrid`'s `onCellSelect` passes the selected row plus the page's
ids); rows already asked are not asked again, rows a later page brings
are asked on the next select. It exposes `settling(recordId)`: the read
the row waits on while it is on the wire.
- `useRecordCrudVerdicts` exposes `settling()`: the explain questions on
the wire as one promise (read from a ref, so it sees a question sent
since the last render).
- `ObjectGrid.describeCell`: when the cell has no read-only reason yet
but the row's lock read, or its `update` verdict (when still unknown),
is on the wire, the facts carry `checking: { text, settled }`.
- `@object-ui/components` `GridCellFacts.checking` (optional, new):
`data-table`'s `attemptEdit` shows `text` on the cell, remembers the
edit (with its typed seed) and asks it again when `settled` settles,
unless another cell was selected, a newer edit was asked or an editor is
open by then. A toggle, paste or clear asked meanwhile shows `text` and
writes nothing (an intrinsic refusal such as "required" is still said
first).
- i18n: `grid.readOnlyReason.checking` in all 11 locales plus the
plugin's English fallback.

Docs: `content/docs/automation/approvals.mdx` ("Reading the locks of a
page of records"). Changeset
`.changeset/35795-batched-record-lock-read.md` (patch on the seven
packages the diff moves; `Metadata-protocol: none` ⇒ patch).

## Why

PR objectstack-ai#35747 read a row's lock with one `GET …/:recordId/lock` per selected
row, sent on a double-click's first press and needed on its second. A
slower answer let the editor open on a locked record and only the save
was refused; the record verdict had the same window, and arrow keys sent
one read per row (the L2 record 7034067196, S3 and N2). objectstack-ai#35684 rules out
「能进编辑、保存被拒」.

**Batch route over projection** (premise, accepted by the seat with the
claim 7072869185): the lock is the approvals plugin's own judgement;
projecting it into `GET /data/:object` would teach the data layer about
approvals or add a virtual-field protocol and charge every list read,
while a batch route is the same shape as the explain batch the list
already sends, asked only when the reader first acts on a cell.

## Small calls made in this thread (Sales 22:19:27Z: listed here)

- **Wait, then open** (the card's first arm) rather than "open nothing,
say checking": the premise proposed the latter; building it showed that
a real double-click on a fresh page (and every Playwright `dblclick`)
would then always need a second double-click. The waiting edit is
dropped by selecting another cell, so nothing opens elsewhere.
- The lock and verdict of a page are asked on the first cell select
(lazy, the objectstack-ai#34208 posture), not on first paint.
- The same cap as explain (200); a body with any other key is refused,
like an unknown query name.
- A row the caller cannot read (`locked: null`) and a failed read fall
back to the `approval_status` column (fail open, as before; the server
still refuses a locked write).
- No principal key on the lock answers (unchanged from objectstack-ai#35747): they are
dropped on any data change of the object and on unmount.

## Verification

Each new pin was run against the fix, then with the fix ablated.

- `ObjectGrid.cellSelection-35684.test.tsx`, new top-level `describe`
"an edit waits for the row's lock and verdict (objectstack#35795)", 7
cases with fake timers for the slow reads: a slow lock read on a locked
row says checking for 1999 ms and then locked, never an editor; on an
unlocked row the editor opens by itself when it answers; a key typed
while checking is the editor's value; a slow verdict holds it the same
way; selecting another cell drops the wait; a page sends one lock read
and the arrow keys send none (lock or explain); a 501 deployment is
asked once and edits. The existing lock case now reads the page in one
request. Ablating the `checking` branch of `attemptEdit`: 5 of the 7
red, restored.
- `rest-approvals-record-lock-route.test.ts`, new top-level `describe`
for the route: preservation (service asked once with the ids in order
and the caller; one entry per id; a full page at the cap), nine refusal
shapes (400 + nested `VALIDATION_ERROR` + service never called), the
empty closed query set, 501 when only `getRecordLock` exists (and it is
not called), a read refusal relayed at its own status.
- `record-lock-read.integration.test.ts` (real ObjectQL + better-sqlite3
+ `ApprovalsServicePlugin.start()`), new top-level `describe`: for each
of submitter, approver and a non-participant reader, the page answer
equals `getRecordLock` per id (repeated ids, unreadable, missing); two
engine reads for a page of three; an outsider is refused 403 as for one
record; a blank id answers null; deciding unlocks the page as the hook
does.
- `client.test.ts`: one POST, object segment encoded, body `{ recordIds
}`.
- Local runs on the merged tree: see the next section.

**Local runs** (merged tree, main `a5a5312f` + this branch, after `pnpm
install --frozen-lockfile && pnpm build`):
- `@objectstack/plugin-approvals` test: 126 files / 1,812 passed.
`@objectstack/client`: 59 / 820 passed. `@objectstack/spec`: 869 files /
27,877 passed. `@objectstack/rest`: first run 2 red (the two write-route
ledgers had no row for the new POST route); rows added (`no-record-echo`
in the objectstack-ai#8497 tripwire, a driven `approvals.getRecordLocks` row in the
hook-refusal ledger), both files now 737 / 737.
- Typecheck clean: rest, plugin-approvals, client, spec, ui plugin-grid,
components, i18n.
- UI (`packages/plugin-grid/ components/ plugin-list/ plugin-detail/
i18n/`): first run 18 red in 4 files: a paste / toggle / digit was
dropped while checking (fixed: those writes now wait too, as the edit
does), and `zh-Hant.ts` was not regenerated (fixed with `gen:zh-hant`).
The six affected files then 102 / 102. A second full run of these
packages is in progress; its result goes on this PR.
- `spec check:generated`: `api-surface` and `export-origins` regenerated
(one line each). `overlap-check.mjs`: clean against main and every open
PR sharing a file (objectstack-ai#36135, objectstack-ai#36144, objectstack-ai#36208).
- Added after the seat's ask: `ObjectGrid.autosave-35685.test.tsx`, new
top-level `describe` (2 cases, fake timers): a paste is not written for
1999 ms of a slow lock read and is written when it answers unlocked; on
a locked answer it is never written and the cell says why. Ablating the
wait in `writeCell`: both red, restored.

## Acceptance notes

- **objectstack-ai#36135** (draft) makes `getRecordLock` also answer `true` for a
`master_detail` line of a locked record. This PR's batch answers the
record half only. Whichever lands second carries the other half into
`getRecordLocks` (the line half batched: one FK read of the page, one
lookup per master object). `overlap-check.mjs` reads this branch clean
against objectstack-ai#36135 (it was moved off the lines objectstack-ai#36135 edits).
- The notice text stays on the cell until the answer arrives or the
reader moves; it is not a toast.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(a contract interface member and a constant)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the 维护者速读 block is the
maintainer's summary, in the maintainer's language).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgXSK9qt8je9QbZvhKb)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgXSK9qt8je9QbZvhKb
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgXSK9qt8je9QbZvhKb -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

行内编辑:去掉开关,始终可改;单击选中、双击或回车编辑;只读格说明原因

2 participants