Skip to content

fix: make registry components self-contained with ConversationProvider#77

Merged
kraenhansen merged 5 commits into
mainfrom
kh/provider-in-pages
May 15, 2026
Merged

fix: make registry components self-contained with ConversationProvider#77
kraenhansen merged 5 commits into
mainfrom
kh/provider-in-pages

Conversation

@kraenhansen

@kraenhansen kraenhansen commented May 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Each voice-chat page wraps its default export with its own ConversationProvider, making the code served via /r/*.json self-contained and ready to use standalone
  • The inner PageContent component is exported separately so the frontpage CardsDemo can render voice-chat blocks under a single shared ConversationProvider
  • The conversation-bar-demo example also wraps itself with ConversationProvider for standalone use

Test plan

  • TypeScript compiles without errors
  • Registry JSON regenerated
  • Verify voice-chat blocks render correctly on the frontpage (shared provider)
  • Verify voice-chat blocks render correctly in /view/ iframe previews
  • Verify /r/voice-chat-01.json etc. contain self-contained code with ConversationProvider
  • Verify conversation-bar demo works standalone

🤖 Generated with Claude Code

kraenhansen and others added 2 commits May 15, 2026 13:37
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>
@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ui Ready Ready Preview, Comment May 15, 2026 2:49pm

Request Review

…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>
@kraenhansen kraenhansen marked this pull request as ready for review May 15, 2026 12:25
@kraenhansen kraenhansen requested a review from louisjoecodes May 15, 2026 12:25

@louisjoecodes louisjoecodes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment thread apps/www/components/cards/index.tsx Outdated
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"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cast looks a bit dodgy

@kraenhansen kraenhansen May 15, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@kraenhansen kraenhansen merged commit 6e5b681 into main May 15, 2026
5 checks passed
@kraenhansen kraenhansen deleted the kh/provider-in-pages branch May 15, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants