Follow-up to #2642 / #2900 (ADR-0089). D1 (canonical visibleWhen) + D2 (deprecated visibleOn/visibility aliases normalized at parse) have landed. This tracks D3a.
Goal
Per ADR-0049 (enforce-or-remove) and ADR-0078 (no-silently-inert), a mis-layered or stale visibility key must be a loud parse error, not a silent strip. Tighten the relevant object schemas with .strict() so e.g. a raw visibleOn surviving past the deprecation window, or a visibleWhen on a schema with no visibility semantics, fails validation.
Why it's staged separately
.strict() on FormFieldSchema / FormSectionSchema / PageComponentSchema rejects every unknown key, not just visibility ones — a large blast radius. The ADR requires sweeping the monorepo + example apps first, then flipping strict. That sweep is bigger than the alias mechanism and risky to land alongside it under parallel-agent development.
Tasks
References
Follow-up to #2642 / #2900 (ADR-0089). D1 (canonical
visibleWhen) + D2 (deprecatedvisibleOn/visibilityaliases normalized at parse) have landed. This tracks D3a.Goal
Per ADR-0049 (enforce-or-remove) and ADR-0078 (no-silently-inert), a mis-layered or stale visibility key must be a loud parse error, not a silent strip. Tighten the relevant object schemas with
.strict()so e.g. a rawvisibleOnsurviving past the deprecation window, or avisibleWhenon a schema with no visibility semantics, fails validation.Why it's staged separately
.strict()onFormFieldSchema/FormSectionSchema/PageComponentSchemarejects every unknown key, not just visibility ones — a large blast radius. The ADR requires sweeping the monorepo + example apps first, then flipping strict. That sweep is bigger than the alias mechanism and risky to land alongside it under parallel-agent development.Tasks
packages/+examples/(and platform metadata) for any keys these schemas currently strip silently; fix or file them..strict()(or a targeted unknown-key guard withUNKNOWN_KEY_GUIDANCEtombstones) to the view form + page component schemas.visibleOn/visibilityaliases still parse (they are declared keys, so strict must keep accepting them until removal).visibleWhen.References
docs/adr/0089-unify-visibility-predicate-naming.md)object.zod.tsUNKNOWN_KEY_GUIDANCEvisibleWhen#2642