Skip to content

finding(components): a second, dead SchemaRenderer lives in packages/components/src — unexported, imported by nothing, and it evaluates no gate at all #7319

Description

@os-litant

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:

export const SchemaRenderer = ({ schema }: { schema: any }) => {
  if (!schema) return null;
  if (Array.isArray(schema)) { ... }
  const { type, hidden } = schema;
  if (hidden) return null; // Simple hidden check
  ...
  return <Component schema={schema} {...schema} />;
};

Measured on 67dadd602:

  • 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:

Suggested routing

Two honest options, both cheap; the ADR-0049 enforce-or-remove instinct applies to code as much as to keys:

  1. Delete it — the default. Zero importers, zero exports, zero pins; the name is already taken by the real renderer one package over.
  2. 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.

Refs #7238 · #7318.

Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions