Skip to content

feat(list,detail): a change that makes other fields required asks for them in place - #35994

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-4on43b
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-4on43b

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

repo:objectstack#1 · os-sales · session_01L6bhgWZ6R6aogVL9TTxNG8

Part of #35956
(PR 1 of 2, claim 7056727903: the shared prompt, the list cell, the record page's inline Save, the kanban on the shared copy. PR 2 moves the record header's stage menu onto it and deletes its own copy; it does not wait for #35853. The record drawer's per-field save is not this card; the seat files it.)

Clause-②: yes (widening) — @object-ui/fields exports collectRequiredWhenPromptFields, RequiredFieldsDialog and their types (moved from @object-ui/plugin-kanban, which never exported them) and the new requiredWhenPromptReads; nothing removed or renamed
Metadata-protocol: none
Skills-docs: content/docs/frontend/plugins/plugin-grid.mdx — the "On an object's list page" section gains one bullet (a change that makes other fields required asks for them). No skill under skills/ teaches the in-place save, so nothing there moves.
Follow-up: #35995 (the record drawer's per-field save asks too; Blocked-by this PR)
Flow: dev-thread rule (maintainer 2026-11-20 09:22:50Z): the card thread builds itself; L1 by L1-a, the declaration L2 by the seat on the green head.

维护者速读

  • 在列表单元格或记录页上改一个值(例如把项目状态改成「已完成」),如果这会让另一个还空着的字段变成必填,现在不再直接保存然后被服务端拒绝,而是先弹出「补填必填字段」框:先写记录名,再写这次改动(只读,如「状态:已完成」),下面列出要补的字段,用表单同款控件。
  • 填好点「保存」,原改动和补填的值一次写入;点「取消」什么都不写,列表格子保持原值,记录页的编辑状态和草稿原样保留。不填就点保存,字段下面显示「必填」,框不关。补填的值又让别的字段变必填时,框里马上追加那个字段。
  • 保存时服务端仍然拒绝,框不关,原因显示在对应字段下面,说不上字段的显示在框底部。如果是别人刚改过这条记录,会弹出和平常保存一样的冲突对比框,选「仍然覆盖」时补填的值一起写入。看板拖动用的是同一个框,行为不变。
  • 第一轮审查后的修正:列表只取了显示的那几列,补填判断现在会先把缺的字段从记录里读回来再判断,所以已经填过但没显示成列的字段不会被要求重填、也不会被覆盖。
  • 不弹框、照旧走拒绝提示的:字段已有值、不可见、只读、当前用户没有写权限、或者这种类型不能就地编辑(文件、富文本、公式)。记录抽屉里的逐字段保存这次也不弹,另开卡。
  • 需要你决定的:无。

What changes

One prompt, shared (@object-ui/fields). requiredWhenPrompt.ts and RequiredFieldsDialog.tsx move here from @object-ui/plugin-kanban (git mv, so the history follows); the kanban imports them from @object-ui/fields. Nothing else in the repository had a copy except the record header's stage menu, which PR 2 moves.

  • collectRequiredWhenPromptFields(objectFields, record, changes, options?) takes the change as a set of keys ({ stage: 'won' }, or a whole record-page draft) instead of one key. It judges requiredWhen on { ...record, ...changes } with resolveFieldRuleState, the evaluator the form and the server share, as the engine's transition gate (objectstack#30220), exactly as the kanban did. It skips the same fields as before (already has a stored value, hidden, read-only, no in-place editor) and, new, any field the host's fillable(name, def) refuses. exclude defaults to the changed keys.
  • RequiredFieldsDialog now shows the record's name and the change rows (read-only, the option's label) above the fields, as the card's item 3 describes. A value typed in the dialog that makes one more field required adds that field at once (moreFields), and Save waits for it. When the host's onSubmit rejects, the dialog stays open: a reason that names a field shown is drawn under that field; a reason that names another field the reader can fill adds that field (refusalField); every other reason goes to the foot (role="alert"). Only the shown fields' values are sent. The defaults read fields.requiredPromptTitle / fields.requiredPromptDescription and Save; the kanban keeps its own title, description and 「移动卡片」 button.

The list cell (@object-ui/plugin-grid, ObjectGrid; a grid with cellSelection, i.e. every grid ListView draws). useCellRequiredPrompt (objectGridRequiredPrompt.tsx) answers the S3 seam GridCellSelection.confirmCommit before the state-machine confirm: when the committed value makes fields required, it opens the dialog and nothing is staged or sent. The row is the view's projection (the grid fetches the columns it draws), so before judging, the prompt compares the keys the judgment reads (requiredWhenPromptReads: every field it could ask for, and the declared fields its requiredWhen / visibleWhen / readonlyWhen predicates name) with the keys the row carries, and reads the missing ones from the record (one findOne with $select those keys). A row that carries them all reads nothing more; a read that fails asks nothing and the write goes ahead for the server to judge. Save writes the cell's value and the typed values in one onRowSave ?? defaultRowSave call, so the existing in-place write applies (one guarded update, redraw in place, undo notice, the 409 conflict dialog); the seam is then answered false so the table does not write a second time. Cancel answers false and the cell keeps what it showed. fillable is the list's own inline-edit test (resolveFieldAffordance('listInlineEdit', …) plus field permissions). When this dialog opens it replaces the state-machine confirm for that commit, so the reader is asked once.

The record page's inline Save (@object-ui/plugin-detail, InlineEditSaveBar). In the atomic mode (no onFieldSave), Save first collects against the record context's object schema and the draft. When fields come back, nothing is written and the dialog opens; its Save sends { ...draft, ...values } in one update with If-Match the record's current updated_at, then re-reads and leaves edit mode, as a plain Save does. A 409 opens the page's own conflict dialog over it, as a plain Save's 409 does: Overwrite sends the draft and the typed values at the version the server reported, Reload drops the edit, Cancel comes back to the fill-in dialog with the values still typed. Cancel closes the dialog only: the edit session and its draft stay. fillable is the page's record-edit test (resolveFieldAffordance('recordEdit', …), permissions, computed and system fields). The per-field callback mode the drawer uses is not asked.

Strings: fields.requiredPromptTitle / fields.requiredPromptDescription in all eleven locale packs (zh-Hant regenerated by gen:zh-hant), with English fallbacks through useSafeTranslate.

Acceptance notes

The card's items, as this PR covers them:

  1. The prompt and dialog are lifted into @object-ui/fields; the kanban uses them with its behaviour unchanged (its 8 prompt tests pass, two assertions added for the record name and change row).
  2. The list cell, the record page's inline Save and the kanban drop ask. The record header's stage menu is PR 2.
  3. Dialog content as described; Save writes one update; Cancel writes nothing.
  4. Chained requirements: measured in tests and the browser.
  5. A refusal stays in the dialog: under the field, as an added field, or at the foot.
  6. What cannot be foreseen is written and refused as before (measured with a rich-text field below).
  7. The 「打开记录」 link in the list's refusal notice was already delivered by S1 (feat(list): a list cell saves the moment it is committed, and Space types into the selected cell #35864): data-table's needsRecord, and the browser reads 「保存失败: Cancel Memo不能为空 打开记录完成修改」 below. No code change here.

