Uh oh!
There was an error while loading. Please reload this page.
docs(objectui): replace the phantom field-level visible key with the keys that exist - #13094
Merged
Conversation
…e keys that exist `FieldSchema` and `FormFieldSchema` are strict objects that refuse `visible` by name, before either documented value shape is reached. Rewrite the two protocol pages onto the keys that are really declared: - concept.mdx section 3: `visibleWhen` (CEL predicate over `record`), plus a callout naming the polarity trap (`hidden` is INVERTED). - layout-dsl.mdx "Responsive Layout Modifiers": no field-level breakpoint visibility exists in the spec at all, so the `desktop`/`tablet`/`mobile` map and the adjacent `portrait`/`landscape` `columns` map are removed rather than renamed; the section now documents `responsiveStyles` on a page component, which is the only per-breakpoint channel that is actually applied. No spec change: objectui#6514's maintainer ruling declined adding a field-level `visible` key to the contract.
os-elon
marked this pull request as ready for review
August 29, 2026 05:16
os-elon
enabled auto-merge
August 29, 2026 05:16
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 29, 2026
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#12935
Docs-only, two files, no spec change. objectui#6514's maintainer ruling of 2026-08-27
declined adding a field-level
visiblekey to the contract, so the docs are the sidethat is wrong.
The premise re-measured, and it holds
The card measured 3 occurrences across 2 files at
aef1b7e641e7. Re-measured on today'smain(db39dfc1c9b0), the field-level population is unchanged at 3 — no fourthoccurrence, so the class is not being newly introduced. The markdown population is also
still 453 files, matching the card's scan.
FieldSchemaandFormFieldSchemaare both strict objects that declarehiddenandvisibleWhenand notvisible, so the key is refused by name, before eitherdocumented value shape is reached. Confirmed from the generated reference tables, which
are rendered from the spec rather than hand-written:
content/docs/references/data/field.mdx—visibleWhenat line 105,hiddenat 110,no
visiblerow.content/docs/references/ui/view.mdx—FormSection.fields[number]declareshidden,visibleWhenand the deprecatedvisibleOn; novisible, and no breakpoint key.Instrument dual: the same
grepover the same generated corpus returns manyvisiblerows on
action.mdxandapp.mdx(where the key really is declared), so the zero onfield.mdxis a reading rather than an instrument failure.The two edits
concept.mdxsection 3 now teachesvisibleWhenwith a CEL predicate overrecord,plus a callout naming the polarity trap the card flagged —
hiddenis INVERTED, sovisible: falsebecomeshidden: true, which is the mechanical repair an author is mostlikely to get backwards.
The card's suggested repair was verified before it was written, not assumed:
FieldSchema.visibleWhen's own description is "Predicate (CEL) — field is shown onlywhen TRUE (else hidden). e.g. P-backtick-
record.type == 'invoice'", so arecord.shipping_requiredpredicate is expressible. The example useshas()to guard theunset case, because an unbound reference faults and visibility's documented fallback is
"shown" — an unguarded predicate would show the field in exactly the case the example is
teaching you to hide it.
layout-dsl.mdx"Responsive Layout Modifiers" is rewritten rather than renamed,because there is nothing to rename onto. Measured: this repo's spec declares no
field-level breakpoint visibility at all.
responsiveStyles(ADR-0065) is the onlyper-breakpoint channel and it lives on a page component
(
packages/spec/src/ui/page.zod.ts:185), never on a form field or section.hiddenOnwas a key of the
responsivelayout block, retired at protocol 18 under ADR-0049 D2as authorable-and-inert —
packages/spec/src/ui/responsive.zod.tskeeps it only asguidance text pointing at the CSS translation.
So rewriting the example to
hiddenOn— the card's first option — would have documenteda key that is both objectui-tier and retired-as-inert here: a new defect of exactly the
family this card is about. The section now states that responsive behaviour is not a
field or section key, documents
responsiveStyleson a page component, and records theremoval in a callout — the same shape this page already used for the previous sweep of
this family (the
lazy/source/badgecallout above it).The page now agrees with itself. Its own "Visibility Rule" section, 300 lines below,
already said breakpoint show/hide is
responsiveStylesand thatresponsive.hiddenOnwas retired. The two halves contradicted each other until this change.
One bounded in-place repair, declared
The adjacent "Orientation-Specific Layout" example —
columns: { portrait: 1, landscape: 2 }on a section — is removed in the same edit. It is inside the H2 being rewritten, andleaving it would have left a heading called "Responsive Layout Modifiers" whose only
remaining content was another phantom responsive shape. The correct form is pinned by
generated evidence, not by judgment:
content/docs/references/ui/view.mdx:293declaresFormSection.columnsasEnum<'1'|'2'|'3'|'4'> | 1|2|3|4— a scalar, never a map. Sametwo files, same gate family, no new verification surface.
What was deliberately NOT repaired
Four further
visible:occurrences survive in these two files at other tiers, filedas #13087 rather than folded in, because they are not this card's defect:
layout-dsl.mdx:363,369— section tier, key refused by name. The correct spelling is onthe same page, but one of the two examples is a
permission: admingate, and rewritingit as a
visibleWhenrole test would teach the anti-pattern the spec explicitly warnsabout (nothing server-side evaluates a form-view section predicate, and it faults open
on the public form route). That needs a documentation decision, not a rename.
concept.mdx:592,595— action tier, wherevisiblegenuinely is a declared key(
action.mdx:84: boolean, CEL string, or envelope). The defect there is the filter-objectvalue, a different mechanism. Folding it in would have made this PR's own claim false.
Also filed: #13086 — the reason this class survives sweeps.
check:skill-examplesisthe only gate that compiles doc prose against the spec, and it reads only
ts/tsxfences, opt-in by marker. YAML fences — where every metadata authoring example lives —
are outside its population by construction. This page survived two prior hand sweeps of
the same family (#8251, #8306) for that reason.
Verification
Full derived gate family re-run at head
cafc34c344, after mergingorigin/mainandrebuilding (
turbo run buildfor spec / lint / formula / client / client-react).The family is
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack,re-derived on the synced tree — the first derivation printed STALE TREE while still
exiting 0, and one of the files it named stale was
scripts/docs-audit/affected-docs.mjs,a family directly relevant here. Re-derived after the merge the warning is gone and the
25-family list is byte-identical.
24 of 25 green. Verdict lines, quoted from the gates themselves:
check:doc-anchors— "279 internal #fragment link(s) across 410 source file(s) allresolve to a real heading" (this one caught two ADR filenames I had guessed wrong;
both corrected to the real files).
@objectstack/spec check:docs— "231 generated files in sync with packages/spec"check:skill-examples— "260 prose examples type-check across 3 surface(s)"check:docs-audit-scope— "docs-accuracy-audit scope is in sync with content/docs/:189 hand-written doc(s)"
check:role-word— "OK, no new occurrences of the reserved word"check:nul-bytes— green. Not in the derived family; added because any edit owes it.Independent control-byte scan of both files is also clean, with a positive control
proving the scanner returns a hit on a file that does carry one.
The 25th,
scripts/check-test-completeness.mjs, is NOT MEASURED locally rather thanred: it takes a turbo test log as its argument and only runs meaningfully inside CI's
Test Corejob. Its exit 1 is the usage message.scripts/docs-audit/affected-docs.mjsreports "0 docs name something this change touchedacross 0 changed package(s)" — expected, since the diff touches no package source.
Repo-wide eslint, narrowed and proved
pnpm lintwas not run. The narrowing is a measurement, not a skip: read from eslint'sown config via
ESLint.isPathIgnored, both changed files returntrue(outside thematched population), while the control
scripts/check-doc-anchors.mjsreturnsfalse.Since the two files are not in eslint's population at all, this diff cannot move an
eslint verdict on any file, touched or untouched.
No changeset — derived, not assumed
skip-changesetapplies, proved rather than asserted: 69package.jsonfiles in theworkspace declare a
fileswhitelist and not one contains an entry matchingcontentor
docs;content/is not covered by anypnpm-workspace.yamlpackage glob and carriesno
package.json. Nothing in this diff is published by any package, so the PR releasesnothing. The diff touches no
skills/**path, so no published-skill line budget applies.Generated by Claude Code
Generated by Claude Code