fix: show the bundle README on the bundle detail page - #5
Merged
Merged
Conversation
Bundle READMEs were published by the CLI and served by the API
(GET /bundles/{name}/{version}/readme), but the web app never fetched
or rendered them, so the bundle page only showed setupInstructions.
- Add fetchBundleReadme, queryKeys.bundleReadme, and useBundleReadme,
mirroring the asset README path (text response, 404 -> null).
- Lift the asset page's private ReadmeView into a shared ReadmeSection
so asset and bundle pages render READMEs identically.
- Render the README on BundleDetail between the Assets grid and the
Setup instructions, with the same "no README" fallback as assets.
- Tests: ReadmeSection, fetchBundleReadme, useBundleReadme, and
BundleDetail README cases; AssetDetail tests pass unchanged.
Closes #4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013iD62pK3gHb7fhb36VGer1
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
Fixes #4 — bundle READMEs were not shown on the bundle detail page.
The whole pipeline already existed except the last step: the CLI publishes
README.mdnext tobundle.json, the API serves it fromGET /bundles/{name}/{version}/readme, and the web app's generated client already hadgetBundleReadme. Nothing in the web app called it.Changes
fetchBundleReadmeinsrc/lib/registry-client.ts(text response, 404 →null), plusqueryKeys.bundleReadmeand auseBundleReadmehook, mirroring the asset README path.ReadmeSectioncomponent: the asset page's privateReadmeViewis lifted intosrc/components/ReadmeSection.tsxso asset and bundle pages render READMEs identically. Asset testids and copy are unchanged.BundleDetailrenders the README between the Assets grid and Setup instructions, with a "No README is available for this bundle." fallback. The README query does not participate in the page's loading/error/not-found states.ReadmeSection,fetchBundleReadme,useBundleReadme, and four newBundleDetailcases (rich markdown, missing, loading, fetch error).AssetDetailtests pass unchanged.Verification
pnpm lint,pnpm typecheck,pnpm test(29 files, 289 tests) all green.pnpm format:checkstill reports 27 files, all untouched by this PR and already failing onmain(pre-existing).Follow-ups (out of scope)
readme: ''(src/routes/CreateBundle.tsx), so web-published bundles never get a README. That is likely why the reporter put README content into setup instructions. Worth a README field in the wizard.README.md(ArchiveBuilder.cs), unlike asset zips.atk infofor bundles links to the README instead of rendering it.🤖 Generated with Claude Code
https://claude.ai/code/session_013iD62pK3gHb7fhb36VGer1