Skip to content

Commit dcb10a5

Browse files
os-steveclaude
andauthored
fix(spec): COMPONENT_NODE_VISIBILITY_GUIDANCE prescription no longer claims a hoisted properties visibility key is evaluated by nothing (#11390)
`COMPONENT_NODE_VISIBILITY_GUIDANCE`'s prescription — the user-facing text emitted when a visibility key (`visible`/`visibleWhen`/…) is authored inside `properties` instead of on the component node — said the hoisted value is "evaluated by nothing" and "silently does not gate". That was true when it was written and is false since objectui#5505 (`c86185eb5`, merged 2026-08-21): SchemaRenderer's node-level `visibleWhen` evaluator now binds `record`, so the hoisted value IS evaluated by the node-level gate; the two gates evaluate the same value and compose as an idempotent AND. The move-it-up advice stays — it now rests on the ADR-0089 canonical-spelling / layer-discipline reason (beside `type` and `id`), not on the props-level form being inert. Message text only: no schema shape change, no accept/reject verdict change. Claude-Session: https://claude.ai/code/session_01T9cDbY2NBiVJWYx3BpWfH2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 365e334 commit dcb10a5

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
fix(spec): `COMPONENT_NODE_VISIBILITY_GUIDANCE` no longer claims a hoisted `properties` visibility key is evaluated by nothing (#11033)
6+
7+
The `COMPONENT_NODE_VISIBILITY_KEYS` key-set guard's `prescription` — the text
8+
emitted to an author when a visibility key (`visible` / `visibleWhen` / …) is
9+
written inside `properties` instead of on the component node — closed with:
10+
11+
> Inside `properties` it is hoisted onto the node by the renderer but evaluated
12+
> by nothing — the component renders unconditionally, which is a visibility
13+
> gate that silently does not gate.
14+
15+
That was true when it was written and is false since objectui#5505
16+
(`c86185eb5`, merged 2026-08-21): `SchemaRenderer`'s node-level `visibleWhen`
17+
evaluator now binds `record`, so the hoisted value IS evaluated by the
18+
node-level gate. Post-#5505 the props-level and node-level forms evaluate the
19+
same value over the same `RecordContext` and compose as an idempotent AND —
20+
there is no gate that silently fails to gate.
21+
22+
The prescription now states that truth instead, and keeps its move-it-up
23+
advice resting on the reason that still holds: `visibleWhen` at the node,
24+
beside `type` and `id`, is the ADR-0089 canonical spelling — a layer-discipline
25+
argument, not an inertness one.
26+
27+
Message text only. No accept/reject verdict changes, no schema shape changes,
28+
and no runtime behaviour changes — both gates already evaluated the value
29+
identically before and after this change.

packages/spec/src/ui/component.zod.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,11 @@ const COMPONENT_NODE_VISIBILITY_GUIDANCE: KeySetGuidance =
275275
prescription:
276276
'Visibility is a COMPONENT-level predicate, not a prop: move it up one level to the '
277277
+ 'component node\'s own `visibleWhen` (ADR-0089 canonical spelling), beside `type` and '
278-
+ '`id`. Inside `properties` it is hoisted onto the node by the renderer but evaluated by '
279-
+ 'nothing — the component renders unconditionally, which is a visibility gate that '
280-
+ 'silently does not gate.',
278+
+ '`id` — one canonical spelling per layer, not because the props-level form is inert. '
279+
+ 'Since objectui#5505 (`c86185eb5`, merged 2026-08-21) the hoisted form IS evaluated by '
280+
+ 'the node-level gate: the two gates evaluate the same value and compose as an '
281+
+ 'idempotent AND, so leaving it in `properties` duplicates the canonical key rather '
282+
+ 'than silently failing to gate.',
281283
};
282284

283285
const COMPONENT_NODE_KEYS_GUIDANCE: KeySetGuidance =

0 commit comments

Comments
 (0)