fix(record): register the record:* blocks under one key, prefixed once - #3023
Merged
Conversation
Eleven blocks in plugin-detail were registered as
register('record:x', …, { namespace: 'record' }) — an already-prefixed name
handed to a registry that prefixes it again. Each landed at record:record:x,
and the key authors actually resolved, record:x, was the un-namespaced
FALLBACK rather than the intended registration. The registry carried 23 keys
for 12 components.
Nothing failed, which is why it survived: getPublicConfigs() rewrites `type` to
the curated tag, so the doubled name never reached the contract, the manifest,
or the JSX surface. It was visible only when enumerating the registry directly
— which is what #3013's reverse check does.
Registering the bare name is what makes `namespace` correct, and
skipFallback: true is what keeps the fallback from claiming that bare name
globally. Without it these would take over `details`, `path`, `history`,
`alert` … as top-level tags; `alert` is the live case, owned by ui:. Every
block stays reachable exactly as record:<name>, and 23 keys become 12.
record:line_items needed no change — it was the one already registered this
way, which is what made #3006's near-miss possible in the first place.
Two console assertions hold the shape: no key carries a doubled prefix, and no
record:* block owns the bare spelling of its own name. Both were verified
against the old form: restoring one registration fails them with the phantom
key named.
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 11:08
os-zhuang
added a commit
that referenced
this pull request
Jul 30, 2026
…espace (#3037) #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. 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.
The latent issue #3013 turned up while deduping the registry. Eleven blocks in plugin-detail were registered as:
— an already-prefixed name handed to a registry that prefixes it again. Each landed at
record:record:details, and the key authors actually resolved,record:details, was the un-namespaced fallback rather than the intended registration. 23 keys for 12 components.Nothing failed, which is why it survived:
getPublicConfigs()rewritestypeto the curated tag (Registry.ts:477), so the doubled name never reached the contract, the manifest, or the JSX surface. It was visible only by enumerating the registry directly — which is exactly what #3013's reverse check does.The fix
Registering the bare name is what makes
namespacecorrect.skipFallback: trueis what stops the fallback from claiming that bare name globally — without it these would take overdetails,path,history,alert… as top-level tags.alertis the live case: it belongs toui:, and a missingskipFallbackwould silently take it over.record:line_itemsneeded no change. It was the one block already registered this way — which is precisely what made #3006's near-miss possible.Verified against the registry
record:*keysrecord:record:*recordalertbare owneruiui(unchanged)Every block stays reachable exactly as
record:<name>.Guards
Two console assertions hold the shape: no key carries a doubled prefix, and no
record:*block owns the bare spelling of its own name. Both verified against the old form — restoring one registration fails them with the phantom key named:The
undouble()helper #3013 needed to work around the doubling is gone with it.A comment on the registration block states the convention (bare name +
namespace+skipFallback) and why, so it doesn't get written back.Full suite
731 passed | 1 skipped, plugin-detail's own283 passed, lint 0 errors, type-check 38/38, changeset included.🤖 Generated with Claude Code
https://claude.ai/code/session_01N4mrr1ihhwnfEHFSWmGoMp
Generated by Claude Code