From 746f6f8183241f2a8a2b92f647873d60296cea59 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 3 Sep 2026 15:16:03 +0000 Subject: [PATCH] fix(components): delete the second, dead SchemaRenderer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `packages/components/src/SchemaRenderer.tsx` was a 28-line component sharing an export name with the real renderer in `packages/react/src/SchemaRenderer.tsx`, reachable from nothing: absent from the barrel, imported by no file in the repo in any form, and behind no subpath in the package's `exports` map. It was never in the runtime bundle, so this is not a behaviour change. Its only shipped footprint was a stray types-only `dist/SchemaRenderer.d.ts` with no runtime module behind it and no specifier that resolves to it. Deleting beat keeping because the copy is a trap: it evaluates no predicate. Of the real renderer's six visibility legs it consults only `hidden`, by bare truthiness rather than evaluation, so a node declaring `hiddenOn` is never hidden; it reads neither enablement leg; and it spreads `{...schema}` raw, so `disabled` would reach the widget unevaluated — the inverse of the real renderer's evaluate-strip-forward contract. Fixes #7319 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC --- .../7319-dead-schemarenderer-retired.md | 26 +++++++++++++++++ packages/components/src/SchemaRenderer.tsx | 28 ------------------- 2 files changed, 26 insertions(+), 28 deletions(-) create mode 100644 .changeset/7319-dead-schemarenderer-retired.md delete mode 100644 packages/components/src/SchemaRenderer.tsx diff --git a/.changeset/7319-dead-schemarenderer-retired.md b/.changeset/7319-dead-schemarenderer-retired.md new file mode 100644 index 0000000000..225cde7350 --- /dev/null +++ b/.changeset/7319-dead-schemarenderer-retired.md @@ -0,0 +1,26 @@ +--- +'@object-ui/components': patch +--- + +Delete the second, dead `SchemaRenderer` in `packages/components/src` (objectui#7319). + +`packages/components/src/SchemaRenderer.tsx` was a 28-line component carrying the same +export name as the real renderer in `packages/react/src/SchemaRenderer.tsx`. Nothing +reached it: it is absent from the package barrel, no file in the repo imports it by any +form, and the package's `exports` map has no subpath that resolves to it. + +**No behaviour changes.** The file was never in the runtime bundle — two markers unique to +it appear in zero `dist/` files, while controls for barrel-exported symbols appear in four +each. Its only shipped footprint was a stray types-only `dist/SchemaRenderer.d.ts` with no +runtime module behind it, reachable through no specifier; the published tarball loses that +file, and no importable surface changes in either direction. Hence a patch, not a minor. + +**Why deleting beat keeping.** The copy is a trap, which is what the card's triage asked +whoever took it to settle. It evaluates no predicate at all: of the real renderer's six +visibility legs (`visibleWhen` / `visible` / `visibleOn` / `visibility` / `hidden` / +`hiddenOn`) it consults exactly one, `hidden`, and by bare truthiness rather than +evaluation — so a node declaring `hiddenOn` is never hidden, and the two enablement legs +(`disabled` / `disabledOn`) are not read at all. It then spreads `{...schema}` raw, so +`disabled` would reach the widget as an unevaluated value, which is the precise inverse of +the real renderer's contract: evaluate the predicate, strip the raw key, forward only the +verdict. diff --git a/packages/components/src/SchemaRenderer.tsx b/packages/components/src/SchemaRenderer.tsx deleted file mode 100644 index 893387f3f4..0000000000 --- a/packages/components/src/SchemaRenderer.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { ComponentRegistry } from '@object-ui/core'; - -export const SchemaRenderer = ({ schema }: { schema: any }) => { - if (!schema) return null; - if (Array.isArray(schema)) { - return <>{schema.map((s, i) => )}; - } - - const { type, hidden } = schema; - if (hidden) return null; // Simple hidden check - - if (!type) { - if (typeof schema === 'string') return <>{schema}; - return null; - } - - const Component = ComponentRegistry.get(type); - - if (!Component) { - console.warn(`Renderer not found for type: ${type}`); - return
Unknown: {type}
; - } - - // This is dynamic component resolution from registry, not component creation during render - // eslint-disable-next-line - return ; -};