Repository navigation
docs: migrate apps/docs from Nuxt/docs-please to Cloudflare Nimbus (Astro) - #155
Conversation
…stro) - Replace the Nuxt + docs-please site with a Nimbus 0.20.0 (Astro 7) scaffold; port all 13 pages and the landing page (numeric prefixes dropped, sidebar.order kept, duplicate H1s removed, internal links rewritten). - Code groups become Tabs in installation.mdx and configuration/overview.mdx; the landing uses LinkButton and CardGrid. - URLs move from /docs/<group>/<page> to /<group>/<page>/; public/_redirects keeps old links working. - wrangler.jsonc stays Cloudflare Pages format (code-please-docs, output ./dist); the D1 binding is gone since the site is static. - eslint ignores apps/docs/** (scaffold code style) and drops the Nuxt MDC override.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Code Review
This pull request migrates the documentation site from Nuxt to Astro, integrating @cloudflare/nimbus-docs and configuring it for Cloudflare Pages. It introduces a comprehensive set of UI components, static assets, configuration files, and agent-friendly documentation templates. Feedback on the changes suggests refactoring the search client script to use standard Custom Events instead of expando properties on DOM elements to improve maintainability and prevent potential memory leaks.
[Medium impact] The changes since the previous review appear safe to merge. SummaryMigrates the docs site from Nuxt to Astro and Cloudflare Nimbus.
Reviews (3) · Last reviewed commit: "chore(docs): stop superseded Pagefind se..." · Reviewed by Greptile |
There was a problem hiding this comment.
5 issues found across 153 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/docs/src/components/ui/code/index.ts">
<violation number="1" location="apps/docs/src/components/ui/code/index.ts:1">
P3: This barrel re-exports `Code`, but nothing imports it and `src/components.ts` does not register it for MDX, so the component is unreachable. Either register it in `components.ts` or drop this file and `Code.astro` until they are needed.</violation>
</file>
<file name="apps/docs/src/components/ui/banner/banner.client.ts">
<violation number="1" location="apps/docs/src/components/ui/banner/banner.client.ts:40">
P3: Removing the focused close button drops keyboard focus to `<body>`, so keyboard users lose their place after dismissing. Move focus to `#main-content` (the existing `tabindex="-1"` main element) before removing the banner.</violation>
</file>
<file name="apps/docs/src/components/ui/pagination/pagination.client.ts">
<violation number="1" location="apps/docs/src/components/ui/pagination/pagination.client.ts:51">
P3: Moving the pointer out of the bar hides the highlight even when a link inside it still has focus. Keep the highlight on the focused half in `onLeave`, and only hide when nothing is focused.</violation>
</file>
<file name="apps/docs/src/components/ui/tabs/tabs.client.ts">
<violation number="1" location="apps/docs/src/components/ui/tabs/tabs.client.ts:55">
P3: The synthesized path overwrites an author-supplied `id` on `<TabItem>`, while the manual path keeps it with `||=`. Reuse `panel.id` when present so `#id` anchors on TabItem keep working.</violation>
</file>
<file name="apps/docs/src/lib/variants.ts">
<violation number="1" location="apps/docs/src/lib/variants.ts:28">
P3: An unknown variant value falls back to the default for the classes, but compound matching still uses the raw value. A `size="xl"` with `shape="square"` therefore drops the square's `size-*` classes and the button collapses. Resolve each selection to a known value once, and use that value for both the class lookup and the compound filter.</violation>
</file>
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant CLI as Nimbus CLI
participant Build as Astro Build
participant Vite as Vite Plugin
participant Content as Content Collections
participant MDX as MDX Processor
participant CF as Cloudflare Pages
participant CDN as Edge CDN
participant Browser as Browser
participant Search as Pagefind
participant DB as D1 Database
Note over Dev,DB: Documentation Site Architecture (Astro + Nimbus)
Dev->>CLI: npx nimbus-docs check
CLI->>Content: Validate frontmatter & links
Content-->>CLI: Validation results
CLI-->>Dev: 0 errors, 0 warnings
Dev->>Build: astro build
Build->>Vite: Load config & plugins
Vite->>Content: Read content collections
Content-->>Vite: MDX files (docs, partials)
Vite->>MDX: Transform MDX
MDX-->>Vite: Compiled pages
Vite->>Search: Index pages
Search-->>Vite: Pagefind index
Vite-->>Build: Static HTML files
Build-->>CF: Deploy to ./dist
Browser->>CDN: GET /docs/getting-started
CDN->>CDN: 301 redirect logic
CDN-->>Browser: 301 /getting-started/
Browser->>CDN: GET /getting-started/
CDN-->>Browser: Static HTML page
Browser->>Browser: Load client-side JS
alt User searches
Browser->>Search: Pagefind query
Search-->>Browser: Results
end
Note over Browser,DB: Runtime interactions (client-side)
Browser->>CDN: GET /llms.txt
CDN-->>Browser: Markdown index
Note over CF: No D1 binding (static site)
Note over CDN: Cache-Control for hashed assets
opt Internal links
Browser->>CDN: Navigate to page
CDN-->>Browser: Rendered page
Browser->>Search: Update Pagefind
end
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Fix the cubic findings that affect this site: light-mode focus ring contrast, the sidebar fade's missing color token, the pagination key cap on touch screens, overlapping Pagefind loads, the mobile TOC fallback, the coordinates manifest cache policy on Pages, and two AGENT.md rules (a scoped rollback and the Pages audit check).
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the documentation site to the Nimbus framework, introducing new UI components, updated build configurations, and improved project structure. The review feedback provides actionable improvements, including optimizing TOC rail measurements to avoid layout thrashing, ensuring Pagefind search respects AbortSignals, fixing potential FOUC issues with banner dismissal, correcting visibility checks for the sidebar filter in mobile dialogs, and refining ESLint ignore rules to maintain better code quality.
The provider now honors the abort signal, so a query replaced by a newer one skips fetching its result fragments. From Gemini's review on #155.
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the apps/docs workspace from a Nuxt-based documentation site to an Astro-based site powered by @cloudflare/nimbus-docs. This involves replacing Nuxt configuration files, dependencies, and content files with Astro equivalents, including new Astro components, layouts, and styles. The review feedback correctly identifies a high-severity issue in wrangler.jsonc where the compatibility_date is set to a future date ('2026-11-19'), which will cause Cloudflare Wrangler to fail during builds or deployments.
| "database_id": "b4678772-c860-4609-89a4-08a804c9e916" | ||
| } | ||
| ] | ||
| "compatibility_date": "2026-11-19", |
There was a problem hiding this comment.
[HIGH] Future compatibility date in wrangler.jsonc
Problem: The compatibility_date is set to "2026-11-19", which is in the future. Cloudflare Wrangler will throw an error and fail to build or deploy if the compatibility date is in the future.
Rationale: Cloudflare Wrangler requires the compatibility_date to be a date in the past or present.
Suggestion: Change the compatibility_date to a current or past date (e.g., "2025-01-01").
"compatibility_date": "2025-01-01",



Summary
The Nuxt +
docs-pleasedocs build was already broken onmain([@vue/compiler-sfc] Failed to resolve extends base typeonNuxtLinkPropsindocs-please'sUButton.vue, reproduced on main's exact lockfile), and no CI workflow builds the docs. This movesapps/docsto Cloudflare Nimbus (@cloudflare/nimbus-docs0.20.0, Astro 7.4.2).What changed
apps/docsis replaced with a Nimbus scaffold (owned-source layouts and components undersrc/, plus the scaffold'sAGENT.md,CLAUDE.md, andnimbus.json).src/content/docs/{getting-started,guides,configuration,reference}/. Numeric prefixes are dropped,sidebar.ordercomes from the old prefix, duplicate body H1s are removed, and internal links are rewritten (all 11 resolve). Prose is otherwise unchanged.::code-groupblocks become<Tabs>ingetting-started/installation.mdxandconfiguration/overview.mdx. The landing page usesLinkButton+CardGrid, and its GitHub link now points topleaseai/code-intelligence(it pointed tochatbot-pf/code-please)./docs/<group>/<page>to/<group>/<page>/;public/_redirects(/docs/* /:splat 301) keeps old links working.wrangler.jsoncstays in Cloudflare Pages format (name: code-please-docs,pages_build_output_dir: ./dist); the D1 binding is removed because the site is static.eslint.config.jsignoresapps/docs/**(the scaffold's code style produced about 2,400 style errors) and drops the Nuxt MDC override.apps/docs/package.jsonkeeps the name@pleaseai/code-please-docs-site(rootbuild:docsfilters on it), usestypescript ^6.0.3, and has Pages-flavouredpreview:cfanddeployscripts.Scope
Left untouched as stale references:
specs/004-docs-site/spec.mdand theref:clonescript that clonesdocs-please. Pre-existing doc style issues are carried over unchanged: 10 code fences without a language (mostlyguides/mcp-server.md) and Title Case headings.Blast radius
Docs site only. Before merge: if the Cloudflare Pages project's dashboard build output directory is set to the old
.output/public, it must change todist; this is not visible from the repo.src/content/partials/is empty and untracked, so the build logs a harmlessNo files foundwarning for the partials collection.Verification
bun run build:docssucceeds (14 pages, Pagefind indexed 14 pages).dist/contains every page'sindex.html,llms.txt,_redirects, andpagefind/.nimbus-docs check --jsonafter build: 0 errors, 0 warnings (statuspartialonly because.mdpages are not linted by Nimbus).bun run typecheck(8/8,astro check0 errors),bun run lint, andbun run testpass.Related issue
None.
Checklist
bun run test)bun run lint)BREAKING CHANGE:note is included (old/docs/*URLs redirect with 301)Summary by cubic
Migrates
apps/docsfrom Nuxt +docs-pleaseto Cloudflare Nimbus (@cloudflare/nimbus-docs0.20.0 on Astro 7.4.2). The Nuxt build was already broken onmain—@vue/compiler-sfcfails to resolveNuxtLinkPropsindocs-please— and no CI workflow built the docs, so this PR delivers the first working docs build.Changes
src/content/docs/; prose is unchanged otherwise./docs/<group>/<page>to/<group>/<page>/; a_redirectsrule 301-redirects old links.::code-groupblocks to<Tabs>and usesLinkButton+CardGridon the landing page, whose GitHub link now points topleaseai/code-intelligence.docs-pleasedependencies since the site is static.eslint.config.jsignoreapps/docs/**and drops the Nuxt MDC override.Migration
.output/publictodistin the dashboard (not visible from the repo).Written for commit 00cf638. Summary will update on new commits.
Demo