Conversation
…d markdown copy functionality.
…t in LLM-friendly formats.
…ove the 'Edit on GitHub' component.
|
|
Warning Rate limit exceeded
⌛ 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. 📒 Files selected for processing (1)
WalkthroughThis change replaces the EditOnGithub component with new page action features (LLMCopyButton and ViewOptions), removes the component and its tests, and adds infrastructure including new API routes, utilities, and configuration to serve LLM-generated Markdown versions of documentation pages. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
…d delete middleware.ts.
…, and new styling definitions.
…date their styling.
…ponent in `page-actions.tsx`.
…background, text, and hover styles.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Fix all issues with AI agents
In `@apps/www/app/docs/`[[...slug]]/page.tsx:
- Around line 32-35: The githubUrl construction can produce malformed paths when
NEXT_PUBLIC_DOCS_CONTENT_PATH lacks a trailing slash or page.path has a leading
slash; update the logic used by getLinkTitleAndHref call that builds githubUrl
to normalize both segments (ensure NEXT_PUBLIC_DOCS_CONTENT_PATH ends with a
single slash and strip any leading slash from page.path, or vice-versa) before
concatenation so the resulting href is always a valid repo path; modify the
expression that passes `${process.env.NEXT_PUBLIC_DOCS_CONTENT_PATH ??
"apps/www/content/docs/"}${page.path}` to perform this normalization.
In `@apps/www/cli.json`:
- Around line 1-12: The cli.json references the schema at
node_modules/@fumadocs/cli/dist/schema/default.json but the `@fumadocs/cli`
package is missing from apps/www/package.json; add "@fumadocs/cli" to the
apps/www package.json dependencies (or devDependencies) and run yarn/npm install
so the schema path resolves, ensuring IDE JSON schema validation works for the
"uiLibrary" and other keys in cli.json.
In `@apps/www/components/page-actions.tsx`:
- Around line 27-47: The fetch passed into new ClipboardItem can succeed at
network level but return a non-2xx response; update the logic inside the
useCopyButton handler (the async callback using markdownUrl, cache, setLoading,
and ClipboardItem) to await fetch(markdownUrl) into a response variable, check
response.ok and throw or reject with a clear error if not ok, then await
response.text(), cache.set(markdownUrl, content) and return content; this
ensures failed HTTP responses do not get written to the clipboard and bubble as
errors to be handled by the existing try/finally around setLoading.
- Around line 82-87: The SSR fallback sets fullMarkdownUrl to the literal string
"loading", producing an invalid URL in the query; change the useMemo logic (the
items computation around useMemo, fullMarkdownUrl and q) to avoid constructing a
URL during SSR—use an empty string or the original relative markdownUrl when
typeof window === "undefined", or defer URL construction until client-side
(e.g., only build new URL(markdownUrl, window.location.origin) when window
exists) so fullMarkdownUrl is always a valid string for the query generated in
items.
In `@apps/www/components/ui/button.tsx`:
- Line 17: The outline variant in the Button component uses the class string
that sets "bg-primary/5" with "text-foreground/90" which can reduce contrast in
dark mode; inspect the Button component's outline variant (the class string
containing "border border-border bg-primary/5 hover:bg-primary/10
hover:border-primary/30 text-foreground/90 hover:text-primary") and either
replace text-foreground/90 with a full-contrast token (e.g., text-foreground) or
add dark: modifiers (e.g., dark:text-foreground) or adjust the background token
(e.g., bg-primary/10) to meet your accessibility contrast targets, then verify
with your contrast checker against the theme tokens and update the Tailwind
classes accordingly.
In `@apps/www/package.json`:
- Line 20: The package `@radix-ui/react-popover`@1.1.15 declares peerDeps for
React ^16.8.0 || ^17 || ^18 and thus does not officially support React 19.2.3
used in this repo; update package.json to either (a) upgrade
`@radix-ui/react-popover` to a Radix release that explicitly supports React 19
when available, or (b) if you must keep this version, add a pnpm override
(pnpm.overrides) or package.json "resolutions"/"overrides" entry to coerce
compatibility and add a short comment explaining the risk, then run install and
exercise components using Popover to verify runtime behavior (reference
`@radix-ui/react-popover` in package.json).
🧹 Nitpick comments (2)
apps/www/lib/cn.ts (1)
1-1: Add JSDoc for the publiccnutility.This is a public API; add a brief JSDoc (with example) for discoverability.
♻️ Proposed refactor
-export { twMerge as cn } from "tailwind-merge"; +import { twMerge } from "tailwind-merge"; + +/** + * Merge Tailwind class names with conflict resolution. + * + * `@example` + * cn("px-2", isActive && "text-primary") + */ +export const cn = twMerge;As per coding guidelines, public APIs should be documented with JSDoc.
apps/www/app/llms-full.txt/route.ts (1)
7-12: Consider adding aContent-Typeheader for consistency.The sibling route at
llms.mdx/docs/[[...slug]]/route.tsexplicitly setsContent-Type: text/markdown. For consistency and clarity, consider settingContent-Type: text/plainhere.♻️ Suggested improvement
export async function GET() { const scan = source.getPages().map(getLLMText); const scanned = await Promise.all(scan); - return new Response(scanned.join("\n\n")); + return new Response(scanned.join("\n\n"), { + headers: { + "Content-Type": "text/plain; charset=utf-8", + }, + }); }
…ion and copy-to-clipboard error handling, and refine button styling.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@apps/www/DEPENDENCY_NOTES.md`:
- Around line 14-18: Update the compound modifier in the text to use a
hyphenated form: change the phrase "React 19 compatible" to "React
19-compatible" wherever it appears (notably in the sentence about monitoring
Radix UI releases and upgrading `@radix-ui/react-popover`) to correct the
grammar and improve readability.
| - The peer dependency warning can be safely ignored until Radix UI releases an official React 19 compatible version. | ||
|
|
||
| **Future action:** | ||
| - Monitor Radix UI releases for official React 19 support | ||
| - Upgrade `@radix-ui/react-popover` when a React 19 compatible version is available |
There was a problem hiding this comment.
Hyphenate the compound modifier “React 19-compatible.”
Minor grammar tweak to improve readability.
✏️ Suggested fix
- The peer dependency warning can be safely ignored until Radix UI releases an official React 19 compatible version.
+ The peer dependency warning can be safely ignored until Radix UI releases an official React 19-compatible version.
- - Upgrade `@radix-ui/react-popover` when a React 19 compatible version is available
+ - Upgrade `@radix-ui/react-popover` when a React 19-compatible version is available📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - The peer dependency warning can be safely ignored until Radix UI releases an official React 19 compatible version. | |
| **Future action:** | |
| - Monitor Radix UI releases for official React 19 support | |
| - Upgrade `@radix-ui/react-popover` when a React 19 compatible version is available | |
| - The peer dependency warning can be safely ignored until Radix UI releases an official React 19-compatible version. | |
| **Future action:** | |
| - Monitor Radix UI releases for official React 19 support | |
| - Upgrade `@radix-ui/react-popover` when a React 19-compatible version is available |
🧰 Tools
🪛 LanguageTool
[grammar] ~14-~14: Use a hyphen to join words.
Context: ...l Radix UI releases an official React 19 compatible version. Future action: ...
(QB_NEW_EN_HYPHEN)
[grammar] ~18-~18: Use a hyphen to join words.
Context: ...@radix-ui/react-popover` when a React 19 compatible version is available
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
In `@apps/www/DEPENDENCY_NOTES.md` around lines 14 - 18, Update the compound
modifier in the text to use a hyphenated form: change the phrase "React 19
compatible" to "React 19-compatible" wherever it appears (notably in the
sentence about monitoring Radix UI releases and upgrading
`@radix-ui/react-popover`) to correct the grammar and improve readability.
… the environment variable is missing.
…d of error throwing when `NEXT_PUBLIC_GITHUB_URL` is not configured.
Closes #752
Summary by CodeRabbit
Release Notes
New Features
Style
Chores
✏️ Tip: You can customize this high-level summary in your review settings.