Skip to content

spec-surface: alias guidance for visible/showWhen/disabled on the visibleWhen shapes — the reverse direction of the action shapes' existing table (#7816 ask 1) #7832

Description

@os-zhuang

Provenance: split out of #7816 (its "ask 1") by the triage seat — the standalone, no-behaviour-change half. #7816 itself keeps the canonical-spelling decision (its "ask 2"); this card does not depend on that ruling.

Scope

Give the visibleWhen-family strict shapes the same aliases curation the action shapes already carry in the opposite direction, so visible / showWhen / disabled written on the wrong surface produces an error that names the key the author should have used:

Mechanism, verified on origin/main @ 098b629

strictObject's aliases table is error-message curation only — "semantic near-misses edit distance cannot reach" (packages/spec/src/shared/strict-object.ts), and its own doc example is exactly this key pair in the other direction (aliases: { visibleWhen: 'visible' }). Nothing that parses today changes; acceptance is byte-identical before/after ⇒ domain:spec-surface under the acceptance-surface criterion; changeset patch.

Measured rejections today (from #7816, spec dist on main): field.visible, userActions.delete.visible, userActions.delete.disabled — none of the messages mention visibleWhen / disabledWhen / enabled.

Out of scope

Choosing ONE canonical spelling (widening any schema, the boolean arm, ADR-0087 retirement of either form, ADR-0089's reach over action shapes) — that is #7816's decision. If that ruling later converges the vocabulary, these alias rows remain the right rows: they then carry the migration hint.

Refs #7816 (parent question), #5970 (action-side visible unification), ADR-0089.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions