fix(registry): prefix every namespaced key exactly once, in every namespace - #3037
Merged
Conversation
…espace #3023 fixed eleven record:* blocks registered as register('record:x', …, { namespace: 'record' }) — an already-prefixed name handed to a registry that prefixes it again, landing the block at record:record:x — and guarded that namespace alone. Twenty-two more were sitting in action: (5), element: (10) and page: (7), two of them (page:header, element:divider) curated public blocks. Checking one namespace is exactly what let them keep sitting there, so the guard now asks the whole registry rather than a prefix of it. Same fix as before: register the bare name and let `namespace` do the prefixing, with skipFallback: true so the fallback does not claim that bare name globally. It would otherwise take over `header`, `footer`, `sidebar`, `tabs`, `card`, `accordion`, `section`, `text`, `image`, `button`, `icon` — every one of which belongs to ui:. All 22 stay reachable exactly as <namespace>:<name>; the registry goes 522 keys to 500, and the contract is unchanged at 42/42. Found while probing why six curated Tier B primitives report no `inputs`. They do declare them — vitest.setup.dom.tsx registers simplified text / image / html / grid stubs that shadow the real registrations inside the test environment only. That shadowing is a separate question, left alone here; the doubled keys it turned up are not test-environment artifacts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4mrr1ihhwnfEHFSWmGoMp
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 30, 2026 13:12
This was referenced Jul 30, 2026
Merged
os-zhuang
added a commit
that referenced
this pull request
Jul 30, 2026
…he public contract (#3069) The AI-authoring vocabulary and the Studio page designer disagreed by thirteen blocks: PUBLIC_BLOCKS carried one page: tag and one element: tag while the designer palette — and @objectstack/spec's page schema — offered the whole families. A block a human can drag in Studio was invisible to a model writing the same page, which is the #3006 state at 10x the scale. Fifteen tags join the contract (42 -> 57), every one shipping a renderer with declared inputs (#3065): page: tabs, card, accordion, section, footer, sidebar element: text, number, button, definition-list, repeater action: button, group, menu, icon Five stay out, each with its reason recorded and guarded: action:bar (record:quick_actions covers the record action strip; the spec blesses the other four), element:image (duplicates the curated `image` — one spelling per concept), and element:record_picker / element:text_input / element:metadata_viewer (mirroring the Studio palette's own PALETTE_EXCLUSIONS, so the two vocabularies stay out for the same reasons rather than by coincidence). The console's reverse-coverage guard now sweeps all four semantic namespaces instead of record: alone — checking only the namespace you just fixed is exactly how the last 22 doubled keys went unnoticed (#3037). A new prop-less allowlist (element:divider, page:section, page:footer, page:sidebar) keeps "declares no inputs" a pinned decision in both directions: those four must stay at zero, everything else curated must declare a surface. Verified by mutation: dropping action:menu from the list fails the sweep with exactly that tag named. Claude-Session: https://claude.ai/code/session_01N4mrr1ihhwnfEHFSWmGoMp Co-authored-by: Claude <noreply@anthropic.com>
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.
#3023 fixed eleven
record:*blocks registered asregister('record:x', …, { namespace: 'record' })— an already-prefixed name handed to a registry that prefixes it again — and guarded that namespace alone. Twenty-two more were sitting elsewhere:element:element:divider(curated)page:page:header(curated)action:Checking one namespace is exactly what let them keep sitting there, so the guard now asks the whole registry rather than a prefix of it.
Fix
Same as before — register the bare name, let
namespacedo the prefixing,skipFallback: trueso the fallback doesn't claim that bare name globally:skipFallbackis doing real work here. Without it these 22 would take overheader,footer,sidebar,tabs,card,accordion,section,text,image,button,iconas top-level tags — every one of which belongs toui:. Verified after the change: all still owned byui, none stolen.page:headercanonicalpage:page:headerpage:headerelement:dividercanonicalelement:element:dividerelement:dividerNothing in the repo referenced a doubled key.
Guard generalized
The record-only doubled-prefix assertion is replaced by a registry-wide one. Verified by reverting a single registration:
What this came out of, and a correction
I went looking because six curated Tier B primitives (
grid,page:header,text,image,element:divider,html) reported noinputsin the console contract.They do declare inputs.
vitest.setup.dom.tsxregisters simplifiedtext/image/html/gridstubs, and because the setup imports@object-ui/componentsfirst, the real registrations run and are then overwritten by the stubs — inside the test environment only.text, for one, really declarescontent(required) inpackages/components/src/renderers/basic/text.tsx.So the "missing inputs" was a test-environment artifact, not a product gap. That shadowing is a separate question and I've left it alone — but it does mean this file's picture of the contract is partly fiction for those four tags, which is worth knowing before anyone writes an assertion that depends on them.
The doubled keys the probe turned up along the way are not artifacts — they reproduce against the real registrations.
Full suite
737 passed | 1 skipped, lint 0 errors, type-check 38/38, changeset included.🤖 Generated with Claude Code
https://claude.ai/code/session_01N4mrr1ihhwnfEHFSWmGoMp
Generated by Claude Code