Skip to content

fix: open registry blocks in v0 as the app page - #302

Merged
raviships merged 4 commits into
mainfrom
t3code/fix-v0-registry-imports
Oct 13, 2026
Merged

raviships merged 4 commits into
mainfrom
t3code/fix-v0-registry-imports

Conversation

@raviships

@raviships raviships commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Open in v0 button generated a broken app/page.tsx. On /docs/components/image, for example, it default-imported @/components/upload/single-image, but that file only has the named export SingleImageDropzone and needs an UploaderProvider.

Root cause: each *-block registry item had a single file, of type registry:block, targeting components/upload/blocks/*.tsx. None of the files was a page, so v0 wrote its own app/page.tsx and guessed the import. It ignored the block wrapper, which already sets up the provider and mock uploads.

Fix: turn each block's file into the page. Vercel's registry-starter and shadcn's blocks (e.g. login-01) do the same thing.

 {
   "name": "single-image-dropzone-block",
   "type": "registry:block",
   "files": [{
     "path": "examples/components/src/components/upload/blocks/single-image-block.tsx",
-    "type": "registry:block",
-    "target": "components/upload/blocks/single-image-block.tsx"
+    "type": "registry:page",
+    "target": "app/page.tsx"
   }]
 }

This applies to all 8 block items. The wrapper files already default-export a 'use client' component. The progress bar and circle blocks used ../progress-* imports, which break from app/page.tsx, so they now use the @/components/upload/... alias like the other blocks. docs/public/r was regenerated with pnpm registry:build.

Evidence

  • pnpm registry:build succeeded. The diff in docs/public/r is only these type/target changes in the block JSONs and the generated registry.json.
  • prettier --check registry.json passes; tsc --noEmit passes in examples/components and docs.
  • Not tested in v0 yet. The button loads https://edgestore.dev/r/*.json, so it can only be tested after deploy. After merging, click Open in v0 on /docs/components/image and check that app/page.tsx is the SingleImageUploaderBlock wrapper.

Risk and rollback

Door: Two-way. Revert the commit and rebuild the registry.
Blast radius: Only the *-block.json items, which are used only by the Open in v0 button. No component item depends on a block, and the docs' shadcn add commands all point at component URLs, which are unchanged. Someone running shadcn add on a *-block.json URL by hand would now get the demo at app/page.tsx; the CLI asks before overwriting an existing file. No published package changes, so no changeset.

By: Claude Opus 5.5 on Claude Code (T3 Code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
edgestore-docs Ready Ready Preview Oct 13, 2026 11:51am UTC
example-components Ready Ready Preview Oct 13, 2026 11:51am UTC
1 Skipped Deployment
Project Deployment Actions Updated
example-access-control Ignored Ignored Preview Oct 13, 2026 11:51am UTC

Request Review

@raviships
raviships marked this pull request as ready for review October 13, 2026 11:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T11:52:55.360713Z 72df708 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 575691e08d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/public/r/progress-bar-block.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raviships and others added 2 commits October 13, 2026 20:49
…y-imports

# Conflicts:
#	docs/public/r/upload-button-block.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raviships

Copy link
Copy Markdown
Collaborator Author

@codex review

By: Claude Opus 5.5 on Claude Code (T3 Code)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 72df708a98

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@raviships
raviships merged commit adfc622 into main Oct 13, 2026
8 checks passed
@raviships
raviships deleted the t3code/fix-v0-registry-imports branch October 13, 2026 11:59

This branch was successfully deployed

2 active and 1 inactive (outdated) deployments
Preview – edgestore-docs — 72df708a Deployed Oct 13, 2026 by vercel[bot]
Preview – example-components — 72df708a Deployed Oct 13, 2026 by vercel[bot]
Preview – example-access-control — 9a9a3ad0 Deployed Oct 13, 2026 by vercel[bot]
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.

1 participant