Skip to content

fix: show the bundle README on the bundle detail page - #5

Merged
JasonPaff merged 1 commit into
mainfrom
fix/bundle-readme
Sep 11, 2026
Merged

JasonPaff merged 1 commit into
mainfrom
fix/bundle-readme

Conversation

@JasonPaff

Copy link
Copy Markdown
Collaborator

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.md next to bundle.json, the API serves it from GET /bundles/{name}/{version}/readme, and the web app's generated client already had getBundleReadme. Nothing in the web app called it.

Changes

  • fetchBundleReadme in src/lib/registry-client.ts (text response, 404 → null), plus queryKeys.bundleReadme and a useBundleReadme hook, mirroring the asset README path.
  • Shared ReadmeSection component: the asset page's private ReadmeView is lifted into src/components/ReadmeSection.tsx so asset and bundle pages render READMEs identically. Asset testids and copy are unchanged.
  • BundleDetail renders 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.
  • Tests: ReadmeSection, fetchBundleReadme, useBundleReadme, and four new BundleDetail cases (rich markdown, missing, loading, fetch error). AssetDetail tests pass unchanged.

Verification

  • pnpm lint, pnpm typecheck, pnpm test (29 files, 289 tests) all green.
  • pnpm format:check still reports 27 files, all untouched by this PR and already failing on main (pre-existing).

Follow-ups (out of scope)

  1. The web Create Bundle wizard hardcodes 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.
  2. The API's bundle zip omits the bundle's own README.md (ArchiveBuilder.cs), unlike asset zips.
  3. CLI atk info for bundles links to the README instead of rendering it.

🤖 Generated with Claude Code

https://claude.ai/code/session_013iD62pK3gHb7fhb36VGer1

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
@JasonPaff
JasonPaff merged commit 15c4ee5 into main Sep 11, 2026
1 check passed
@JasonPaff
JasonPaff deleted the fix/bundle-readme branch September 11, 2026 19:38
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.

README not shown on bundle page

1 participant