Repository navigation
fix: open registry blocks in v0 as the app page - #302
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y-imports # Conflicts: # docs/public/r/upload-button-block.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review
|
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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 exportSingleImageDropzoneand needs anUploaderProvider.Root cause: each
*-blockregistry item had a single file, of typeregistry:block, targetingcomponents/upload/blocks/*.tsx. None of the files was a page, so v0 wrote its ownapp/page.tsxand 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 fromapp/page.tsx, so they now use the@/components/upload/...alias like the other blocks.docs/public/rwas regenerated withpnpm registry:build.Evidence
pnpm registry:buildsucceeded. The diff indocs/public/ris only thesetype/targetchanges in the block JSONs and the generatedregistry.json.prettier --check registry.jsonpasses;tsc --noEmitpasses inexamples/componentsanddocs.https://edgestore.dev/r/*.json, so it can only be tested after deploy. After merging, click Open in v0 on/docs/components/imageand check thatapp/page.tsxis theSingleImageUploaderBlockwrapper.Risk and rollback
Door: Two-way. Revert the commit and rebuild the registry.
Blast radius: Only the
*-block.jsonitems, which are used only by the Open in v0 button. No component item depends on a block, and the docs'shadcn addcommands all point at component URLs, which are unchanged. Someone runningshadcn addon a*-block.jsonURL by hand would now get the demo atapp/page.tsx; the CLI asks before overwriting an existing file. No published package changes, so no changeset.