Skip to content

Commit 7f20b88

Browse files
committed
chore(spec): classify fieldGroups.requiresFeature in liveness, offer it on the object form, regenerate api-surface and export-origins
Claude-Session: https://claude.ai/code/session_016WV4cyCnzVPr9GuD38DdGt Co-authored-by: Claude <noreply@anthropic.com>
1 parent 66216b8 commit 7f20b88

9 files changed

Lines changed: 27 additions & 1 deletion

File tree

‎packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ export const enMetadataForms: NonNullable<TranslationData['metadataForms']> = {
112112
label: "Visible When",
113113
helpText: "CEL predicate over the record (e.g. record.type == 'invoice') — the entry form shows the whole group, header included, only while it is TRUE."
114114
},
115+
"fieldGroups.requiresFeature": {
116+
label: "Requires Feature",
117+
helpText: "Deployment feature the group needs (e.g. multiOrgEnabled): where it is off, the entry form and the record detail page hide the whole group. Combined with Visible When, the group shows only while both hold. The fields stay readable through the API."
118+
},
115119
fields: {
116120
label: "Fields",
117121
helpText: "Add the columns this object will store"

‎packages/platform-objects/src/apps/translations/es-ES.metadata-forms.generated.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ export const esESMetadataForms: NonNullable<TranslationData['metadataForms']> =
112112
label: "Condición de visibilidad",
113113
helpText: "Predicado CEL sobre el registro (p. ej., record.type == 'invoice'): el formulario de entrada muestra el grupo entero, encabezado incluido, solo mientras sea TRUE."
114114
},
115+
"fieldGroups.requiresFeature": {
116+
label: "Requiere función",
117+
helpText: "Función del despliegue que necesita el grupo (p. ej., multiOrgEnabled): donde está desactivada, el formulario de entrada y la página de detalle del registro ocultan el grupo entero. Junto con Condición de visibilidad, el grupo solo se muestra mientras se cumplen ambas. Los campos siguen siendo legibles a través de la API."
118+
},
115119
fields: {
116120
label: "Campos",
117121
helpText: "Añade las columnas que almacenará este objeto"

‎packages/platform-objects/src/apps/translations/ja-JP.metadata-forms.generated.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ export const jaJPMetadataForms: NonNullable<TranslationData['metadataForms']> =
112112
label: "表示条件",
113113
helpText: "レコードに対する CEL 述語(例:record.type == 'invoice')。TRUE の間だけ、入力フォームに見出しを含むグループ全体が表示されます。"
114114
},
115+
"fieldGroups.requiresFeature": {
116+
label: "必要な機能",
117+
helpText: "このグループに必要なデプロイ機能(例: multiOrgEnabled)。オフのデプロイでは、入力フォームとレコード詳細ページでグループ全体が非表示になります。「表示条件」と併用すると、両方が成り立つときだけ表示されます。フィールドは API から引き続き読み取れます。"
118+
},
115119
fields: {
116120
label: "フィールド",
117121
helpText: "このオブジェクトが保存する列を追加"

‎packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ export const zhCNMetadataForms: NonNullable<TranslationData['metadataForms']> =
112112
label: "可见条件",
113113
helpText: "基于记录的 CEL 谓词(例如 record.type == 'invoice')——仅当其为 TRUE 时,录入表单才显示整个分组(包括标题)。"
114114
},
115+
"fieldGroups.requiresFeature": {
116+
label: "所需功能",
117+
helpText: "该分组需要的部署功能(例如 multiOrgEnabled):功能关闭时,录入表单和记录详情页隐藏整个分组。与「可见条件」同时设置时,两者都成立才显示该分组。分组中的字段仍可通过 API 读取。"
118+
},
115119
fields: {
116120
label: "字段",
117121
helpText: "添加该对象将存储的列"

‎packages/spec/api-surface/kernel.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@
377377
"RealTimeNotificationConfigSchema (const)",
378378
"RequiredAction (type)",
379379
"RequiredActionSchema (const)",
380+
"RequiresFeatureSlot (type)",
380381
"ResolvedDependency (type)",
381382
"ResolvedDependencySchema (const)",
382383
"ResolvedPackageDependency (type)",

‎packages/spec/export-origins/kernel.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@
376376
"RealTimeNotificationConfigSchema": "src/kernel/events/integrations.zod.ts#RealTimeNotificationConfigSchema (const)",
377377
"RequiredAction": "src/kernel/dependency-resolution.zod.ts#RequiredAction (type)",
378378
"RequiredActionSchema": "src/kernel/dependency-resolution.zod.ts#RequiredActionSchema (const)",
379+
"RequiresFeatureSlot": "src/kernel/public-auth-features.ts#RequiresFeatureSlot (type)",
379380
"ResolvedDependency": "src/kernel/dependency-resolution.zod.ts#ResolvedDependency (type)",
380381
"ResolvedDependencySchema": "src/kernel/dependency-resolution.zod.ts#ResolvedDependencySchema (const)",
381382
"ResolvedPackageDependency": "src/kernel/plugin-security.zod.ts#ResolvedPackageDependency (type)",

‎packages/spec/liveness/object.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@
110110
"evidence": "packages/spec/src/data/field-group-layout.ts#readGroup (carried verbatim, bare CEL or envelope); ui/packages/plugin-form/src/fieldGroups.ts#deriveFieldGroupSections (onto the form section, with `visibleWhenFault: 'hidden'`); ui/packages/plugin-detail/src/synth/buildDefaultPageSchema.ts#deriveFieldGroupDetailEntries (beside the detail section for `record:details` to evaluate per record)",
111111
"note": "ADR-0089 group predicate, fail-closed: FALSE hides the whole group, header included."
112112
},
113+
"requiresFeature": {
114+
"status": "live",
115+
"verifiedAt": "2026-11-06",
116+
"evidenceScope": "in-repo",
117+
"evidence": "packages/spec/src/data/object.zod.ts#ObjectFieldGroupSchema (the key, and the transform that lowers it); packages/spec/src/kernel/public-auth-features.ts#lowerRequiresFeature (lowered at parse into the group's `visibleWhen`, stripped from the output)",
118+
"note": "#30692, ruling 6670372892 on #30210 (row 4 A). Sugar for the flag's gate on `visibleWhen` (AND-composed after an authored predicate), from the same `PUBLIC_AUTH_FEATURES` set an action's `requiresFeature` names; no consumer ever reads the key itself. It is enforced where `visibleWhen` is (the row above): the form section gate and the record page's `record:details` evaluate a group predicate with the host's `features` root in scope (`usePredicateScope`), so the gate holds on both."
119+
},
113120
"collapse": {
114121
"status": "live",
115122
"verifiedAt": "2026-10-28",

‎packages/spec/liveness/state-counts/object.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ committed anywhere: `check:liveness` sums the shards when it reads them.
1212

1313
| Type | live | exp | elsewhere | dead | planned | classified |
1414
|---|---|---|---|---|---|---|
15-
| `object` | 77 | 0 | 0 | 1 | 0 | 78 |
15+
| `object` | 78 | 0 | 0 | 1 | 0 | 79 |

‎packages/spec/src/data/object.form.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export const objectForm = defineForm({
117117
{ label: 'Collapsed — collapsible, starts closed', value: 'collapsed' },
118118
] },
119119
{ field: 'visibleWhen', label: 'Visible When', type: 'code', language: 'expression', helpText: 'CEL predicate over the record (e.g. record.type == \'invoice\') — the entry form shows the whole group, header included, only while it is TRUE.' },
120+
{ field: 'requiresFeature', label: 'Requires Feature', helpText: 'Deployment feature the group needs (e.g. multiOrgEnabled): where it is off, the entry form and the record detail page hide the whole group. Combined with Visible When, the group shows only while both hold. The fields stay readable through the API.' },
120121
],
121122
},
122123
],

0 commit comments

Comments
 (0)