fix: make registry components self-contained with ConversationProvider#77
Merged
Conversation
Reverts the approach of wrapping registry previews in a shared ConversationProvider. Components will instead be made self-contained. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each voice-chat page and the conversation-bar demo now wraps itself with ConversationProvider instead of relying on an external wrapper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ider The frontpage CardsDemo imports PageContent (without provider) so all voice-chat blocks share one ConversationProvider. The default Page export keeps its own provider for standalone/registry use. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| import Speaker01 from "@/registry/elevenlabs-ui/blocks/speaker-01/page" | ||
| import VoiceChat01 from "@/registry/elevenlabs-ui/blocks/voice-chat-01/page" | ||
| import VoiceChat02 from "@/registry/elevenlabs-ui/blocks/voice-chat-02/page" | ||
| import { PageContent as VoiceChat01 } from "@/registry/elevenlabs-ui/blocks/voice-chat-01/page" |
Collaborator
There was a problem hiding this comment.
This cast looks a bit dodgy
Member
Author
There was a problem hiding this comment.
Not a cast, it's an import rename. It's there because we like the pages from the registry to be self-contained: The default export here wrap's the PageContent component in a ConversationProvider to make that happen but on this page of cards we'd like the pages to share a single ConversationProvider so we import the "unwrapped" component instead.
I could rename this from PageContent to something more semantic, to make that obvious and not require a rename on import to avoid conflicts in this index.tsx namespace?
Makes the named exports self-descriptive, removing the need for import aliases when consuming the unwrapped components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
louisjoecodes
approved these changes
May 15, 2026
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.
Summary
ConversationProvider, making the code served via/r/*.jsonself-contained and ready to use standalonePageContentcomponent is exported separately so the frontpageCardsDemocan render voice-chat blocks under a single sharedConversationProviderconversation-bar-demoexample also wraps itself withConversationProviderfor standalone useTest plan
/view/iframe previews/r/voice-chat-01.jsonetc. contain self-contained code withConversationProvider🤖 Generated with Claude Code