You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finding(components): a second, dead SchemaRenderer lives in packages/components/src — unexported, imported by nothing, and it evaluates no gate at all #7319
Found while building objectui#7238 (branch claude/issue-7238-disabled-one-carrier, PR #7318), whose whole subject is which carrier a widget reads disabled from. Filed rather than fixed: it is outside that card's file surface and is an observation, not a reachable defect.
What is there
packages/components/src/SchemaRenderer.tsx is a 28-line component with the same export name as the real one in packages/react/src/SchemaRenderer.tsx. Its whole body:
Nothing imports it. A repo-wide grep for ./SchemaRenderer / ../SchemaRenderer / components/SchemaRenderer across packages/, apps/, examples/ and scripts/ returns only packages/react/src/__tests__/*, and every one of those resolves to packages/react/src/SchemaRenderer.tsx — its own sibling, not this file.
It is not in the barrel. The only occurrence of the name in packages/components/src/index.ts is inside a prose comment (line 54); there is no export.
Why it is worth a card rather than a shrug
If anything ever wired it up, it would be a second, silently WRONG renderer, because it evaluates nothing:
Nothing pins it, so it drifts for free while readers can reasonably mistake it for the engine, given the identical export name.
Suggested routing
Two honest options, both cheap; the ADR-0049 enforce-or-remove instinct applies to code as much as to keys:
Delete it — the default. Zero importers, zero exports, zero pins; the name is already taken by the real renderer one package over.
Keep and pin it only if some consumer outside this repo is known to reach it through a deep path — in which case it needs the real gate evaluation, not a truthy check, and it should be exported and documented.
Recommendation: option 1. Verified dead by grep in both directions; the burden of proof for keeping a same-named shadow of the engine belongs to whoever wants it kept.
Found while building objectui#7238 (branch
claude/issue-7238-disabled-one-carrier, PR #7318), whose whole subject is which carrier a widget readsdisabledfrom. Filed rather than fixed: it is outside that card's file surface and is an observation, not a reachable defect.What is there
packages/components/src/SchemaRenderer.tsxis a 28-line component with the same export name as the real one inpackages/react/src/SchemaRenderer.tsx. Its whole body:Measured on
67dadd602:./SchemaRenderer/../SchemaRenderer/components/SchemaRendereracrosspackages/,apps/,examples/andscripts/returns onlypackages/react/src/__tests__/*, and every one of those resolves topackages/react/src/SchemaRenderer.tsx— its own sibling, not this file.packages/components/src/index.tsis inside a prose comment (line 54); there is no export.Why it is worth a card rather than a shrug
If anything ever wired it up, it would be a second, silently WRONG renderer, because it evaluates nothing:
{...schema}spreads the raw authored node, sodisabledreaches the widget as an unevaluated value. The real renderer's contract is the opposite — it evaluatesdisabled/disabledOn, strips the raw key from the outgoing props, and forwards only the verdict. That contract is exactly what finding(components): seven widgets re-read the rawschema.disabledbeside SchemaRenderer's evaluated verdict — 9 TS2322 once the #7087 narrowings drop, andui:button/formgrey out on any predicate string #7238 converged eight widgets onto, and this file is the one place in the tree that would defeat it.if (hidden) return nullis a bare truthy check on a key that isboolean | string, so a predicate string hides the node however it evaluates — the same defect class the real renderer'shasDeclaredPredicate+evaluateEnablementPredicatepath exists to prevent (objectui#3862, 「空谓词」的第四种拼法:{ dialect: 'cel', source: ' ' }(source 只有空白)仍被判成已声明门 → disabled 侧仍永久置灰、执行入口仍拒执行(#3850 裁决枚举未覆盖) #3960, Thedisabled/disabledOnnode gate has NO fault diagnostic in either build — and its fail-soft polarity greys a control out rather than showing it #6445).Suggested routing
Two honest options, both cheap; the ADR-0049 enforce-or-remove instinct applies to code as much as to keys:
Recommendation: option 1. Verified dead by grep in both directions; the burden of proof for keeping a same-named shadow of the engine belongs to whoever wants it kept.
Refs #7238 · #7318.
Generated by Claude Code