feat: scaffold website-v2 Next.js app#332
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
| @theme inline { | ||
| --font-heading: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif; | ||
| --font-sans: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif; | ||
| --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace; |
There was a problem hiding this comment.
Font variables from next/font disconnected from Tailwind theme
Medium Severity
The next/font/google fonts in layout.tsx expose CSS variables --font-inter and --font-geist-mono, but the Tailwind @theme in globals.css hardcodes font names ("Inter", "Geist Mono") instead of referencing var(--font-inter) and var(--font-geist-mono). Since next/font registers fonts under generated names (e.g., __Inter_abc123), the hardcoded names won't match, and the browser falls back to system fonts. This is a known issue (shadcn-ui/ui#10391, #10393).
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 09539e1. Configure here.
|
|
||
| export const config = { | ||
| matcher: ["/", "/llm.txt"], | ||
| }; |
There was a problem hiding this comment.
Middleware proxy logic never executes as dead code
Medium Severity
proxy.ts exports a proxy function and a config object, but Next.js middleware requires a file named middleware.ts (or middleware.js) at the project root, exporting a function named middleware. Since this file is named proxy.ts and the function is exported as proxy (not middleware), Next.js never invokes it. The content-negotiation logic for serving llms.txt on / and the rewrite from /llm.txt to /llms.txt are completely inert — requests to /llm.txt will 404 and Accept: text/markdown on / will be ignored.
Reviewed by Cursor Bugbot for commit 278f1d2. Configure here.
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/website-v2/proxy.ts">
<violation number="1" location="apps/website-v2/proxy.ts:17">
P2: Accept header matching is case-sensitive; mixed-case `text/markdown` values will bypass the rewrite.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
| return response; | ||
| } | ||
|
|
||
| const response = request.headers.get("accept")?.includes(markdownAcceptHeader) |
There was a problem hiding this comment.
P2: Accept header matching is case-sensitive; mixed-case text/markdown values will bypass the rewrite.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/website-v2/proxy.ts, line 17:
<comment>Accept header matching is case-sensitive; mixed-case `text/markdown` values will bypass the rewrite.</comment>
<file context>
@@ -0,0 +1,32 @@
+ return response;
+ }
+
+ const response = request.headers.get("accept")?.includes(markdownAcceptHeader)
+ ? NextResponse.rewrite(new URL(markdownPathname, request.url))
+ : NextResponse.next({
</file context>
Tip: Review your code locally with the cubic CLI to iterate faster.
| --font-heading: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif; | ||
| --font-sans: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif; | ||
| --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace; |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ec933b9. Configure here.
| const geistMono = Geist_Mono({ | ||
| variable: "--font-geist-mono", | ||
| subsets: ["latin"], | ||
| }); |
There was a problem hiding this comment.
Font CSS variables mismatch breaks Next.js font optimization
Medium Severity
The font variable names in layout.tsx (--font-inter, --font-geist-mono) don't match the Tailwind theme tokens in globals.css (--font-sans, --font-mono, --font-heading). Next.js font loading generates unique font-family names (e.g. __Inter_abc123) and assigns them to the specified CSS variable. Since globals.css hardcodes "Inter" and "Geist Mono" as literal strings in --font-sans / --font-mono instead of referencing var(--font-inter) / var(--font-geist-mono), the optimized self-hosted fonts are never actually connected to the Tailwind utilities, bypassing Next.js font optimization entirely.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ec933b9. Configure here.


Summary
apps/website-v2viacreate-next-app(TypeScript, Tailwind v4, App Router, Turbopack)@react-grab/website-v2to changeset ignore listTest Plan
pnpm installfrom root succeedspnpm --filter @react-grab/website-v2 devstarts the dev serverMade with Cursor
Note
Medium Risk
Moderate risk due to changes in build/bundling outputs for
react-graband@react-grab/mcp, which could affect consumers expecting the previous copied artifact names.Overview
Introduces a new
apps/website-v2Next.js (App Router) scaffold with Tailwind v4/shadcn setup, a minimal homepage, and global layout metadata/fonts.Adds two content endpoints:
/llms.txtserving markdown usage/install docs and/script.jsserving thereact-grabbrowser bundle (loaded fromapp/layout.tsx). Also adds a request proxy helper to rewrite/or/llm.txtto/llms.txtbased on theAcceptheader, and updates Changesets to ignore@react-grab/website-v2.Updates
react-graband@react-grab/mcpbuild configs to emit IIFE bundles as*.global.jsdirectly (removing the post-build copy/rename step).Reviewed by Cursor Bugbot for commit ec933b9. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Scaffolded a new Next.js 16 app for
apps/website-v2with Tailwind v4, App Router, and Turbopack. Serves thereact-grabglobal bundle at/script.jsand adds an/llms.txtroute with usage/install docs; updates builds to emit.global.js.New Features
app/globals.css).react-grabat/script.js(loaded inRootLayout) and add/llms.txtmarkdown docs; setVary: Accepton/.Refactors
.global.jsoutputs forreact-graband@react-grab/mcp; removed copy/rename steps.react-grabon the server.@react-grab/website-v2to Changesets ignore.Written for commit ec933b9. Summary will update on new commits.