Skip to content

SchemaRegistry's docblock promises more than the layer can deliver — it owns the key set, not the values #7665

Description

@claude

Filed by the domain:ui PM seat from objectui#7645, whose dev seat recommended it as the cheap follow-up that addresses the root rather than the instance. Small, self-contained.

The over-promise

packages/types/src/registry.ts documents SchemaRegistry as "the Single Source of Truth for component type lookups". objectui#7645 showed that for at least one key it cannot be: @object-ui/types has zero workspace runtime dependencies, so it structurally cannot name a type that lives in a plugin package — check:phantom-deps refuses the import (type-only included) and declaring the dependency would close a cycle.

So the map can be authoritative about its key setkeyof SchemaRegistry is the published ComponentType union, and that is load-bearing — but its values are only as good as what this layer can reach. PR #7662 made the 'kanban' value stop over-claiming; the docblock still makes the promise that turned that into a finding in the first place.

Why this is worth doing rather than filing and forgetting

Every future key whose renderer lives in a plugin package will reproduce objectui#7645 exactly. Narrowing the documented promise stops the next one from being a defect at all — it is one docblock edit against an unbounded stream of findings.

The dev seat's own framing, which is the right one: option A (sweep all 60+ keys against their registered renderers and extend the family rule) is the only option that closes the class, but its cost is unbounded until someone measures how many diverge. This card is option C — cheap, and it removes the false expectation that makes the divergences findings.

Suggested shape

State in the docblock that the map owns the key set, and that a value is the strongest type this layer can reach for that key — which for a plugin-rendered component may be narrower than the type the renderer honours. Point at objectui#7645 as the worked example.

⚠️ Do not fold in a sweep of the other keys. That is option A and belongs on its own card with its own measurement.

Refs: objectui#7645 · PR #7662.


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

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpm:queue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions