Conversation
… main Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lowercased slug) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ealth (en + ja) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ADME Also exclude docs/.astro/ (Astro-generated types) from Prettier and ESLint, which were not picked up before the docs workspace was added to the build scope. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 53 minutes and 43 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new private Astro/Starlight documentation workspace ( ChangesDocumentation site + docsUrl migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/deploy-docs.yml:
- Around line 19-20: The checkout step in the deploy-docs workflow is missing
the persist-credentials security setting. Add a with section to the
actions/checkout action and include persist-credentials: false to ensure git
credentials are not persisted in the .git directory after checkout, preventing
potential credential exposure in build artifacts.
- Around line 19-44: Update the `actions/checkout` action version in the
deploy-docs workflow to match the version used in the ci.yml and release.yml
workflows. Change the checkout action from v7.0.0 to v6.0.3 to maintain
consistency across all workflow files. This ensures all workflows are using the
same version of the checkout action for better maintainability and predictable
behavior.
- Around line 10-13: Remove the pages and id-token write permissions from the
workflow-level permissions block, keeping only contents: read at the workflow
level. Then add a job-level permissions section to the deploy job that includes
pages: write and id-token: write. This ensures the build job only gets the
minimal contents: read permission it needs, while the deploy job gets the
elevated pages and id-token permissions required for deployment.
In `@docs/package.json`:
- Around line 1-20: The docs/package.json file is missing the required
devEngines.runtime.version field that the setup-node action and deploy-docs
workflow depend on to extract the Node.js version. Add a devEngines object to
the package.json with a runtime.version property specifying the required Node.js
version (this should match the version used in your project). This field needs
to be present in the root-level package.json object alongside the existing name,
private, type, scripts, and dependencies fields.
In `@docs/src/content/docs/guides/getting-started.md`:
- Around line 42-58: The code fence containing the Svelte Vitals example output
is missing a language specifier, which causes markdownlint-cli2 to flag it as a
violation. Add the language label `text` immediately after the opening triple
backticks (``` text) to properly label this markdown code block as plain text
output, satisfying the linter requirement.
In `@docs/src/content/docs/guides/health-report.md`:
- Around line 29-31: Add language tags to the three unlabeled code fences in the
markdown file to satisfy markdownlint-cli2 requirements. The fences contain
mathematical formulas and examples at lines 29-31, 54-56, and 60-62. Add a
language identifier like `text` immediately after the opening triple backticks
for each fence (e.g., change ``` to ```text) to properly label each code block
and ensure the documentation builds successfully.
In `@docs/src/content/docs/ja/guides/getting-started.md`:
- Around line 42-58: The code fence displaying the "Svelte Vitals · SEO (static
mode)" output is missing a language tag, which causes the MD040 linting rule to
fail. Add the language identifier `text` to the opening fence by changing the
opening triple backticks to include the language tag. This will label the fence
as plain text output and resolve the linting violation.
In `@docs/src/content/docs/ja/guides/health-report.md`:
- Around line 29-62: Three fenced code blocks in the document are missing
language identifiers, which causes markdownlint MD040 violations. Add the
language tag `text` to each of the three fenced code blocks: the formula block
containing the Health calculation equation, the first output example showing
Health: 85 with SEO and Performance scores, and the second output example
showing Health: 90 with only SEO score. Modify each opening fence marker from
triple backticks to triple backticks followed by the word `text`.
In `@docs/src/content/docs/rules/seo008.md`:
- Around line 18-30: The documentation example in the seo008.md file for adding
JSON-LD is showing an incorrect approach using literal JSON in a `<script
type="application/ld+json">` tag, which can cause hydration and parsing issues
in Svelte. Replace the example code with the correct approach using {`@html`} with
JSON.stringify(), wrapping the script tag like {`@html` `<script
type="application/ld+json">${JSON.stringify(data)}</script>`} to properly escape
and serialize the JSON-LD data. Update the accompanying explanation text to
clarify that this {`@html`} approach with JSON.stringify() is the recommended best
practice per official SvelteKit documentation, removing the note about using
literal JSON.
In `@docs/superpowers/plans/2026-06-23-docs-site.md`:
- Around line 277-280: The stray file check in the test is only scanning the
enRules directory for orphaned rule pages, which means stale jaRules files can
bypass this validation. Duplicate the same readdirSync and ids.has check pattern
for the jaRules directory to ensure both locale directories are validated for
stray files without matching rules.
- Around line 155-161: The markdown code fence in Step 7 that contains the
.gitignore file contents (listing dist/, .astro/, and node_modules/) is missing
a language label, which causes markdownlint to flag it. Add the gitignore
language identifier to the opening fence by changing the bare backticks to
include gitignore as the language type, so the fence is properly labeled for
documentation linting purposes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d6531b0f-3a09-466a-84b7-bce35da0e8e1
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (62)
.changeset/docs-site.md.github/workflows/ci.yml.github/workflows/deploy-docs.yml.prettierignoreREADME.mddocs/.gitignoredocs/astro.config.mjsdocs/package.jsondocs/src/content.config.tsdocs/src/content/docs/guides/cli.mddocs/src/content/docs/guides/dev-overlay.mddocs/src/content/docs/guides/getting-started.mddocs/src/content/docs/guides/health-report.mddocs/src/content/docs/guides/mcp.mddocs/src/content/docs/guides/plugin-mode.mddocs/src/content/docs/guides/reporters.mddocs/src/content/docs/index.mdxdocs/src/content/docs/ja/guides/cli.mddocs/src/content/docs/ja/guides/dev-overlay.mddocs/src/content/docs/ja/guides/getting-started.mddocs/src/content/docs/ja/guides/health-report.mddocs/src/content/docs/ja/guides/mcp.mddocs/src/content/docs/ja/guides/plugin-mode.mddocs/src/content/docs/ja/guides/reporters.mddocs/src/content/docs/ja/index.mdxdocs/src/content/docs/ja/rules/perf001.mddocs/src/content/docs/ja/rules/perf002.mddocs/src/content/docs/ja/rules/seo001.mddocs/src/content/docs/ja/rules/seo002.mddocs/src/content/docs/ja/rules/seo003.mddocs/src/content/docs/ja/rules/seo004.mddocs/src/content/docs/ja/rules/seo005.mddocs/src/content/docs/ja/rules/seo006.mddocs/src/content/docs/ja/rules/seo007.mddocs/src/content/docs/ja/rules/seo008.mddocs/src/content/docs/ja/rules/seo009.mddocs/src/content/docs/rules/perf001.mddocs/src/content/docs/rules/perf002.mddocs/src/content/docs/rules/seo001.mddocs/src/content/docs/rules/seo002.mddocs/src/content/docs/rules/seo003.mddocs/src/content/docs/rules/seo004.mddocs/src/content/docs/rules/seo005.mddocs/src/content/docs/rules/seo006.mddocs/src/content/docs/rules/seo007.mddocs/src/content/docs/rules/seo008.mddocs/src/content/docs/rules/seo009.mddocs/superpowers/plans/2026-06-23-docs-site.mddocs/superpowers/specs/2026-06-23-docs-site-design.mddocs/tsconfig.jsoneslint.config.jspackages/cli/test/docs-links.test.tspackages/core/src/reporter/sarif.tspackages/core/src/reporter/shared.tspackages/core/src/rule.tspackages/core/test/agent-report.test.tspackages/core/test/explain-rule.test.tspackages/core/test/json-report.test.tspackages/core/test/reporter-shared.test.tspackages/core/test/sarif-report.test.tspackages/mcp/test/explain-rule-tool.test.tspnpm-workspace.yaml
…de fences - Format docs-site plan markdown so prettier --check (CI lint) passes. - deploy-docs.yml: scope pages/id-token write to the deploy job only, align checkout to v6.0.3 (repo convention), add persist-credentials: false. - Add text language tags to console-output/formula code fences in the getting-started and health-report guides (en + ja). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a new bilingual (en/ja) Astro/Starlight documentation site in a top-level docs/ workspace, deployable to GitHub Pages, and updates all rule “learn more” links (docsUrl + SARIF informationUri) to point to the new published docs (lowercased /rules/<id> slugs) instead of the dead svelte-vitals.dev domain.
Changes:
- Add a new
docs/workspace (Astro + Starlight) with bilingual guides and per-rule reference pages for SEO/PERF rules. - Repoint and dedupe canonical rule docs URL generation via
docsUrlFor()and update SARIF metadata. - Add CI validation for docs + a deploy workflow for GitHub Pages; add a link to docs from the README; add a patch changeset for the output URL change.
Reviewed changes
Copilot reviewed 62 out of 63 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds a prominent link to the new documentation site. |
| pnpm-workspace.yaml | Registers docs/ as a workspace and adds Astro/Starlight + sharp to the catalog/allowBuilds. |
| packages/mcp/test/explain-rule-tool.test.ts | Updates MCP test expectations to the new docs URL. |
| packages/core/test/sarif-report.test.ts | Updates SARIF tests to the new docs URL/helpUri host + slug. |
| packages/core/test/reporter-shared.test.ts | Updates reporter shared metadata/docsUrl tests for new canonical docs URL. |
| packages/core/test/json-report.test.ts | Updates JSON report test docsUrl expectations to the new host + lowercase slug. |
| packages/core/test/explain-rule.test.ts | Updates explainRule tests to expect lowercased docs slugs. |
| packages/core/test/agent-report.test.ts | Updates agent report test docsUrl expectations. |
| packages/core/src/rule.ts | Changes docsUrlFor() to GitHub Pages base and lowercases rule IDs for routing. |
| packages/core/src/reporter/shared.ts | Deduplicates docsUrlFor by importing/re-exporting it from rule.ts. |
| packages/core/src/reporter/sarif.ts | Updates SARIF informationUri to the GitHub Pages docs base. |
| packages/cli/test/docs-links.test.ts | Adds link-integrity tests ensuring rule docs pages exist for en + ja and no stray pages. |
| eslint.config.js | Ignores Astro-generated **/.astro/** files for linting. |
| docs/tsconfig.json | Adds strict Astro TS config for the docs workspace. |
| docs/superpowers/specs/2026-06-23-docs-site-design.md | Adds design/spec documentation for the docs-site initiative. |
| docs/superpowers/plans/2026-06-23-docs-site.md | Adds an implementation plan covering scaffolding, content, CI, deploy, and changesets. |
| docs/src/content/docs/rules/seo009.md | Adds English rule reference content for SEO009. |
| docs/src/content/docs/rules/seo008.md | Adds English rule reference content for SEO008. |
| docs/src/content/docs/rules/seo007.md | Adds English rule reference content for SEO007. |
| docs/src/content/docs/rules/seo006.md | Adds English rule reference content for SEO006. |
| docs/src/content/docs/rules/seo005.md | Adds English rule reference content for SEO005. |
| docs/src/content/docs/rules/seo004.md | Adds English rule reference content for SEO004. |
| docs/src/content/docs/rules/seo003.md | Adds English rule reference content for SEO003. |
| docs/src/content/docs/rules/seo002.md | Adds English rule reference content for SEO002. |
| docs/src/content/docs/rules/seo001.md | Adds English rule reference content for SEO001. |
| docs/src/content/docs/rules/perf002.md | Adds English rule reference content for PERF002. |
| docs/src/content/docs/rules/perf001.md | Adds English rule reference content for PERF001. |
| docs/src/content/docs/ja/rules/seo009.md | Adds Japanese rule reference content for SEO009. |
| docs/src/content/docs/ja/rules/seo008.md | Adds Japanese rule reference content for SEO008. |
| docs/src/content/docs/ja/rules/seo007.md | Adds Japanese rule reference content for SEO007. |
| docs/src/content/docs/ja/rules/seo006.md | Adds Japanese rule reference content for SEO006. |
| docs/src/content/docs/ja/rules/seo005.md | Adds Japanese rule reference content for SEO005. |
| docs/src/content/docs/ja/rules/seo004.md | Adds Japanese rule reference content for SEO004. |
| docs/src/content/docs/ja/rules/seo003.md | Adds Japanese rule reference content for SEO003. |
| docs/src/content/docs/ja/rules/seo002.md | Adds Japanese rule reference content for SEO002. |
| docs/src/content/docs/ja/rules/seo001.md | Adds Japanese rule reference content for SEO001. |
| docs/src/content/docs/ja/rules/perf002.md | Adds Japanese rule reference content for PERF002. |
| docs/src/content/docs/ja/rules/perf001.md | Adds Japanese rule reference content for PERF001. |
| docs/src/content/docs/ja/index.mdx | Adds Japanese docs landing page. |
| docs/src/content/docs/ja/guides/reporters.md | Adds Japanese guide for reporters. |
| docs/src/content/docs/ja/guides/plugin-mode.md | Adds Japanese guide for Vite plugin mode. |
| docs/src/content/docs/ja/guides/mcp.md | Adds Japanese guide for the MCP server. |
| docs/src/content/docs/ja/guides/health-report.md | Adds Japanese guide for Health scoring and --min-health. |
| docs/src/content/docs/ja/guides/getting-started.md | Adds Japanese Getting Started guide. |
| docs/src/content/docs/ja/guides/dev-overlay.md | Adds Japanese guide for the dev overlay/handle hook. |
| docs/src/content/docs/ja/guides/cli.md | Adds Japanese CLI reference guide. |
| docs/src/content/docs/index.mdx | Adds English docs landing page. |
| docs/src/content/docs/guides/reporters.md | Adds English guide for reporters. |
| docs/src/content/docs/guides/plugin-mode.md | Adds English guide for Vite plugin mode. |
| docs/src/content/docs/guides/mcp.md | Adds English guide for the MCP server. |
| docs/src/content/docs/guides/health-report.md | Adds English guide for Health scoring and --min-health. |
| docs/src/content/docs/guides/getting-started.md | Adds English Getting Started guide. |
| docs/src/content/docs/guides/dev-overlay.md | Adds English guide for the dev overlay/handle hook. |
| docs/src/content/docs/guides/cli.md | Adds English CLI reference guide. |
| docs/src/content.config.ts | Adds Starlight content collection configuration. |
| docs/package.json | Adds the private docs workspace package + scripts/dependencies. |
| docs/astro.config.mjs | Configures Starlight site/base + locales + sidebar/social links. |
| docs/.gitignore | Ignores docs build output and generated types. |
| .prettierignore | Ignores Astro-generated **/.astro/**. |
| .github/workflows/deploy-docs.yml | Adds GitHub Pages deployment workflow for the docs site. |
| .github/workflows/ci.yml | Adds a docs job to run pnpm --filter docs check and build. |
| .changeset/docs-site.md | Adds a patch changeset for the public docsUrl/SARIF URL change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…flow Revert the permission-scoping/checkout-version tweaks and match the production-tested svelte-meta-tags deploy workflow verbatim — lower risk than diverging, since that workflow is known to deploy Pages successfully. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
withastro/action's only Pages step is upload-pages-artifact (a regular artifact upload, ungated by GITHUB_TOKEN permissions), so the build job needs only contents: read. pages:write + id-token:write are required only by actions/deploy-pages, scoped to the deploy job. Resolves the excessive-permissions finding while remaining functionally equivalent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a bilingual (en + ja) Starlight documentation site under a new top-level
docs/workspace, deployed to GitHub Pages at https://oekazuma.github.io/svelte-vitals/, and repoint every finding'sdocsUrl(and the SARIFinformationUri) at it — these previously linked to the unpublishedsvelte-vitals.devdomain, so every finding's "learn more" link was dead.This is the "great documentation" pillar of the re-drawn 1.0 roadmap, mirroring the maintainer's other library svelte-meta-tags' Astro/Starlight setup.
What's in it
docs/workspace (private, Starlight): bilingual en (root) + ja via Starlightlocales,site: https://oekazuma.github.io/,base: /svelte-vitals. Notest/typecheckscript, so the existingpnpm -rgates skip it; private → excluded fromcheck:publish.docsUrlrepointed —docsUrlFor(id)now returnshttps://oekazuma.github.io/svelte-vitals/rules/${id.toLowerCase()}(lowercased slug, Starlight-idiomatic routing). Consolidated to a single definition inpackages/core/src/rule.ts; the reporter imports it. SARIFinformationUri→ the Pages base.docsUrl: SEO001–SEO009 + PERF001–PERF002. Each covers what it checks, why it matters, how to fix (seeded from the rule'srationale/recommendation/fix.snippet), and severity.packages/cli/test/docs-links.test.tsasserts every SEO/PERF rule that emits adocsUrlhas a matching en + ja page (lowercased slug) and that no stray pages exist in either locale, so no finding can 404.deploy-docs.ymlbuilds the Astro site and publishes to Pages ondocs/**pushes tomain;ci.ymlgains adocsjob runningpnpm --filter docs check+buildso docs breakage fails CI..astro/generated types excluded from Prettier/ESLint.Breaking-ish output change
The published surface that changes is the finding
docsUrland SARIFinformationUrihost/slug — covered by a@svelte-vitals/core+svelte-vitalspatch changeset (@svelte-vitals/viteand@svelte-vitals/mcpcascade a patch viaworkspace:*+updateInternalDependencies: patch, the established convention). Findings, scoring,--min-health, reporters, the vite plugin, and MCP are otherwise unchanged.GitHub Pages must be enabled once: Settings → Pages → Source: GitHub Actions. Until then
deploy-docs.ymlwill fail (the site won't publish, but nothing else breaks).Validation
pnpm -r typecheck,pnpm -r test(258 tests),pnpm build,pnpm --filter docs build(39 pages, no broken links),pnpm lint, publint — green.attwfails locally only (npm packexit 1 in the sandbox) — confirmed pre-existing and CI-unaffected.Process
Built subagent-driven: 5 tasks (each spec + quality reviewed) + a whole-branch review on Opus (verdict: ready to merge). One Minor follow-up from that review (stray-page check now scans both locale dirs) was applied.
🤖 Generated with Claude Code
Summary by CodeRabbit