Uh oh!
There was an error while loading. Please reload this page.
fix(spec): COMPONENT_NODE_VISIBILITY_GUIDANCE no longer claims a hoisted properties visibility key is evaluated by nothing - #11390
Merged
Conversation
…claims a hoisted properties visibility key is evaluated by nothing `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
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-steve
marked this pull request as ready for review
August 23, 2026 15:35
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#11033
What was false, and why it mattered
COMPONENT_NODE_VISIBILITY_GUIDANCE'sprescriptioninpackages/spec/src/ui/component.zod.tsis not a docblock — it is theuser-facing text emitted to an author the moment the
COMPONENT_NODE_VISIBILITY_KEYSguard refuses a visibility key (
visible/visibleWhen/…) written insideproperties. It said:That was true when it was written and stopped being true when objectui#5505
(
c86185eb5, merged 2026-08-21) boundrecordintoSchemaRenderer'snode-level
visibleWhenevaluator. Post-#5505 the hoisted value isevaluated by the node-level gate — both gates evaluate the same value over
the same
RecordContextand compose as an idempotent AND. An author (or anAI agent generating metadata) that trusted the old sentence would reason
about the wrong gate.
The fix
Per the triage dispatch clause on #11033, this is a prose-truth repair,
not a guidance redesign:
canonical-spelling / layer-discipline reason (
visibleWhenbelongs on thenode, beside
typeandid), not on the props-level form being inert.post-objectui: the shadcn
Sheet/Dialogprimitives ship a hardcoded EnglishClosesr-only label — every drawer and modal in the console announces it untranslated #5505 truth, in the card's own measured wording: the hoisted form ISevaluated by the node-level gate since objectui#5505; the two gates
evaluate the same value and compose as an idempotent AND.
COMPONENT_NODE_VISIBILITY_KEYS's key set, and everything it refuses, isunchanged.
Diff is confined to the one
prescriptionstring (packages/spec/src/ui/component.zod.ts),plus a patch changeset.
Out of scope
content/docs/protocol/objectui/layout-dsl.mdx'shasRoleclaim, named as aseparate adjacent finding in #11033 — not touched here.
Verification (all at
819e30500e)pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated— all 14 generated artifacts still up to date; nothing extracts this
prescriptionstring into a generated artifact.git grepfor"evaluated by nothing" / "hoisted onto the node by the renderer" /
COMPONENT_NODE_VISIBILITY_GUIDANCEfinds only this one file before andafter) — nothing to update.
pnpm --filter @objectstack/spec test(full package suite) — 419/419 testfiles, 11136/11136 tests passed.
pnpm --filter @objectstack/spec typecheck—tsc --noEmit+check:scripts-typecheck+check:test-typecheckall clean; thepre-existing shrink-only test-typecheck debt (55 files / 263 errors,
@ts-expect-error退役 pin 在packages/spec里是幽灵检查:tsconfig 把**/*.test.ts排除出唯一的tsc --noEmit#5286) is untouched by this diff.node scripts/pm/dispatch-gates.mjson this diff names 22 local gatefamilies (17 before the changeset existed, 5 more once it did — the
changeset self-tests,
check:objectui-changeset, ADR-0087 registration,no-major, and empty-changeset checks). All 22 ran green, with one
worktree-environment caveat:
check:doc-formula-expressions(
packages/lint) failed once on a stale@objectstack/formula/distinthis fresh worktree, unrelated to this diff, and passed once that
dependency was built.
check:dev-prereqs's EXISTENCE half needs the full67-package workspace built (a
pnpm devpreflight, not a per-diff check)and stayed red in this partially-built worktree independent of any
change; its FRESHNESS half (the part that reads
packages/spec/dist) issatisfied by the
pnpm --filter @objectstack/spec buildabove. Fullcommands and exit codes are in the dev report comment on
COMPONENT_NODE_VISIBILITY_GUIDANCEstill tells authors a hoistedpropertiesvisibility key is "evaluated by nothing" — false since objectui#5505 landed, and it is user-facing parse-error text #11033.node scripts/check-adr-0087-registration.mjsconfirms this changeset iscorrectly non-breaking (no ADR-0087 disposition marker required).
Generated by Claude Code