Repository navigation
fix(app-shell): the metadata-admin designer reads and writes visibleWhen only (objectui#12696) - #12770
Conversation
…hen only The view anchor's create schema wrote the retired form-view `visibleOn` on its `kind` / `formType` pickers, and SchemaForm's `readVisibility` folded it back in with `visibleWhen ?? visibleOn` over every FormView section, field and raw create property. Both halves now speak `visibleWhen` only: the anchor writes it, the reader drops the fold, `FormFieldSpec` / `FormSectionSpec` drop their `visibleOn` member, and `CONDITION_FIELD_NAMES` drops the name (no bundled authoring form declares a property called `visibleOn`). Doc-comment prose that called the predicate `visibleOn` is re-spelled. Claude-Session: https://claude.ai/code/session_011Nr8s6FN4wcgqMHMM7oZk4 Co-authored-by: Claude <noreply@anthropic.com>
…signer-visiblewhen
…ibleWhen objectui#12745 has merged, so the last doc comment that called the form-view predicate `visibleOn` is re-spelled with the others. Claude-Session: https://claude.ai/code/session_011Nr8s6FN4wcgqMHMM7oZk4 Co-authored-by: Claude <noreply@anthropic.com>
…them `FormSectionSpec` / `FormFieldSpec` no longer declare `visibleOn`, so the objectui#12654 pins that hand `buildSections` a raw section and a raw field carrying it now mark that literal with `@ts-expect-error`. The runtime assertion (the retired spelling reaches no row) is unchanged. Claude-Session: https://claude.ai/code/session_011Nr8s6FN4wcgqMHMM7oZk4 Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Face: narrowing. Check-runs on this head, read after the last one completed at 2026-10-16T19:25Z: 36 check-runs, 33 success, 3 skipped (Test (coverage), its shard matrix row, dependabot), 0 failure, 0 pending. Green by name: Type Check, Lint, Repo Gates, Test and its 16 shards, Test (dist pins), Build and E2E, Build Docs, Bundle Analysis, Changeset Bump Policy, Changeset Declaration, Changeset Claim Re-read, Changeset Fixed Group Check, Changeset Overwrite Report, Governed Surface Queue Guard, Line Citation Gate, Live E2E (informational), label. ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 · ACCEPT ·
|
Fixes #12696
Clause-②: no (narrowing)
Summary
The metadata-admin designer was the last reader and writer of the form view's retired
visibleOnpredicate. objectui#12654 (PR #12692) had already removed it from the console form page, plugin-form andSchemaRenderer. After this PR the designer reads and writesvisibleWhenonly:anchors.tswritesvisibleWhen: "data.viewKind == 'list'"/'form'on the view create schema'skindandformTypepickers.SchemaForm'sreadVisibilityreturnsnode?.visibleWhenand nothing else. The?? visibleOnfold is gone from all five call sites: flat create properties, sections, section fields, tab reachability and record-editor sub-fields.FormFieldSpecandFormSectionSpec(exported from the@object-ui/app-shellentry) drop theirvisibleOnmember.'visibleOn'stays inFormSectionSpec'sOmitlist, because the spec's inputFormSectiontype still carries it and would otherwise re-admit it.CONDITION_FIELD_NAMESdrops'visibleOn'. A*Whenproperty still gets the condition builder by name.visibleOnnow sayvisibleWhen, inpredicate.ts,view-schema.ts,page-schema.ts,report-schema.ts,mergeServerFields.ts,PageDefaultInspector.tsx,ViewVariantInspector.tsxandReportDefaultInspector.tsx. The last one is included because objectui#12745 merged before this branch'sorigin/mainmerge.The narrowing (what a host sees)
A host that passes
visibleOntoSchemaForm, on a FormView section, a section field, a record sub-field or a raw JSONSchema property, now sees that node shown unconditionally. This matches the runtime form. A typed object literal that setsvisibleOnon aFormFieldSpecorFormSectionSpecno longer compiles (TS2353). The fix is one rename: writevisibleWhen. The predicate value keeps the same shape. The changeset says the same.Measurements behind each step
packages/orapps/writesvisibleOninto a FormView or a create schema that SchemaForm reads. The 17 authoring FormViews the bundled spec exports (viewForm,pageForm,reportForm,objectForm,fieldForm,actionFormand others) carry 0visibleOnnodes and 89visibleWhennodes.visibleOn, whilevisibleandvisibleWhendo appear (the positive control). The spec's JSON schemas still describe a deprecatedvisibleOnproperty onFormSection/FormField, but no designer form surfaces that position. So the entry had no named producer and is dropped.@objectstack/spec18.0.0-next.2 still acceptsvisibleOnas a deprecated alias that it folds intovisibleWhenat parse. objectstack main turns it into aretiredKey. Either way, a parsed form reaching the designer carriesvisibleWhen.Tests
view-create-body.visibility.test.tsx(new) renders the real registered view create schema and flipsviewKind. Each picker shows only for its own family.SchemaForm.visibleWhen.test.tsxsuite named "retiredvisibleOnis not read (objectui#12696)" replaces the old alias suite. A section and a field carrying onlyvisibleOnare not hidden. The same predicates undervisibleWhenare hidden. A raw create property carrying onlyvisibleOnis not hidden.view-create-body.test.tspinsvisibleWhenon both pickers and the absence ofvisibleOn.form-spec.containers.test.tsxPIN J refusesvisibleOnon both types at compile time.visibleWhen; they only used the alias.visibleOnmakes 2 cases fail.visibleOnonFormSectionSpecmakestsc -p tsconfig.test.jsonfail with exactly one TS2578, at PIN J.visibleOn,readVisibility,FormFieldSpecorFormSectionSpec: 40 files, 889 passed, 1 skipped.@object-ui/app-shelland@object-ui/consoletype-check: both green.Outside the claimed file surface (forced by the narrowing)
apps/consoletests that build these types from object literals:FormPage.fieldSpec.test.tsandFormPage.viewSpec.test.ts: thevisibleOnline is dropped from the "was undeclarable here" literal.FormPage.conditionalRules.test.tsxandFormPage.visibleWhen.test.tsx(form, react, types, console: spec 18 refuses the view form'svisibleOnand the page component'svisibility(objectstack#23543 F4) — readvisibleWhenonly, and re-point the spec-shape couplings before the next spec bump #12654's raw retired-key pins): one@ts-expect-errorline each. Their runtime assertion is unchanged.conditionScope.tsand its test's prose: the restated name list dropsvisibleOn.Acceptance notes
visibleOnprose left outside this surface:packages/app-shell/src/views/RecordFormPage.tsx("per-fieldvisibleOnpredicates (Form-view FormField.visibleOn (CEL) is never evaluated — conditional fields always render #2212)");apps/console/README.md("visible/visibleOn— Expression-based visibility conditions");packages/plugin-form/README.mdtable row documentingvisibleOn.retiredKeyon objectstack main) closes with the next spec bump.Provenance: built by the cloud session
session_011Nr8s6FN4wcgqMHMM7oZk4(claim6221456246) and opened by thedomain:uiseat 1 PM (session_011K9g23W67dy2zwnyzaoB6o) from that session's final message, because a cloud session cannot open a PR from its container. The seat replaced the dev's own footer line with this line.Generated by Claude Code