Readings I chose:

  • In the list, the fill-in dialog replaces the state-machine confirm for that commit, so the reader is asked once, not twice. Its change row names the move.
  • On the record page, Cancel keeps the edit session and its draft (the card says the change is not written and the screen returns to before the change; on the record page the draft is what the reader typed, so it is kept for them to change or cancel).
  • A conflicting write by someone else while a fill-in dialog is open: on both surfaces the surface's own conflict dialog comes up over it, the one a plain save opens there. The list's (askRowConflict) overwrite writes and its Cancel rethrows, so the fill-in dialog shows the reason; the record page's is measured in its tests (below). The browser run saw the list's conflict dialog open but did not click either choice.
  • When the list must read the record first, the commit waits for that read before the dialog opens or the write goes. Only an object with a requiredWhen field the row lacks pays it.
  • 375 px: the list draws cards, not table cells (S3's reading), so the phone check is the record page's dialog.

Platform checklist: no clause moves.

Tests

Migrated (moved from @object-ui/plugin-kanban with git mv, assertions kept):

  • ui/packages/fields/src/requiredWhenPrompt.test.ts: the 13 single-key calls now pass { key: value }; new block for a multi-key change, a chained field and fillable.
  • ui/packages/fields/src/__tests__/RequiredFieldsDialog.ariaInvalid-7008.test.tsx, …ariaInvalidText-7126.test.tsx, …datePicker-12664.test.tsx: the submit button's name is the generic default Save instead of Move card (the kanban passes its own); nothing else changed.

New:

  • ui/packages/fields/src/__tests__/RequiredFieldsDialog.inPlace-35956.test.tsx (5): record name and change rows; a chained field joins and Save waits for it; a refusal naming a shown field draws under it, one naming a fillable field adds it; an unattributed refusal is listed at the foot; Cancel sends nothing.
  • ui/packages/plugin-grid/src/__tests__/ObjectGrid.requiredPrompt-35956.test.tsx (11; its server honours $select, as a real one does): the dialog opens for a field with no column and writes nothing; Save sends one guarded update { stage: 'won', win_reason: … } with ifMatch; Cancel writes nothing and the cell keeps its value; a refusal is drawn under the field; controls: a field that already has a value, and a rich-text field, are not asked. Round 1: a stored value that is not a column is read (findOne $select: ['win_reason']), not asked for, not overwritten; an empty one read the same way still asks; a predicate operand outside the columns is judged on its stored value (asks for enterprise, not for smb); a failed read asks nothing; a row that carries every key reads nothing more.
  • ui/packages/plugin-detail/src/__tests__/InlineEditSaveBar.requiredPrompt-35956.test.tsx (8): the dialog names the record and change and writes nothing; Save sends one guarded update and leaves edit mode; Cancel keeps the session and the draft; a refusal stays in the dialog; controls: a draft that makes nothing required saves at once, and the drawer's callback mode never asks. Round 1: a 409 opens the conflict dialog with nothing re-read, and Overwrite sends { stage, win_reason } with ifMatch the reported version; the conflict dialog's Cancel comes back to the fill-in dialog with the value still typed.
  • ui/packages/fields/src/requiredWhenPrompt.test.ts, round 1: requiredWhenPromptReads names the askable fields and their declared operands (record. and previous.), skips a field with no editor, an unfillable one and an undeclared operand, and reads nothing for an object with nothing to ask.
  • ui/packages/plugin-kanban/src/ObjectKanban.requiredWhenPrompt.test.tsx: two assertions added (record name, change row).

Ablation (committed first, mutated through scripts/ablation-replace.mjs, restored to the HEAD blob with git diff HEAD empty):

  • the grid's requiredPrompt.ask replaced by null → 4 failed / 6 in ObjectGrid.requiredPrompt-35956; restored → green.
  • the save bar's fields.length > 0 turned to < 0 → 4 failed / 6 in InlineEditSaveBar.requiredPrompt-35956; restored → green.
  • the dialog's moreFields ignored → 1 failed / 5 in RequiredFieldsDialog.inPlace-35956; restored → green.
  • presentRefusal emptied → 4 failed across three files; restored → green.
  • the kanban's change row dropped → 1 failed / 8 in ObjectKanban.requiredWhenPrompt; restored → green.
  • round 1 (on 1462c319): the list prompt never reads (if (true || …)) → 5 failed / 11 in ObjectGrid.requiredPrompt-35956, the old control "a field that already has a value" among them now that the server honours $select; the dialog's 409 not routed to the conflict dialog → 2 failed / 8 in InlineEditSaveBar.requiredPrompt-35956; the overwrite sends the draft alone → 1 failed / 8; each restored → green.

Review round 1 (L1-a 7057894230 REWORK on 59fb5217; the seat's declaration L2 on the same head, not posted)

  • M1 must-fix (list judged a projected row): fixed as described under What changes: the keys the judgment reads and the row lacks are read from the record first. I chose the re-read over widening the two projections (objectGridRowLoad.ts#getSelectFields, ListView.tsx#selectFields): it costs nothing on an object without requiredWhen, and it judges the stored values at the moment of the change rather than at the list's last fetch. Pinned with a find and findOne that honour $select; the existing control now passes only through the read (ablation above).
  • S1 should-fix / L2 F1 (409 in the record page's dialog): fixed: the page's conflict dialog, with the typed values carried into its overwrite (conflictWriteRef), and nothing re-read under the reader.
  • N1 / L2 F2 (Math.max(index, 0)): a row no longer among the loaded rows now fails the save with table.saveFailed in the dialog rather than handing a host index 0.
  • N2 / L2 F3 (wording): the body now says the record page guards on the record's current updated_at, as the plain Save does; the code is unchanged there.
  • Follow-up named: The record drawer's per-field save asks for the fields a change makes required, like the record page does #35995.
  • Round-1 runs, on 9a473a0c (main merged after feat(grid): the cell editor and a cut-off value draw on a layer over the cell (#35688 S1) #35990, which the seat landed first; no conflict): vitest from ui/, one package at a time: fields 314 files / 4731 tests passed (1 file skipped); plugin-grid 296 / 2602; plugin-detail 395 / 3636 (1 skipped); plugin-list 181 / 1965; plugin-kanban 81 / 533; i18n 105 / 1957. tsc --noEmit clean for fields, plugin-grid, plugin-detail, plugin-kanban; eslint on the changed files 0 errors. dispatch-gates --commands re-derived on this head, 74 families, all exit 0 (vitest run scripts/ with one worker); --ran 74 derived, 74 run, 0 NOT-MEASURED, 0 UNRUN. overlap-check VERDICT clean (main a6607c79 and 4 PR heads). The built dist/index.d.ts of @object-ui/fields exports requiredWhenPromptReads.
  • Round-1 browser, against the real server (it answers a projection): Website Relaunch with completion_note = 'Already noted' stored and no Completion Note column on the list; pick 「已完成」 → no fill-in dialog, one GET of the record, the state confirm, then PATCH {"status":"completed"} → 200; stored afterwards completion_note = "Already noted". On 59fb5217 the same row would have opened the dialog (the empty-note case still opens it, run 1 of the same script). Log r1-m1-journey.log beside the other evidence.

Verification

Local runs
  • vitest from ui/, one package at a time, on the tree of 59fb5217 (the commit was reworded for the trailer check only, no file changed): fields 313 files / 4719 tests passed (1 file skipped); plugin-kanban 81 / 533; i18n 105 / 1957; plugin-detail 395 / 3632 (1 skipped); plugin-grid 296 / 2597; plugin-list 183 / 1979 with one red, ListView.relationalSort "CONTROL: a sort on a plain field" timing out at 15 s while the gate loop ran beside it, re-run alone 9/9 passed.
  • type-check (tsc --noEmit) for @object-ui/fields, @object-ui/plugin-grid, @object-ui/plugin-detail, @object-ui/plugin-kanban: clean (after building their dependency dists). eslint on every changed source and test file: 0 errors.
  • Clause-② measured on the built declarations: dist/index.d.ts of @object-ui/fields now exports collectRequiredWhenPromptFields, RequiredFieldsDialog and the five types; @object-ui/plugin-kanban's built index never exported either file.
  • node scripts/pm/dispatch-gates.mjs --commands: 74 families, each run with its exit captured before any pipe. 72 exit 0 on the first pass; two re-run alone: vitest run scripts/ under ui/ was SIGKILLed while a package suite ran beside it, re-run with one worker 172 files / 5111 tests passed; check:skill-examples refused with exit 3 on a stale @objectstack/client-react dist, re-run after building it, exit 0. --ran: 74 derived, 74 run, 0 NOT-MEASURED, 0 UNRUN.
  • node scripts/pm/overlap-check.mjs: VERDICT clean (against main f9f45d34 and 4 open PR heads).
  • Changed lines about 1,960 (including the four moved files' rewrites) vs the 3000 threshold: under.
Browser

examples/app-showcase (objectstack dev --fresh --seed-admin, own port and temp DB) with the ui/apps/console Vite dev server over it, headless Chromium, zh-CN, light and dark, desktop 1600×1000 and 375×812. No shipped object declares requiredWhen, so for the run only (not committed) showcase_project gained three probe fields: completion_note (text, required when status == 'completed'), follow_up (required when completion_note == 'partial') and cancel_memo (rich text, required when status == 'cancelled').

Before (the two host wirings ablated, i.e. main's behaviour):

  • List: pick 「已完成」 for 「Website Relaunch」 → the state-machine confirm only, then PATCH {"status":"completed"} → 400 「Completion Note不能为空」; the notice reads 「保存失败: Completion Note不能为空 打开记录完成修改」 and there is nowhere to fill the field.
  • Record page: inline Save → PATCH → 400; the save bar lists 「Completion Note: Completion Note不能为空」.

After, list:

  • Pick 「已完成」 → the dialog 「补填必填字段」 with 「Website Relaunch」, 「状态: 已完成」 and 「Completion Note *」; 0 writes while it is open. completion_note is not a column of the view.
  • Save empty → 「必填」 under the field, the dialog stays, 0 writes.
  • Type partial → 「Follow-up Owner *」 joins.
  • Cancel → 0 writes, the cell still reads 「进行中」.
  • Again, fill and Save → one PATCH {"status":"completed","completion_note":"Shipped on time"} with If-Match → 200, the cell reads 「已完成」.
  • 「已取消」 (the required field is rich text) → no dialog; the state confirm, then PATCH {"status":"cancelled"} → 400 and the notice 「保存失败: Cancel Memo不能为空 打开记录完成修改」, as before.
  • Another user writes the record while the dialog is open, then Save → 409; the grid's conflict dialog opens over the fill-in dialog.
  • Dark theme: the same through Cancel.

After, record page (light, dark, 375):

  • Inline edit 「状态」 to 「已完成」, Save → the dialog; 0 writes.
  • Cancel → the save bar and the draft are still there.
  • Chain, then Save → one PATCH {"status":"completed","completion_note":"partial","follow_up":"ops@example.com"} → 200, edit mode left.
  • 375 px: the dialog fits the screen, the controls work.

Evidence (screenshots and journey logs) is with the seat. Not measured: Safari / WebKit (no WebKit build in the container), the kanban drag in the browser (its tests cover it, and its code path changed only in what it passes to the dialog).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (eslint on the changed files: 0 errors)
  • 4. One issue, one branch off an up-to-date main, one pull request. (The branch is the platform-assigned claude/project-thread-4on43b, named in the claim.)
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English. (the 维护者速读 block and the quoted UI strings are Chinese by the maintainer's standing rule)
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgWZ6R6aogVL9TTxNG8

… them in place

The kanban drop's requiredWhen pre-check and fill-in dialog move to
@object-ui/fields, generalised to any set of changed keys, and gain the
record name, the triggering change as read-only rows, chained requirements
and in-dialog refusals. The select-first list cell (ObjectGrid's
confirmCommit) and the record page's inline Save (InlineEditSaveBar's atomic
path) now open the same dialog and write the change and the typed values in
one update. The kanban keeps its behaviour and copy.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWZ6R6aogVL9TTxNG8
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T05:21Z. The brief handed to the isolated declaration-face reviewer for PR #35994 (owed by the changeset's Clause-②: yes (widening) line). The record follows as its own comment.

Contract review brief — PR #35994 @ 59fb52170e27defe73ec225c9c0d6e6a8d370e8c (card #35956)

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:
· card #35956: its body and EVERY comment (rulings and earlier records included)
· PR #35994: its body, its file list, and the net diff against main at 59fb52170e27defe73ec225c9c0d6e6a8d370e8c
· the check-runs on 59fb52170e27defe73ec225c9c0d6e6a8d370e8c: 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 /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-35994/ 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.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U

席位核对 — REWORK (L1-a)

维护者速读

这个 PR 做的事是:在列表格子或记录页上改一个值时,如果这会让别的空字段变成必填,就先弹框请人补填,再一次保存。整体做法和看板共用同一套判断,这一点是对的。但列表这一侧有一个必须先修的问题,记录页还有一个建议修的问题。

  • 必须修:列表里的「补填」判断看到的是不完整的数据。 列表只向服务器取当前显示的那几列。要补填的字段如果不在列里,列表手上就没有它的值,于是会被当成「空」。结果是:一个早就填过的字段(比如「赢单原因」),会在每次把阶段改成「赢单」时被要求重新填写,点保存就会覆盖掉原来的内容,而用户在列表里根本看不到原值。同样,如果必填条件读到了不在列里的字段,这个判断也会出错。PR 的测试用的是模拟数据源,不管请求哪几列都返回整条记录,所以测不出来。浏览器实测时,那个字段本来就是空的,所以也没有暴露。
  • 建议修:记录页弹框里保存时遇到「别人刚改过」。 现在的做法是自动重读记录,框不关。用户再点一次保存,就会直接覆盖别人的改动,不会像平常保存那样先弹出对比框。列表这一侧遇到同样情况会弹对比框,两边不一致。

这个 PR 不属于受管面,修完后需要我再做一次增量核对。

Head reviewed: 59fb52170e27defe73ec225c9c0d6e6a8d370e8c. One commit, 30 files, +1585/−374. git merge-tree onto current main is clean. check-governed-merges --pr 35994 (PR-head register) reads NOT governed. CI is as the thread reported; vitest, typecheck and lint were not run here (no node_modules).

What holds

  • collectRequiredWhenPromptFields (ui/packages/fields/src/requiredWhenPrompt.ts). It is the kanban's function with groupBy/toColumnId generalised to a changes map. The same resolveFieldRuleState call (transition gate via name, stored record as previous), the same isMissingForRequired on the stored value, and the same hasFieldEditWidget filter are kept. exclude defaults to the changed keys, and fillable is new. The chained call in each host passes exclude = the original change keys, so a typed field keeps its row because emptiness is read off the stored record.
  • RequiredFieldsDialog.
    • values state is not re-seeded when fields changes, so the kanban's now-unmemoised pendingFields cannot wipe typed input.
    • Only shown fields are sent.
    • moreFields is recomputed per render, and a refusal is routed to a field, an added field or the foot.
    • The migrated tests change only the default submit label.
  • List wiring (objectGridRequiredPrompt.tsx, ObjectGrid.tsx).
    • The ask runs before the state-machine confirm and always answers the seam false, so the table never writes a second time.
    • The combined write goes through onRowSave ?? defaultRowSave, which is the guarded in-place write. Its 409 path (writeRowInPlace → the row conflict dialog) carries the typed values, because they are in changes.
    • Unmount answers an open ask false.
  • Record page (InlineEditSaveBar).
    • The ask applies to the atomic path only.
    • fillable mirrors the inline editors' test.
    • Cancel keeps the draft.
    • The record page's data is a full read (RecordDetailView sends no $select on the record itself), so the projection problem below does not reach it.
  • Kanban. It passes { [groupBy]: toColumnId } and keeps its own title, description and button. It gains the change row and chained fields, which the PR says.
  • Clause-② yes (widening) is right. fields/src/index.tsx adds named exports of the two modules and their five types, and nothing is removed. @object-ui/plugin-kanban's index never exported either. Metadata-protocol none is right.
  • Strings. fields.requiredPromptTitle / requiredPromptDescription are in all 11 packs; en and zh-Hans read correctly.

Findings

M1 (must-fix) — on the list, the prompt judges a projected row as if it were the stored record. useCellRequiredPrompt.ask calls collectRequiredWhenPromptFields(objectFields, row, …) with the grid's loaded row. The row arrives through a $select built from the view's columns plus named harvests: objectGridRowLoad.ts#getSelectFields for a grid that owns its fetch, and ListView.tsx#selectFields (line 3923) on the list page. Neither harvest includes a requiredWhen field, or the operands of its predicate.

As a result:

  • A field that has a value is asked for again. A requiredWhen field that is not a column is undefined on the row, and isMissingForRequired(undefined) is true. So a stored value (a win_reason filled at an earlier win) is asked for again on every change that satisfies the predicate. The reader cannot see the stored value, and Save overwrites it with whatever they type.
  • The predicate is read on missing keys. A predicate that reads a field outside the columns (record.segment == 'enterprise' && record.stage == 'won') is judged on a missing key. The prompt can then be shown or skipped against the server's verdict.

Why the suite does not see it: the test data source's find (ObjectGrid.requiredPrompt-35956.test.tsx:76) ignores $select and returns whole records. So the control "a field that already has a value asks nothing" passes with win_reason not a column, which is exactly the case where a real server would strip it. The browser probe could not see it either, because completion_note was empty.

Fix (the dev's choice of shape): before deciding, read what the decision needs. Either:

  • add every requiredWhen field and its predicate's operands (collectPredicateFieldRefs) to both projections, FLS-gated like the other harvests; or
  • when a candidate field or operand is absent from the row, re-read the record (those fields only) before asking.

Pin it with a find that honours $select, and keep the existing control.

S1 (should-fix) — a 409 from the record page's dialog becomes a silent overwrite on the second Save.

  • What happens. renderRequiredAsk's onSubmit catches a concurrency error, runs refresh(), rethrows (the dialog shows the reason at its foot) and stays open. The refreshed data.updated_at is the next Save's If-Match, so the second press writes { ...draft, ...values } over the other writer's values with no comparison.
  • What the plain Save does instead. On the same page, a plain Save routes a 409 to ConcurrentUpdateDialog (setConflict(buildConflict(draft, err))).
  • What the list does in this PR. It routes the same case to its row conflict dialog.
  • Fix. Route the dialog's 409 to the page's conflict dialog. Its overwrite has to carry the typed values: today buildConflict / the overwrite at :554 send draft alone, which would be refused again. Alternatively, keep the current reading, but then do not refresh the token underneath the reader.

Nits:

  • N1. ObjectGrid.tsx save: Math.max(index, 0) hands a host onRowSave row index 0 when the row is not among the loaded rows. defaultRowSave ignores the index; a host callback would not.
  • N2. The PR body says the record page sends "If-Match the version the edit began on". The code sends the current data.updated_at, as the plain Save does. Fix the wording, not the code.

Observations (no change asked)

  • Undo. The combined list write's toast offers Undo only when the row carries every written key (captureUpdateUndoData). A filled field that is not a column means no Undo for that write. That is the existing rule, applied.
  • Kanban. Kanban rows are judged on whatever the board fetched; that is unchanged by this PR.

Landing terms

  • REWORK. M1 and S1 need fixing on a new head, then a delta L1. The seat's declaration-face L2 should judge that head too.
  • Not governed: ordinary queue landing after that.
  • This review does not approve, mark ready, enqueue or request review.

… opens the conflict dialog

The list row is the view's projection, so a requiredWhen field or a predicate
operand outside the columns was absent and read as empty: a stored value was
asked for again and overwritten. The list cell's prompt now reads the keys the
row lacks (requiredWhenPromptReads, one findOne with $select) before judging,
and asks nothing when that read fails. On the record page, a 409 of the
fill-in dialog's write opens the page's conflict dialog, whose overwrite sends
the draft and the typed values, instead of re-reading under the reader. A row
no longer loaded makes the list save fail rather than guess index 0.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWZ6R6aogVL9TTxNG8
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T07:50Z.

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 59fb52170e27defe73ec225c9c0d6e6a8d370e8c
Local-runs: none

Inputs were card #35956 (body and both comments: the triage and claim 7056727903; no ruling and no earlier record on it), the PR body, its 30-file list, the net diff against main (merge base 9a8bb83d), and the check-runs on this head. Every completed check-run on the head is success, including Check Changeset, PR-body guards, Governed Surface Queue Guard, Type Check UI, Lint UI, all 16 Test UI shards and Build & E2E UI. The rest are skipped, and none failed. The changed paths decide no schema or rules face, so the review is owed by the changeset's Clause-②: yes line alone: the declaration face, at TIER_DEFAULT.

① Derived judgments

  • D1 · @object-ui/fields index: right (widening). It adds collectRequiredWhenPromptFields, RequiredFieldsDialog and five types: RequiredWhenPromptField, RequiredWhenPromptOptions, RequiredFieldsDialogField, RequiredFieldsDialogChange and RequiredFieldsDialogProps. The package's exports map is . and ./style.css only, so these are the only newly reachable names. The new imports (@object-ui/core and @object-ui/react) are dependencies the package already declares, and package.json is not in the diff.
  • D2 · @object-ui/plugin-kanban deletions: right (nothing narrows). src/requiredWhenPrompt.ts and src/RequiredFieldsDialog.tsx are deleted. Neither is in the package's index on main, and its exports map has no subpath that could reach them, so no published name is removed.
  • D3 · accept-set of the moved function: right. (objectFields, record, groupBy, toColumnId) becomes (objectFields, record, changes, options?). The old shape was never published, so the first published form is the new one. Read against the deleted copy, the evaluator and its four skips are the same: resolveFieldRuleState as a transition gate, isMissingForRequired on the stored record, visible, not read-only, and an edit widget. Two things are new. options.fillable is applied last. exclude defaults to the keys of changes, so the kanban's { [groupBy]: toColumnId } call reproduces the old name === groupBy skip exactly.
  • D4 · RequiredFieldsDialog props: right. Eight optional props are added (recordName, changes, moreFields, refusalField, labelOf, title, description, submitLabel), and onSubmit may now return a Promise. With no host props, the dialog falls back to the fields.* title and description and to common.save, where it used to read kanban.* and kanban.moveCard. The kanban now passes all three kanban.* strings itself, so the board renders the same text. The three migrated a11y tests change only the submit button's accessible name to that default.
  • D5 · @object-ui/i18n: right (widening). fields.requiredPromptTitle and fields.requiredPromptDescription are added to all eleven packs. No key is removed: kanban.requiredFieldsTitle, kanban.requiredFieldsDescription and kanban.moveCard stay, and the board still reads them.
  • D6 · @object-ui/plugin-grid: right, declared. GridCellSelection gains no member. Its confirmCommit answer can now be a Promise that resolves false after the grid itself has written, through onRowSave ?? defaultRowSave, with the same (rowIndex, changes, row) shape a plain commit uses. useCellRequiredPrompt is not exported from the package index. The behaviour change reaches every grid ListView draws, and the changeset and plugin-grid.mdx both state it (F2 below).
  • D7 · @object-ui/plugin-detail: right, declared. InlineEditSaveBar keeps its props. In atomic mode only (onFieldSave absent), Save can be held while the dialog opens, and the drawer's callback mode is untouched. The new imports (@object-ui/fields, @object-ui/core, @object-ui/permissions, @object-ui/react) are among the package's existing peerDependencies (F1 and F3 below).
  • D8 · protocol: right, none. No packages/spec path changes and no metadata key is added. The diff reads requiredWhen as it is already declared, so Metadata-protocol: none is right.

Findings:

  • F1 · should-fix · InlineEditSaveBar.tsx, the dialog's onSubmit. When this write gets a 409, the page re-reads the record (refresh) and the error goes to the dialog's foot. The plain Save opens ConcurrentUpdateDialog for the same 409, and the list path keeps askRowConflict. After the re-read, data.updated_at holds the newer token, so a second Save in the dialog writes the draft over the other writer's values without the reader ever seeing them. Card item 5 (the reason stays in the dialog) is met, and the PR body declares this behaviour. The gap is that the record page loses the explicit overwrite choice the other two paths keep. Suggested fix: send isConcurrentUpdateError to setConflict(buildConflict(...)) with the combined values, or keep the stale token until the reader chooses. Non-blocking.
  • F2 · nit · ObjectGrid.tsx, the prompt's save. The Math.max(index, 0) fallback hands onRowSave the index 0 when the row is not among the loaded rows. defaultRowSave ignores the index, and no ListView or console host passes onRowSave on this head, so nothing is affected today. An index-keyed host would still be told the wrong row.
  • F3 · nit · PR body wording. The record-page paragraph says the dialog's update sends "If-Match the version the edit began on". The code sends the record's current data.updated_at, as the plain atomic Save does. The behaviour is consistent with the existing path, and only the sentence is wrong.

② Semver level

patch on @object-ui/fields, @object-ui/plugin-kanban, @object-ui/plugin-grid, @object-ui/plugin-detail and @object-ui/i18n is right. With Metadata-protocol: none, AGENTS.md (Post-Task Checklist 3) says a non-protocol widening ships patch. All five packages that publish a change are named, and no publishing package is left out: the docs page and the tests publish nothing.

Clause-②: yes (widening) is right. The line opens a line in both the PR body and the changeset, the closed arm is well formed, and it matches D1 (new exports) and D2 (nothing removed or renamed from any published entry). No BREAKING banner, migration or ADR-0087 disposition is owed. Check Changeset is green on this head.

③ Boundary flags

Dev flags (the PR body's "Readings I chose" and its "Not measured" list):

  • B1 · answered, accepted. In the list, the fill-in dialog replaces the state-machine confirm for that commit. Its change row names the move, so the confirm's content is still shown, and plugin-grid.mdx documents it.
  • B2 · answered, accepted. On the record page, Cancel keeps the edit session and the draft. Card item 3's "the screen returns to before the change" is read as the screen as it stood before Save. Nothing is written, and InlineEditSaveBar.requiredPrompt-35956 pins that.
  • B3 · answered, accepted. A 409 in the list dialog opens askRowConflict over it, and the overwrite and Cancel branches were read from the code, not clicked. That path is the grid's existing one and this diff does not change it. The record page's 409 is F1.
  • B4 · answered, accepted. At 375 px the list draws cards, so the record page's dialog is the phone check. The dialog is max-h-[90dvh] overflow-y-auto.
  • B5 · answered, accepted. WebKit was not measured, and neither was the kanban drag in a browser. The kanban's code path changes only in what it passes to the dialog, and ObjectKanban.requiredWhenPrompt (8 tests) runs in the green Test UI shards.
  • B6 · answered, accepted. The claim's file surface named data-table.tsx for item 7, but the diff does not touch it. The PR body says item 7 was already delivered by feat(list): a list cell saves the moment it is committed, and Space types into the selected cell #35864 (needsRecord) and backs that with the browser reading.
  • B7 · answered, accepted. Card acceptance "仓库里只剩一份预判和一个补填框" is not met by this PR alone: the header stage menu's copy (recordPathStageChange.tsx) remains for PR 2. The PR says Part of #35956, so the card stays open, as the claim's Scope sets out.
  • B8 · escalated to the seat. The record drawer's per-field save (onFieldSave) is out of this card. The PR body says the follow-up card is the seat's to file, and this diff owes nothing for it.

open_questions: none. The PR body's 维护者速读 says 「需要你决定的:无」, and the claim raises none.

SQL push-down (Prime Directive 5): no finding. The pre-evaluation runs client-side over the record and object schema each surface already holds. The diff adds no query, materialises no id list and adds no in-app join. The grid's findIndex over the loaded rows only finds the row being written, and it is not a join.

Implemented-by: claude/project-thread-4on43b
Reviewed-by: session_01L6bhgUkbQqRUUFSiu2HGob

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T07:51Z. The delta brief handed to the same isolated declaration-face reviewer for PR #35994. The record follows as its own comment.

Delta round. Your earlier record on 59fb52170e27defe73ec225c9c0d6e6a8d370e8c is now posted on PR #35994 as comment 7059523805 (PASS, F1 should-fix, F2 and F3 nits). The PR moved to the head below: L1 rework (M1, S1, N1, N2) and your F1–F3 were handled, main was merged in (after #35990, no conflict), and @object-ui/fields gained one new export, requiredWhenPromptReads (needed by the M1 fix), with the changeset and the body's Clause-② line updated. Review the delta git diff 59fb52170e27defe73ec225c9c0d6e6a8d370e8c pr-35994 (separate the main-merge part with git show --remerge-diff on the merge commit), name F1, F2 and F3 closed or open by id, judge the new export on ① and ②, and grade anything new. Write the delta record to /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-35994/record-delta.md; post nothing. The brief for this head follows.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U

席位核对 — delta ACCEPT (L1-a)

维护者速读

上一轮的两个问题都修好了:

  • 列表在决定要不要弹「补填」框之前,会先把判断要用、但列表没取到的字段从服务器读回来。已经存过值的字段不会再被重复要求填写,也不会被覆盖。读取失败时就不弹框,照常保存,由服务器判断。
  • 记录页的补填框遇到「别人刚改过」时,会和平常保存一样弹出对比框。选「覆盖」会把补填的值一起写进去;选「取消」会回到补填框,已填的内容还在。

剩下一个小问题,不挡合并:对于有「条件必填」字段、而这些字段又不在列表列里的对象,列表里每改一个格子(哪怕改的是名称这种无关字段)都会先多读一次记录,格子要等这一下才更新。可以只在改动的字段会影响必填条件时才去读,建议另开一张小卡跟进。这个 PR 不属于受管面,可以按普通队列合并。

Head reviewed: 9a473a0cbd0218931b2e1bb0efc9739e3d662fd1. The delta from 59fb5217 is:

Against main, the PR is 30 files, +1913/−394, and git merge-tree is clean. check-governed-merges --pr 35994 (PR-head register) reads NOT governed. CI is as the thread reported (54 success, 12 skipped, 0 failed). vitest was not run here (no node_modules).

Delta, by finding

  • M1: closed. requiredWhenPromptReads(objectFields, { fillable }) (fields/src/requiredWhenPrompt.ts) names the keys the judgment reads: every askable field, plus the declared operands of its requiredWhen / visibleWhen / readonlyWhen.
    • The operands come through collectPredicateFieldRefs, the same harvester the list projections use. previous.x is rewritten to record.x first. Names are intersected with the declared fields, so a typo'd operand never reaches $select.
    • useCellRequiredPrompt.ask takes the keys the row lacks and reads them with one findOne(objectName, id, { $select: lacking }) (DataSource.findOne(resource, id, params), types/src/data.ts:529). It merges only those keys over the row and judges that record.
    • The dialog's recordName and moreFields read the merged record too. The save is still keyed on the grid's row.
    • A failed or empty read asks nothing and falls through to the state-machine confirm, then writes. The seam contract (gridCellSelection.tsx:58-69: true writes, false writes nothing, null = no question) is honoured by (await otherwise()) ?? true.
    • The tests' find / findOne now honour $select, so the "a stored value asks nothing" control can only pass through the read-back. Choosing a read-back over widening both projections is a sound call: the projection of every list stays as it is.
  • S1: closed. A 409 from the dialog's write now stores the combined write in conflictWriteRef and opens the page's ConcurrentUpdateDialog with buildConflict(write, err). The token is no longer refreshed underneath the reader.
    • Overwrite sends conflictWriteRef.current ?? inline.draft, re-keyed on the 409's currentVersion, so the typed values ride along.
    • Reload drops the dialog and the draft.
    • Cancel (closeConflict) clears the ref only, so the fill-in dialog is still open with its values.
    • A refused overwrite closes the fill-in dialog and draws its reasons on the save bar.
    • The plain-Save path is unchanged: there the ref is null, so it falls back to the draft.
  • N1: closed. A row no longer among the loaded rows now throws table.saveFailed (key present, en "Save failed"), and the dialog shows it. No index is guessed.
  • N2. Per the thread, the body now says the current updated_at. That is a wording fix only; I did not re-read the body.
  • Clause-②. It is still yes (widening). The changeset line now also names requiredWhenPromptReads, which fields/src/index.tsx exports by name. Nothing is removed.

Nit (does not block; follow-up card suggested)

  • N3: the read-back runs before every list cell commit on an object that has a non-column askable field, not only before the commits that can change a verdict. lacking depends on the row alone, so editing name on an opportunity whose win_reason is not a column still waits on a findOne before the write, and the cell shows its old value until the read answers. A write can only flip a verdict when columnKey is an operand of some askable field's requiredWhen / visibleWhen / readonlyWhen. If it is not, the predicates read the same values before and after, and the transition gate asks nothing. Skipping the read in that case gives exactly the same answers, one request fewer.

Observations (no change asked)

  • A key the server strips from the read-back (FLS read-denied) stays absent and reads as empty. That only matters for a field the reader may write but not read, which fillable does not exclude. It is rare, and the server still judges the write.

Landing terms

  • Not governed: the seat lands it through the ordinary queue. The seat's declaration-face L2 should be on this head.
  • A new push needs a delta L1 unless it is a clean main merge.
  • This review does not approve, mark ready, enqueue or request review.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T07:52Z. Replaces the seat's previous delta-brief comment on this PR, which went out without its brief text. The delta brief handed to the same isolated declaration-face reviewer for PR #35994. The record follows as its own comment.

Delta round. Your earlier record on 59fb52170e27defe73ec225c9c0d6e6a8d370e8c is now posted on PR #35994 as comment 7059523805 (PASS, F1 should-fix, F2 and F3 nits). The PR moved to the head below: L1 rework (M1, S1, N1, N2) and your F1–F3 were handled, main was merged in (after #35990, no conflict), and @object-ui/fields gained one new export, requiredWhenPromptReads (needed by the M1 fix), with the changeset and the body's Clause-② line updated. Review the delta git diff 59fb52170e27defe73ec225c9c0d6e6a8d370e8c pr-35994 (separate the main-merge part with git show --remerge-diff on the merge commit), name F1, F2 and F3 closed or open by id, judge the new export on ① and ②, judge the new findOne the list fill-in now sends before the prompt (only when the row lacks keys the predicate reads, and only those keys) under ③'s SQL push-down line, and grade anything new. Write the delta record to /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-35994/record-delta.md; post nothing. The brief for this head follows.

Contract review brief — PR #35994 @ 9a473a0cbd0218931b2e1bb0efc9739e3d662fd1 (card #35956)

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:
· card #35956: its body and EVERY comment (rulings and earlier records included)
· PR #35994: its body, its file list, and the net diff against main at 9a473a0cbd0218931b2e1bb0efc9739e3d662fd1
· the check-runs on 9a473a0cbd0218931b2e1bb0efc9739e3d662fd1: 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 /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-35994/ 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.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T07:55Z.

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 9a473a0cbd0218931b2e1bb0efc9739e3d662fd1
Local-runs: none

This is a delta round on top of the earlier record for 59fb5217 (comment 7059523805: PASS, with F1 should-fix and F2, F3 nits).

Inputs:

The delta has two commits.

  • 1462c319: the rework, 9 files, +352 / −44.
  • 9a473a0c: a merge of main at a6607c79. git show --remerge-diff on it is empty, so the merge resolved nothing by hand. The net diff against its merge base is still the same 30 paths, so the merge adds nothing to what this PR changes.

Check-runs on this head: 54 success, 12 skipped, none failed or pending. The face is unchanged: the paths still decide no schema or rules face, and the changeset's Clause-②: yes line owes the declaration face at TIER_DEFAULT.

① Derived judgments

D1 to D8 from the earlier record still hold on this head, except for the additions below. The rework touches no other published name, prop or locale key.

  • D1 (extended) · @object-ui/fields index: right (widening). One new value export, requiredWhenPromptReads(objectFields, options?). Its options is Pick of the already-exported RequiredWhenPromptOptions (fillable only), so no new type is exported. It returns the declared names of:

    • every field the collector could ask for, with the same static narrowing (requiredWhen, an in-place editor, fillable);
    • every field those fields' requiredWhen / visibleWhen / readonlyWhen predicates name.

    previous.x is folded into record.x before harvesting. Every name is intersected with the declared fields (name in objectFields), which is the caution collectPredicateFieldRefs documents in @object-ui/core: an unknown $select key is not ignored by every backend. Nothing existing changes shape.

  • D6 (extended) · @object-ui/plugin-grid: right, declared. GridCellSelection still gains no member. confirmCommit keeps the seam's documented contract: true writes, false or a rejection writes nothing, null asks nothing. What changes is when it answers:

    • When the row lacks a key that the judgment reads, the commit waits for one read of that record. It then answers with:
      • the fill-in dialog, which ends false;
      • the state-machine confirm; or
      • true.
    • A read that fails, or comes back empty, asks nothing: the state confirm, or else true. The write goes ahead and the server judges it, as before this card.
    • With no findOne on the data source, the row is judged as it is.
    • CellRequiredPromptInputs gains an optional read. It is internal, not in the package index.
    • The prompt's save now throws table.saveFailed instead of handing a host's onRowSave index 0. The onRowSave(rowIndex, changes, row) shape is unchanged.
  • D7 (extended) · @object-ui/plugin-detail: right, declared. InlineEditSaveBar props are unchanged. A 409 on the fill-in dialog's write now opens the page's existing ConcurrentUpdateDialog over it:

    • Overwrite sends the draft and the typed values (conflictWriteRef) at the version the server reported.
    • Reload discards the edit and closes the fill-in dialog.
    • Cancel returns to the fill-in dialog with the values still typed.

    This is the plain Save's conflict contract, now on both entry points.

Earlier findings:

  • F1 · closed. The record page's fill-in 409 no longer re-reads under the reader and lets a second Save overwrite. It routes to setConflict(buildConflict(write, err)) and returns without throwing, so the fill-in dialog stays mounted under the conflict dialog. The overwrite carries { ...draft, ...values }, so the server does not refuse the draft alone again. InlineEditSaveBar.requiredPrompt-35956 now has 8 tests. They pin that the 409 opens the conflict dialog with nothing re-read, that Overwrite sends { stage, win_reason } with the reported ifMatch, and that Cancel returns with the value still typed. The ablation is reported in the PR body.
  • F2 · closed. Math.max(index, 0) is gone. A row no longer among the loaded rows fails the save with table.saveFailed, which the dialog draws at its foot, and no host is handed a guessed index.
  • F3 · closed. The PR body now says the record page's write is guarded on "the record's current updated_at, as the plain Save does", which is what the code sends.

New:

  • F4 · nit · objectGridRequiredPrompt.tsx, ask. The rework chose to read the record's missing keys first, which fixes L1's M1: a projected row read a stored value as empty, asked for it and overwrote it. But lacking is computed per object, not per change. On an object with a requiredWhen field that the list does not draw, every committed cell waits for one findOne, whatever column was edited. The dialog can only open when the edited column is an operand of an askable field's requiredWhen, because the collector judges the change as the engine's transition gate: a predicate the change does not touch keeps its value and rests. A narrowing is available: skip the read unless columnKey is among those operands. Edge: a predicate on the clock or the user would break that equivalence. The PR body names the cost under "Readings I chose" ("only an object with a requiredWhen field the row lacks pays it"). Correctness is unaffected, so this is a nit.

② Semver level

patch on @object-ui/fields, @object-ui/plugin-kanban, @object-ui/plugin-grid, @object-ui/plugin-detail and @object-ui/i18n is still right. The new export is a non-protocol widening, Metadata-protocol: none is unchanged, and AGENTS.md (Post-Task Checklist 3) says such a change ships patch. No package newly publishes a change, so the package list is complete.

Clause-②: yes (widening) is right. The line was updated in both the changeset and the PR body to name requiredWhenPromptReads, and it still says nothing was removed or renamed. That matches D1 (extended) and D2. No BREAKING banner, migration or ADR-0087 disposition is owed. Check Changeset and PR-body guards are green on this head.

③ Boundary flags

The earlier flags carry over, with two updates:

New dev flags:

  • B9 · answered, accepted, with F4. "When the list must read the record first, the commit waits for that read." This is declared, and a failed read degrades to the pre-card behaviour (the server judges the write). F4 is the narrowing that would cut the wait to the changes that can ask.
  • B10 · answered, accepted. The dev chose the re-read over widening the list's two projections (objectGridRowLoad.ts#getSelectFields, ListView.tsx#selectFields). The reason given: nothing is read on an object without requiredWhen, and the judgment uses the values stored at the moment of the change, not at the list's last fetch.

open_questions: none. The 维护者速读 still says 「需要你决定的:无」.

SQL push-down (Prime Directive 5): no finding. The new read is a single by-id findOne with $select set to the keys the row lacks. It only names declared fields, and only for rows that lack them. The server does the projection, row-level security applies there, and the client materialises no id list and builds no join. The alternative of widening the list query was weighed and declined with a reason (B10). The record page adds no read.

Implemented-by: claude/project-thread-4on43b
Reviewed-by: session_01L6bhgUkbQqRUUFSiu2HGob

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T07:57Z · #35956 PR 1: a change that makes other fields required asks for them in place, in list cells and on the record page, and saves both together. Clause-②: yes (widening), now also naming the new @object-ui/fields export requiredWhenPromptReads. The seat's declaration-face L2 at TIER_DEFAULT read PASS on 59fb5217 (record 7059523805: F1 should-fix, F2 and F3 nits), then delta PASS on 9a473a0c (this head): F1, F2 and F3 closed, one new nit F4. L1-a delta ACCEPT 7059541741 on the same head: M1 and S1 closed, nit N3. N3 and F4 are the same finding, the list's pre-read before a commit whose column no predicate reads, filed as #36025. check-governed-merges --pr 35994 reads NOT governed (+1913/−394). K read by hand: 9 since the merge base, under 15, and main since then touches neither translations/ nor skills/. On this head, 54 check-runs are success, 12 are skipped and none failed; mergeable clean. The seat readies this PR and arms auto-merge in the same step. The PR carries Part of #35956; the record drawer fill-in is #35995.

Merged via the queue into main with commit 9a98a46 Nov 21, 2026
67 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-4on43b branch November 21, 2026 08:18
github-merge-queue Bot pushed a commit that referenced this pull request Nov 21, 2026
…entre of the list (#36021)

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

repo:objectstack#1 · os-sales · session_01L6bhgWRZyWba1HhfWN7hKy

Fixes #35678

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

## 维护者速读

- 勾选行后,列表区域底部居中浮起一条小栏:「已选 N 条」和 ×,最多 3 个带文字的操作,其余进「更多」;操作不超过 3
个时全部是按钮(只有删除时删除就是按钮)。
- 栏浮在合计行之上,列表末尾留出空间让最后一行完整露出;整页勾满且还有更多匹配时出「选择全部 N 条」;× 或 Esc
清空。页面顶部不再随勾选变化。
- 主列表、子表页签、侧边记录、嵌入表格共用这一条栏;旧的底部条和视图栏的「已选」face
都删了。列表页上只勾一条时显示这条记录自己的操作(行上没有操作列);其他位置一律显示批量操作。
- 风险:动了 ObjectGrid、data-table、列表页头三个热文件;浏览器 spec 跑出两个真问题已修(详见
Verification)。三个 i18n 键因此不再被读,留作后续卡。

## What changes

**One floating selection bar**
(`ui/packages/plugin-grid/src/components/SelectionBar.tsx`, replacing
`SelectionPageBar.tsx` and the old strip in `BulkActionBar.tsx`):

- Count chip 「已选 N 条」 and ×, then up to `SELECTION_EXPOSED_ACTIONS = 3`
labelled actions, the rest behind 「更多」. When the selection offers no
more than three actions, every one is a button, Delete included
(`planExposedEntries`). Over three, the first three non-destructive
actions are buttons and Delete goes behind 「更多」, last.
- A narrow host gives actions back to 「更多」 one at a time until the bar
fits on one line (`useFittedCount`). It re-measures when the host's
width changes and when the bar's own box changes (a font or stylesheet
that arrives late).
- 「选择全部 N 条」 shows when every loaded row is selected and more match.
Over the 5000 cap, the offer, the chip and the chip's title name the cap
(#28552 strings, unchanged).
- × clears the selection. Esc clears it unless the key belongs to a
field, or to another open dialog/menu/listbox/popper that does not hold
the bar. A grid inside the record drawer still clears on Esc.
- Look: `bg-popover`, rounded, shadow. In dark mode the border is
`dark:border-foreground/20`, so the edge stays visible.

**Where it floats** (no inline styles; utility classes only):

- Flat table: a new runtime slot `DataTableSchema.floatingBar`
(`ui/packages/types/src/data-display.ts`, refused by the zod twin with
`handlerKeyRefusal` like the other runtime slots, KnownDrift ledger
updated). `data-table.tsx` draws it in a zero-height sticky anchor after
its scroll box, 12px above the bottom, or above the summary row when one
is drawn. It also adds a spacer row (`data-table-floating-bar-room`)
after the last row, so that row scrolls clear of the bar.
- Card face, grouped cards, grouped table: `FloatingSelectionBarAnchor`,
drawn right after the face's scroller, with `pb-16` room inside the
scroller.
- Because the anchor sits outside the scroller, the bar holds at the
bottom of the page's own scroller when the face grows with its rows (a
child-table tab, the side record). It sits at the scroller's bottom when
the face is height-bounded (the list page).

**One bar everywhere:**

- `ObjectGrid` draws the same bar on every face. The portal into the
page header and the bottom strip are gone.
- `useListPageBarHost` / `ListPageBarState` (never published; absent
from `@object-ui/plugin-grid@18.6.0`) are replaced by
`useListPageScope(scope)` (`listPageScope.ts`). The list page registers
its page column with it. A grid inside it draws no row-end controls
(#35554) and, with one record selected, offers that record's actions in
the bar (`singleRowMenu`, in row-menu order, Delete last).
- Outside the list page the rows keep their own menu, and the bar offers
the bulk actions at any count.
- `objectViewPageHeader.tsx`: the page header and the view bar no longer
hide or swap on selection.

**Phone (card item 9):**

- Below 768px the grid draws cards, and the same bar floats over the
card scroller, centred, on one line.
- List pages draw no phone bottom menu (`PhoneAppNavBar` is drawn only
on Home/Notifications/Approvals), so there is nothing to replace there.
- The ways into selection on a phone are #35883's (seat note), and they
land on this bar.

**Context menu:** unchanged.

**Not changed (reading accepted in the claim):** the non-grid ListView
strip (kanban and the other non-grid views) keeps its own bar.

## Tests

Rewritten, because they asserted the retired faces:

- `plugin-grid/src/__tests__/BulkActionBar.test.tsx`: fully rewritten.
Old cases: the cross-page banner ("All N on this page are selected"),
"Clear" text and the banner's clear. New cases: `planExposedEntries`
(budget 3; all exposed at or under budget, Delete included; over budget
the first admitted three; a narrower fit returns trailing entries in
order), `singleRecordEntries` order, Delete-only → button, 3 vs 4+
actions, More contents (Delete last), one-record actions, 「Select all
N」, the all-matching count, ×, Esc with the field / other-layer
exceptions, Esc inside the dialog that holds the bar.
- `plugin-grid/src/__tests__/listPageBarSlot-35554.test.tsx` →
`selectionBar-35678.test.tsx`. Removed: "two rows selected: … Cancel
restores the page bar" and "CONTROL: a grid with no page bar keeps the
bottom bulk bar". Added: the bar floats in the table with one record's
actions, the room row comes and goes with ×, Esc clears, and with no
list-page scope the same bar shows bulk actions. Kept: no Actions
column, Shift-extend, right-click.
- `BulkActionBar.selectAllMatchingCap-28552.test.tsx`,
`bulkActionRefresh.test.tsx`, `bulkFanoutHostParams.test.tsx`,
`plugin-list/…/ListView.crossPageSelectAll.test.tsx`: banner assertions
became assertions on the count chip's text and `title`. The offer reads
`Select all N` (`grid.selectAllTotal`).
- `app-shell/…/ObjectView.bulkWiredHeaderDuplicate-12462.test.tsx`: the
selection face testids became the bar's (`bulk-actions-bar`,
`bulk-selection-clear`).
- `ui/e2e/list-no-actions-column-35554.spec.ts`:
- Rewritten: the two-rows case (it asserted the page header hides and
that nothing floats over the rows; it now asserts the opposite), the
one-row case and the select-all case.
- Added: 8 cases for the bar on the list page, a child-table tab and the
side record, in light and dark, plus 375px.
- `examples/app-showcase/e2e/bulk-capability-gate.spec.ts`: three
exposed defs instead of two.

Only import paths changed (`../components/SelectionBar`):
`BulkActionBar.deleteLabel.zh-28910`,
`BulkActionBar.regionName.zh-12145`, `bulk-action-visible`,
`bulkActionCapabilityGate`, `lookupPredicateParity`.

Added: `types/…/data-table-declared-keys-6882.test.ts` pins
`floatingBar` as declared with type `React.ReactNode`.
`zod-mirror-parity.test.ts` lists it in the DataTableSchema drift entry.

## Acceptance notes

1. Bottom centre of the list area, 「已选 N 条」 + ×, ≤3 labelled actions,
rest in 「更多」, a single action is a button: yes (e2e measures the bar's
centre against the scroll box's, ±1px).
2. Above the footer calc row, last row fully visible: yes (e2e: bar
bottom ≤ tfoot top; after scrolling to the end, the last row's bottom ≤
the bar's top, on the list and on the child tab).
3. Top of the page does not change: yes (e2e: `page-header` stays
visible).
4. × / Esc clear; 「选择全部 N 条」 when the page is all selected: yes.
5. One bar for main list, child tabs, side record, embedded tables; old
strip and page-bar face retired: yes.
6. Phone: the bar works at phone width over the card face; list pages
have no bottom menu to replace.
7. Context menu unchanged: yes (right-click e2e case kept).
8. Dark theme edge; 375px no wrap/overflow: yes (e2e: border ≠
background in dark; at 375px `scrollWidth ≤ clientWidth`, height 44,
inside the window).

Follow-up, not in this PR: `grid.bulkAllOnPage`,
`grid.bulkSelectAllMatching` and `grid.selectedAllLoaded` are no longer
read by any source. Retiring them from the 11 packs is a separate i18n
card.

## Verification

- Unit: `pnpm exec vitest run packages/plugin-grid packages/plugin-list
packages/components/src/renderers/complex` (cwd `ui/`): 517 files, 4837
tests, all pass. `packages/types/src/__tests__` + data-table renderers:
432 files, 10784 tests, all pass. `packages/i18n/src/__tests__` +
console `registry-inputs-spec-parity`: all pass. `packages/cli`
i18n-bulk-action-coverage / i18n-walk-output-parity and `packages/lint`
i18n-walk: pass.
- Type check: plugin-grid, components, types (`tsc --noEmit` + test
configs), `type-check:e2e`: clean.
- Browser (Chromium, real components bundled by Vite from source, real
Tailwind): `ui/e2e/list-no-actions-column-35554.spec.ts`, 24 of 24 pass,
before and after merging `main`. Two defects the jsdom tests could not
see were found and fixed:
1. With the anchor inside a scroller that grows with its rows (a child
tab, the side record), the bar sat at the end of the rows instead of the
bottom of the window. The anchor now sits after the scroller.
2. At 375px a stylesheet that arrived after the bar drew left it
overflowing. The fit now re-measures on the bar's own resize.
- Screenshots (main list, child tab, side record; light and dark; 375px)
are kept with the card thread's evidence.
- Derived gates: `node scripts/pm/dispatch-gates.mjs --ran`: 63 derived,
62 run and exit 0, 1 NOT-MEASURED (`check:dual-build-cjs-loads` exit 3:
it needs dists of server packages this diff does not touch; CI builds
them).
- `node scripts/pm/overlap-check.mjs`: clean against `origin/main`,
#35994 and #35983.

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

https://claude.ai/code/session_01L6bhgWRZyWba1HhfWN7hKy

---------

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