Conversation
…afe setup and clarify advanced configurations.
… across documentation and specifications
…tions and type usage patterns
|
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR standardizes wording to "typesafety", restructures Vite and Bun plugin docs into Quickstarts, adds the missing ChangesDocs + Typing & Example Wiring
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. Review rate limit: 0/1 reviews remaining, refill in 35 minutes and 18 seconds.Comment |
commit: |
📦 Bundle Size Report
✅ All size limits passed! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/www/content/docs/bun-plugin/index.mdx`:
- Around line 121-150: Add a short prerequisite note to this section stating
that external validators (e.g., Zod or Valibot) must be installed when used
alongside ArkType; specifically call out the imported symbol "z" from "zod" in
the src/env.ts example and provide a one-line install suggestion (e.g., install
zod or valibot) so readers don't get an unresolved-module error when copying the
snippet; update the prose around the code block mentioning the dependency and,
if helpful, list the package names "zod" and "valibot" as optional
prerequisites.
In `@apps/www/content/docs/vite-plugin/index.mdx`:
- Around line 87-106: Add a brief prerequisite note above the "Using Standard
Schema validators (Zod, Valibot)" example that calls out external validator
packages must be installed (e.g., zod or valibot) when using Standard Schema
validators; reference the example's import { z } from "zod" and the Env = type({
... }) usage so readers know to run npm/yarn install for those validator
packages before copying the vite.config.ts snippet.
In `@apps/www/lib/twoslash-options.ts`:
- Line 28: The CLI's MDX twoslash regex in apps/www/bin/twoslash-mdx.ts
currently only matches (ts|js) code blocks so newly added "tsx"/"jsx" blocks
from twoslash-options.ts won't be processed; update the regex (the
codeBlockRegex or equivalent constant used in twoslash-mdx.ts) to include tsx
and jsx (i.e. match ts|tsx|js|jsx) so the CLI path picks up those code fences
and captures their content the same way as ts/js blocks.
In `@openspec/changes/improve-plugin-docs/design.md`:
- Line 44: The doc mentions arkenvVitePlugin(Env) but the implemented docs use
arkenv(Env); update the reference in the design text to match the implemented
API by replacing arkenvVitePlugin(Env) with arkenv(Env) (or vice versa if you
intend to change the implementation) and ensure the example and any surrounding
text refer to the same symbol (arkenv(Env)) as used in
apps/www/content/docs/vite-plugin/index.mdx.
In `@openspec/changes/improve-plugin-docs/walkthrough.md`:
- Line 38: The walkthrough uses a different env key (VITE_MY_ENV) than the
examples (VITE_MY_VAR); update the walkthrough sentence that mentions export
const Env in the vite.config.ts / vite-env.d.ts snippet to use the same key name
as the examples (VITE_MY_VAR) so import.meta.env.VITE_MY_VAR is consistently
referenced across the walkthrough and example schema.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1e6dbfcf-0618-4235-9d38-11cdb88f2457
📒 Files selected for processing (28)
apps/playgrounds/vite/README.mdapps/playgrounds/vite/src/vite-env.d.tsapps/www/content/docs/bun-plugin/index.mdxapps/www/content/docs/bun-plugin/typing-process-env.mdxapps/www/content/docs/vite-plugin/arkenv-in-viteconfig.mdxapps/www/content/docs/vite-plugin/index.mdxapps/www/content/docs/vite-plugin/meta.jsonapps/www/content/docs/vite-plugin/typing-import-meta-env.mdxapps/www/lib/twoslash-options.tsapps/www/source.config.tsexamples/with-vite-react/README.mdopenspec/changes/archive/2025-11-20-add-arkenv-vite-config/design.mdopenspec/changes/archive/2025-11-20-add-arkenv-vite-config/proposal.mdopenspec/changes/archive/2025-11-20-add-arkenv-vite-config/specs/vite-config-usage/spec.mdopenspec/changes/archive/2025-11-20-add-arkenv-vite-config/tasks.mdopenspec/changes/archive/2025-11-20-fix-vite-plugin-env-filter/design.mdopenspec/changes/archive/2025-11-28-add-bun-plugin/design.mdopenspec/changes/archive/2025-11-28-add-bun-plugin/proposal.mdopenspec/changes/archive/2025-12-22-coercion-public-api/proposal.mdopenspec/changes/archive/2026-01-21-fix-standard-mode-inference/proposal.mdopenspec/changes/improve-plugin-docs/design.mdopenspec/changes/improve-plugin-docs/proposal.mdopenspec/changes/improve-plugin-docs/tasks.mdopenspec/changes/improve-plugin-docs/walkthrough.mdopenspec/specs/vite-config-usage/spec.mdpackages/arkenv/CHANGELOG.mdpackages/arkenv/src/standard-mode.test.tspackages/vite-plugin/CHANGELOG.md
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 5 file(s) based on 5 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 5 file(s) based on 5 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
apps/www/bin/twoslash-mdx.ts (1)
17-18: ⚡ Quick winDerive fence languages from shared Twoslash config to prevent drift.
This regex duplicates
arktypeTwoslashOptions.langs; future updates can silently desync extraction vs processing. Build the alternation from the sharedlangslist instead.♻️ Proposed refactor
-const codeBlockRegex = - /```(ts|tsx|js|jsx) twoslash(?:.*)\r?\n([\s\S]*?)\r?\n```/g; +const escapedLangs = arktypeTwoslashOptions.langs + .map((lang) => lang.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")) + .join("|"); + +const codeBlockRegex = new RegExp( + "```(" + escapedLangs + ")\\s+twoslash(?:.*)\\r?\\n([\\s\\S]*?)\\r?\\n```", + "g", +);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/www/bin/twoslash-mdx.ts` around lines 17 - 18, Replace the hard-coded language alternation in the existing const codeBlockRegex with a RegExp built from arktypeTwoslashOptions.langs: map and escape each lang (escape special regex chars), join them with "|" to form the alternation, then construct a new RegExp string that captures the language group and the twoslash code block body (preserving the same capture groups and \r?\n handling) and instantiate it with the "g" flag; overwrite the previous codeBlockRegex declaration so extraction stays in sync with arktypeTwoslashOptions.langs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/www/content/docs/vite-plugin/index.mdx`:
- Line 4: Update the description string at the top of the MDX (the line that
currently reads "The ArkEnv plugin for Vite lets you validate environment
variables at build-time with ArkEnv") to end with "with ArkType" instead of
"with ArkEnv" so it reads "The ArkEnv plugin for Vite lets you validate
environment variables at build-time with ArkType"; edit the description field in
the document (the same line shown in the diff) to replace the trailing "ArkEnv"
with "ArkType".
- Line 4: Update the description frontmatter in
apps/www/content/docs/vite-plugin/index.mdx: replace the trailing phrase "with
ArkEnv" with "with ArkType" so the sentence reads "The ArkEnv plugin for Vite
lets you validate environment variables at build-time with ArkType." Locate and
edit the description string in the file's frontmatter (the line starting with
description:) to make this one-word replacement.
---
Nitpick comments:
In `@apps/www/bin/twoslash-mdx.ts`:
- Around line 17-18: Replace the hard-coded language alternation in the existing
const codeBlockRegex with a RegExp built from arktypeTwoslashOptions.langs: map
and escape each lang (escape special regex chars), join them with "|" to form
the alternation, then construct a new RegExp string that captures the language
group and the twoslash code block body (preserving the same capture groups and
\r?\n handling) and instantiate it with the "g" flag; overwrite the previous
codeBlockRegex declaration so extraction stays in sync with
arktypeTwoslashOptions.langs.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6c12d0b9-2578-457c-8e25-2a146913fa32
⛔ Files ignored due to path filters (2)
examples/with-bun-react/bun.lockis excluded by!**/*.lockexamples/with-bun/bun.lockis excluded by!**/*.lock
📒 Files selected for processing (6)
apps/www/bin/twoslash-mdx.tsapps/www/content/docs/bun-plugin/index.mdxapps/www/content/docs/vite-plugin/index.mdxexamples/with-vite-react/src/vite-env.d.tsopenspec/changes/improve-plugin-docs/design.mdopenspec/changes/improve-plugin-docs/walkthrough.md
🚧 Files skipped from review as they are similar to previous changes (3)
- openspec/changes/improve-plugin-docs/walkthrough.md
- apps/www/content/docs/bun-plugin/index.mdx
- openspec/changes/improve-plugin-docs/design.md
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Summary by CodeRabbit
Documentation
Improvements