Skip to content

Commit 1eddd89

Browse files
os-billclaude
andcommitted
wip(spec): refuse bare element:filter / element:form nodes by name
Source half of #15110: the two elements join RETIRED_PAGE_COMPONENT_TYPES with the element-grain tail of their own retiredKey tombstones, the typo suggester stops offering retired keys, and the prose the node refusal falsifies is corrected. Tests follow in the next commit. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
1 parent ef18030 commit 1eddd89

17 files changed

Lines changed: 189 additions & 68 deletions

‎packages/spec/src/conversions/registry.ts‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6801,11 +6801,13 @@ const elementInputTargetVariableRemoved: MetadataConversion = {
68016801
* them together.
68026802
*
68036803
* Pure lossless deletes — no key ever had an effect to lose. The component
6804-
* node itself is NOT removed: the open `type` union tolerates a bare inert
6805-
* node (nothing rendered it before either), and deleting authored page nodes
6806-
* is a layout decision a mechanical conversion must not make. The
6804+
* node itself is NOT removed: deleting authored page nodes is a layout
6805+
* decision a mechanical conversion must not make. The bare node it leaves is
6806+
* not the end state — `element:filter` is a member of
6807+
* `RETIRED_PAGE_COMPONENT_TYPES`, so the parse refuses it by name and the
68076808
* prescription tells the author to delete the component and use the list
6808-
* surface's own filtering instead.
6809+
* surface's own filtering instead. Mechanical where it can be, located where
6810+
* it cannot.
68096811
*/
68106812
const elementFilterRemoved: MetadataConversion = {
68116813
id: 'element-filter-removed',
@@ -6819,7 +6821,8 @@ const elementFilterRemoved: MetadataConversion = {
68196821
"the whole 'element:filter' element retired (#9220 — no renderer for it ever shipped in "
68206822
+ 'any repo, so every key was a capability claim nothing kept; list surfaces own their '
68216823
+ "filtering via a view's userFilters / the list filter builder). All six props are "
6822-
+ 'stripped; the bare node stays, inert as it always was',
6824+
+ 'stripped; the bare node the conversion leaves is refused by name at the parse, with '
6825+
+ 'the prescription to delete the component',
68236826
apply(stack, emit) {
68246827
return mapPageComponents(stack, (component, path) => {
68256828
if (component.type !== 'element:filter') return component;
@@ -6949,13 +6952,14 @@ const elementFilterRemoved: MetadataConversion = {
69496952
* together and this conversion strips them together.
69506953
*
69516954
* Pure lossless deletes — no key ever had an effect to lose. The component
6952-
* node itself is NOT removed: the open `type` union tolerates a bare inert
6953-
* node (nothing rendered it before either), and deleting authored page nodes
6954-
* is a layout decision a mechanical conversion must not make. The
6955+
* node itself is NOT removed: deleting authored page nodes is a layout
6956+
* decision a mechanical conversion must not make. The bare node it leaves is
6957+
* not the end state — `element:form` is a member of
6958+
* `RETIRED_PAGE_COMPONENT_TYPES`, so the parse refuses it by name and the
69556959
* prescription tells the author to delete the component and use the
69566960
* object-bound `object-form` block (#7751) instead — rendered,
69576961
* designer-publishable, and carrying the same intent (`objectName`, `fields`,
6958-
* `mode`, `submitText`).
6962+
* `mode`, `submitText`). Mechanical where it can be, located where it cannot.
69596963
*/
69606964
const elementFormRemoved: MetadataConversion = {
69616965
id: 'element-form-removed',
@@ -6969,7 +6973,8 @@ const elementFormRemoved: MetadataConversion = {
69696973
"the whole 'element:form' element retired (#9249 — no renderer for it ever shipped in "
69706974
+ 'any repo, so every key was a capability claim nothing kept; use the object-bound '
69716975
+ "'object-form' block instead — rendered and designer-publishable). All six props are "
6972-
+ 'stripped; the bare node stays, inert as it always was',
6976+
+ 'stripped; the bare node the conversion leaves is refused by name at the parse, with '
6977+
+ 'the prescription to delete the component',
69736978
apply(stack, emit) {
69746979
return mapPageComponents(stack, (component, path) => {
69756980
if (component.type !== 'element:form') return component;

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFilterProps__aria.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
// narrowings ride minor releases) and the prescription lives at the major
1919
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2020
// Sources are rewritten by the D2 conversion `element-filter-removed`, which
21-
// strips all six keys and leaves the bare node — inert as it always was.
21+
// strips all six keys and leaves the bare node — which the parse then refuses
22+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
23+
// component.
2224
export const entry = 'ui/ElementFilterProps:aria';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFilterProps__fields.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
// narrowings ride minor releases) and the prescription lives at the major
1919
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2020
// Sources are rewritten by the D2 conversion `element-filter-removed`, which
21-
// strips all six keys and leaves the bare node — inert as it always was.
21+
// strips all six keys and leaves the bare node — which the parse then refuses
22+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
23+
// component.
2224
export const entry = 'ui/ElementFilterProps:fields';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFilterProps__layout.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
// narrowings ride minor releases) and the prescription lives at the major
1919
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2020
// Sources are rewritten by the D2 conversion `element-filter-removed`, which
21-
// strips all six keys and leaves the bare node — inert as it always was.
21+
// strips all six keys and leaves the bare node — which the parse then refuses
22+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
23+
// component.
2224
export const entry = 'ui/ElementFilterProps:layout';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFilterProps__object.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
// narrowings ride minor releases) and the prescription lives at the major
1919
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2020
// Sources are rewritten by the D2 conversion `element-filter-removed`, which
21-
// strips all six keys and leaves the bare node — inert as it always was.
21+
// strips all six keys and leaves the bare node — which the parse then refuses
22+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
23+
// component.
2224
export const entry = 'ui/ElementFilterProps:object';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFilterProps__showSearch.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
// narrowings ride minor releases) and the prescription lives at the major
1919
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2020
// Sources are rewritten by the D2 conversion `element-filter-removed`, which
21-
// strips all six keys and leaves the bare node — inert as it always was.
21+
// strips all six keys and leaves the bare node — which the parse then refuses
22+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
23+
// component.
2224
export const entry = 'ui/ElementFilterProps:showSearch';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFilterProps__targetVariable.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
// narrowings ride minor releases) and the prescription lives at the major
1919
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2020
// Sources are rewritten by the D2 conversion `element-filter-removed`, which
21-
// strips all six keys and leaves the bare node — inert as it always was.
21+
// strips all six keys and leaves the bare node — which the parse then refuses
22+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
23+
// component.
2224
export const entry = 'ui/ElementFilterProps:targetVariable';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFormProps__aria.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@
2020
// narrowings ride minor releases) and the prescription lives at the major
2121
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2222
// Sources are rewritten by the D2 conversion `element-form-removed`, which
23-
// strips all six keys and leaves the bare node — inert as it always was.
23+
// strips all six keys and leaves the bare node — which the parse then refuses
24+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
25+
// component.
2426
export const entry = 'ui/ElementFormProps:aria';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFormProps__fields.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@
2020
// narrowings ride minor releases) and the prescription lives at the major
2121
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2222
// Sources are rewritten by the D2 conversion `element-form-removed`, which
23-
// strips all six keys and leaves the bare node — inert as it always was.
23+
// strips all six keys and leaves the bare node — which the parse then refuses
24+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
25+
// component.
2426
export const entry = 'ui/ElementFormProps:fields';

‎packages/spec/src/migrations/entries/retired-keys/18.ui__ElementFormProps__mode.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@
2020
// narrowings ride minor releases) and the prescription lives at the major
2121
// boundary where `migrate meta` users look (the #8495 / PR #8666 precedent).
2222
// Sources are rewritten by the D2 conversion `element-form-removed`, which
23-
// strips all six keys and leaves the bare node — inert as it always was.
23+
// strips all six keys and leaves the bare node — which the parse then refuses
24+
// by name (`RETIRED_PAGE_COMPONENT_TYPES`), with the prescription to delete the
25+
// component.
2426
export const entry = 'ui/ElementFormProps:mode';

0 commit comments

Comments
 (0)