You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Related-list toolbar “+ New” does not consume userActions.create predicates — spec 17.0.0 shipped the declaration half, the renderer half is missing (createPredicates produced but never consumed) #4646
@objectstack/spec@17.0.0 widened userActions.create from a plain boolean to z.union([z.boolean(), RowCrudActionOverrideSchema]) (spec src/data/object.zod.ts:1529, the #7692 family). The docblock defines the semantics: the create toolbar affordance is evaluated once against the record of the scope it sits in — on a record page's related list, that is the host parent record. The spec CHANGELOG entry for that change states explicitly:
"The renderer half — the related-list toolbar honouring create.visibleWhen — is objectui's downstream card and is not part of this change."
This is that downstream card: as of @objectstack/console@17.0.0 (stable), the renderer half does not exist.
Evidence (17.0.0 stable, dist-level survey)
Across the entire console dist, createPredicates appears exactly 2 times, both on the producer side — the data-adapter's resolveCrudAffordances output. There is zero consumption.
RecordDetailView's related-list toolbar affordance is still the old two-axis check: create: o.create && can(childObject, 'create') — per-object × per-user only. The component has the parentId (host record) in hand, but evaluates no predicate against it.
So for create, someone produces the predicates and nobody consumes them — the exact inverse-symmetry gap the spec CHANGELOG called out.
Motivating scenario (observed in a downstream EHR project)
A parent record enters a frozen state (published / deprecated):
Row-level Edit/Delete on the related list correctly grey out / hide via their predicates. ✅
The related-list toolbar “+ New” stays fully enabled. ❌ The user fills in the entire child form, submits, and only then gets a server-side 409 rejection.
This is precisely the motivation scenario described in the spec CHANGELOG entry for the userActions.create widening. (No security surface — the server gate holds — but the UI walks the user into a form that is guaranteed to fail, while sibling affordances on the same rows are correctly gated.)
Expected
The related-list toolbar consumes userActions.create.visibleWhen / disabledWhen, evaluated once against the host parent record (per the spec docblock), on top of the existing o.create && can(childObject, 'create') check — mirroring how editPredicates / deletePredicates are already consumed on the same surface.
Triage: pm:queue, type Bug. The spec CHANGELOG for the userActions.create widening names this exact downstream card; the renderer half is missing (createPredicates produced, zero consumers, vs ~15 consumption sites for edit/delete). Declared≠enforced restoration on a surface with the plumbing in hand (parentId available; mirror editPredicates consumption, evaluated once against the host parent record per the spec docblock). Serial note: shares the RecordDetailView/list-toolbar surface with #4647 — dispatch serially or to one dev.
Activity
os-zhuang commentedon Aug 17, 2026
Triage:
pm:queue, type Bug. The spec CHANGELOG for theuserActions.createwidening names this exact downstream card; the renderer half is missing (createPredicatesproduced, zero consumers, vs ~15 consumption sites for edit/delete). Declared≠enforced restoration on a surface with the plumbing in hand (parentIdavailable; mirroreditPredicatesconsumption, evaluated once against the host parent record per the spec docblock). Serial note: shares the RecordDetailView/list-toolbar surface with #4647 — dispatch serially or to one dev.Generated by Claude Code
yinlianghui commentedon Aug 18, 2026
认领(与 #4647 合单)(PM 派发,objectui 分片,批次 23):session_01GTRjn8xBqp75dk7kFupVRt,分支
claude/issue-4646-toolbar-action-gates,os-dev 席即将开工。按分诊席 serial note(两卡共享 RecordDetailView/list-toolbar 面)采合单先例:一席双卡,PR 用
Fixes #4646+Fixes #4647。本卡半:related-list toolbar「+ New」消费createPredicates(对 host parent record 求值一次,per spec docblock),镜像同面editPredicates的既有消费形。当前在飞席位为零,无文件冲突。Generated by Claude Code
fix(plugin-grid): gate ObjectGrid's inline add-record row on can(obje…
fix(app-shell,plugin-list): 关联列表「+ New」消费 create 谓词,行内编辑开关补 update 权限门 (
fix(app-shell,core): 对象列表工具栏 Import 消费 importPredicates (objectstack-…
fix(app-shell): object-list "New" and its mobile FAB consume createPr…
fix(plugin-grid): gate ObjectGrid's inline add-record row on can(obje…