Retire the inert register-meta key defaultChildren (#5051) - #5656
Merged
Conversation
…defaultChildren` (#5051) `defaultChildren` was declared in four places, produced in eleven, and read in none. The designer's drop path builds a node from its twin key only (`PageDesigner.tsx`, `props: paletteItem?.defaultProps ?? {}`), so a palette item declaring `defaultChildren` dropped an empty node and the declaration never materialised — the declared-but-unenforced shape ADR-0049 targets. Per the maintainer ruling of 2026-08-19 this retires the key rather than wiring up a consumer: the 4 declarations, the 11 producers (`sidebar.tsx` x10, `span.tsx`) and the row in the published plugin-author guide all go together. Two retirement pins keep it out, one per package, both compile-time-enforced through each package's chained `tsconfig.test.json`.
Contributor
✅ 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
|
os-sales
marked this pull request as ready for review
August 22, 2026 01:55
This was referenced Aug 22, 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 free
to 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 #5051
Retires the register-meta key
defaultChildren, which was declared in four places, produced in eleven, and read in none.The fork was already decided — this PR executes the ruling
The card is explicitly a fork (retire the key vs. implement the consumer), and it is not a dev's to pick. It does not need picking: the maintainer ruled on it on 2026-08-19 (recorded in the issue thread, verbatim reply 「全部接受」), adopting option B — retire the key everywhere, including the row in the published plugin-author guide, per ADR-0049 enforce-or-remove. Option A (wiring
children: paletteItem?.defaultChildren ?? []into the designer) was rejected "for now; if designer default-children UX is ever product-wanted it returns as its own designed card."That ruling is also what clears the contract-change clause: removing a declared key from
@object-ui/types/@object-ui/coreis a contract decision, and an authority had already made it.Counts re-measured on the current tip, each with a positive control
A zero count is only evidence if the command is proven able to hit, so every sweep below was run through the identical pipeline as a control term known to resolve.
7e811687agrep -cxFon the literalRegistry.ts:106line returns 1sidebar.tsxx10,span.tsxx1)defaultPropshits, including the consumerPageDesigner.tsx:173The control is the load-bearing part: the same command that returns zero for
defaultChildrenreturns the twin key's consumer, so the zero is absence, not a silently-zeroed pattern. Line numbers had drifted since filing (types/base.ts508 to 540,span.tsx138 to 160); the counts had not.Consumption was checked beyond the literal spelling: no bracket access (
['defaultChildren']), no case-variant spelling, and the drop path destructurespaletteItemfield by field (defaultSize,defaultProps) with no wholesale spread that could have carried the key into a node without naming it.What changed
core/registry/Registry.ts,types/base.ts,types/plugin-scope.ts,types/zod/base.zod.ts— plus theSchemaNodetype import inRegistry.ts, which the removed line was its only remaining user.renderers/navigation/sidebar.tsxx10,renderers/basic/span.tsxx1.skills/objectui/guides/plugin-development.md, in this same PR as the ruling requires.No runtime behaviour changes in either direction. Nothing read the key before this change, so dropping a
spanor any of the ten sidebar types into the designer produces exactly the node it produced yesterday.Retirement pins
One per package, both compile-time-enforced through each package's chained
tsconfig.test.json:packages/types— pins the zod twin and both TS twins.packages/core— pins the registration surface the eleven producers were written against.The zod half asserts a strip, not a refusal. Measured on zod 4.4.3, a plain
z.objectstrips unknown keys rather than rejecting them, andComponentMetaSchemahas no.strict(); so an external author who still declares the key keeps a valid meta and the key is silently dropped. Asserting a rejection would have pinned a verdict this validator never emits. That "absent from output" assertion carries its own in-test control — a surviving sibling key asserted present in the same parse output through the same call, since a schema that dropped everything would otherwise satisfy it.Verification, all on
de05aed4cControl probe on the pins, because a pin is only enforcement if it can turn red. Each leg re-declared the key, confirmed the mutation on disk by re-reading the file anchored on the injected text (not by trusting an editor exit code), then restored — with a restore trap, and the restore proven byte-identical to pristine:
An earlier attempt at this probe produced two void legs and is reported rather than buried: one wrote its log to a path containing a
/from the package name, so the redirect failed and the non-zero status read back was bash's, not the type-checker's; the other used aperlreplacement containing//, which terminated the regex and changed nothing. The on-disk anchor check caught the second as a no-op. Both were rerun as above.Shipped bytes, with the type-only question settled rather than assumed: the
.d.tsremovals erase at runtime, and the one runtime-bearing removal in these packages is the zod mirror —dist/zod/base.zod.jsnow carriesdefaultChildren0 times anddefaultProps1 time. Zero occurrences of the retired key acrosstypes/distandcore/dist, while the same grep still findsdefaultPropsin 8 dist files, so the sweep was capable of hitting.@object-ui/core...and@object-ui/components^...closures, exit 0.types,core,components— all exit 0, script names echoed so a zero-match silent pass is ruled out.check-skills-paths,check-changeset-presence,check-changeset-no-major,check-type-check-coverage,check-doc-links,check-lint-coverage,check-package-self-import,check-control-bytes— all exit 0, each captured before any pipe.eslint . --no-inline-configcovered 3516 files and my 8 changed source files carry 0 errors. That run also reports 89 errors across 73 files, and those are not repo breakage: they are inline-suppressed and surface only because of--no-inline-config. The repo's actual lint isturbo run lint(per-packageeslint .), which honours the suppressions — measured on one of them,RouteFader.tsxreports 1 error with the flag and 0 without. Zero overlap with this diff either way, and type-aware linting is not enabled (tseslint.configs.recommended, noproject/projectService), so this diff cannot move an untouched file's verdict.Published
skills/readingsA deletion, so both readings move down by one line.
plugin-development.md: 427 to 426 lines..mdfiles underskills/): 5674 to 5673 lines.Generated by Claude Code