chore: Starlight → Nimbus migration cleanup#32203
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
|
Nimbus Preview URL: https://11972d15.preview.developers.cloudflare.com |
Review
Fix in your agentFix the following review findings in PR #32203 (https://github.com/cloudflare/cloudflare-docs/pull/32203).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, fix all legitimate findings. For any you decide to skip,
post a comment on this PR with the finding ID and your reasoning.
---
## Code Review
### Warnings (2)
#### CR-f5d555a92aac · Nimbus output directories not ignored by dev watcher
- **File:** `astro.config.ts` line 38
- **Issue:** Line 38 removed `**/dist-nimbus/**` and `**/.astro-cache-nimbus/**` from `vite.server.watch.ignored`, but `.gitignore` still lists both directories so they can persist in local checkouts. The Vite dev server will enumerate these stale build/cache directories, causing slow startup and extra memory use.
- **Fix:** Continue ignoring `dist-nimbus/` and `.astro-cache-nimbus/` until those entries are removed from `.gitignore` and the directories are no longer expected locally, or delete the stale directories and their `.gitignore` entries as part of this cleanup.
#### CR-eff38308ceed · Unvalidated input in formatBytes
- **File:** `scripts/optimize-svgs.ts` line 4
- **Issue:** formatBytes computes Math.log(bytes) and indexes sizes[i] without handling negative values. It is called with originalSize - optimizedSize, which can be negative if SVGO increases an SVG's size, causing NaN/undefined in the final log.
- **Fix:** Guard against negative bytes or clamp to zero before indexing sizes and computing Math.log.
### Suggestions (1)
#### CR-083f45bcec5f · Leftover dead code after migration
- **File:** `src/scripts/footnotes.ts` line 1
- **Issue:** This file now imports from nimbus, but the only known consumer was `src/components/overrides/Head.astro`, which no longer exists on the `remove-starlight-ci` branch. `src/nimbus/scripts/footnotes.client.ts` already provides the same footnote tooltip behavior for Nimbus, and `src/nimbus/layouts/BaseLayout.astro` loads it.
- **Fix:** Delete `src/scripts/footnotes.ts`; keeping it adds a stray dependency on Nimbus internals and duplication with the Nimbus footnotes client script.
---
## Conventions
### Warnings (1)
#### CV-29e2c2242d93 · Scope accuracy
- **File:** PR-level finding
- **Issue:** The PR removes hundreds of legacy source files across src/components, src/pages, src/plugins, src/schemas, src/styles, src/util, bin/, and others, but the description only discusses CI workflows, astro.config.ts, Wrangler configs, worker redirects, package.json, and tsconfig excludes.
- **Fix:** Add a section summarizing the wholesale deletion of legacy Starlight source directories (components, pages, plugins, schemas, styles, utilities, etc.).
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (2)
Suggestions (1)
ConventionsWarnings (1)
Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
585addf to
8d7c033
Compare
… and dead footnotes script
|
CR-eff38308ceed (formatBytes negative input): Skipping. |
|
CR-f5d555a92aac and CR-083f45bcec5f: Both were fixed in earlier commits on this branch — |
Summary
Completes the Starlight → Nimbus migration by removing all migration scaffolding and making Nimbus the standard build.
CI (
ci.yml,publish-production.yml):buildjob,publish-previewjob, and link-validation stepsnimbus-preview-deploy.yml(stable preview environment used during migration, now redundant)nimbus-build→build,publish-nimbus-preview→publish-previewBUILD_TARGET: nimbusenv var — no longer neededastro-nimbus-assets→astro-assets,.astro-cache-nimbus→.astro-cachedist-nimbus→distastro.config.ts:isNimbusconditional and all Starlight-only code (307 → 43 lines)markdown,integrations, andvitedirectly fromsrc/nimbus/astro-config.tsWrangler configs:
wrangler.nimbus-preview.json;wrangler.preview.jsonis now the sole preview configwrangler.jsoncandwrangler.preview.jsonto point todistinstead ofdist-nimbusOther:
worker/index.tsandworker/index.preview.tsredirects imports updated to../dist/__redirectspackage.jsonrenamed fromcloudflare-docs-starlighttocloudflare-docsdist-nimbusfromtsconfig.jsonandsrc/nimbus/tsconfig.jsonexcludes