Skip to content

feat: scaffold website-v2 Next.js app#332

Open
aidenybai wants to merge 5 commits into
mainfrom
website-v2
Open

feat: scaffold website-v2 Next.js app#332
aidenybai wants to merge 5 commits into
mainfrom
website-v2

Conversation

@aidenybai
Copy link
Copy Markdown
Owner

@aidenybai aidenybai commented May 10, 2026

Summary

  • Scaffold a fresh Next.js 16 app at apps/website-v2 via create-next-app (TypeScript, Tailwind v4, App Router, Turbopack)
  • Strip placeholder files/styles down to a clean starting point
  • Add @react-grab/website-v2 to changeset ignore list

Test Plan

  • pnpm install from root succeeds
  • pnpm --filter @react-grab/website-v2 dev starts the dev server

Made with Cursor


Note

Medium Risk
Moderate risk due to changes in build/bundling outputs for react-grab and @react-grab/mcp, which could affect consumers expecting the previous copied artifact names.

Overview
Introduces a new apps/website-v2 Next.js (App Router) scaffold with Tailwind v4/shadcn setup, a minimal homepage, and global layout metadata/fonts.

Adds two content endpoints: /llms.txt serving markdown usage/install docs and /script.js serving the react-grab browser bundle (loaded from app/layout.tsx). Also adds a request proxy helper to rewrite / or /llm.txt to /llms.txt based on the Accept header, and updates Changesets to ignore @react-grab/website-v2.

Updates react-grab and @react-grab/mcp build configs to emit IIFE bundles as *.global.js directly (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-v2 with Tailwind v4, App Router, and Turbopack. Serves the react-grab global bundle at /script.js and adds an /llms.txt route with usage/install docs; updates builds to emit .global.js.

  • New Features

    • Minimal app with TypeScript and a “Hello World” page.
    • Tailwind v4 via PostCSS with shadcn setup (app/globals.css).
    • Serve react-grab at /script.js (loaded in RootLayout) and add /llms.txt markdown docs; set Vary: Accept on /.
  • Refactors

    • Emit .global.js outputs for react-grab and @react-grab/mcp; removed copy/rename steps.
    • Disabled Next dev indicators and externalized react-grab on the server.
    • Cleaned default scaffolding (removed ESLint and favicon); added @react-grab/website-v2 to Changesets ignore.

Written for commit ec933b9. Summary will update on new commits.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-grab-storybook Error Error May 15, 2026 1:38pm
react-grab-website Error Error May 15, 2026 1:38pm

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 10, 2026

Open in StackBlitz

npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/cli@332
npm i https://pkg.pr.new/aidenybai/react-grab/grab@332
npm i https://pkg.pr.new/aidenybai/react-grab/@react-grab/mcp@332
npm i https://pkg.pr.new/aidenybai/react-grab@332

commit: 278f1d2

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

@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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 09539e1. Configure here.

Comment thread apps/website-v2/proxy.ts

export const config = {
matcher: ["/", "/llm.txt"],
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 278f1d2. Configure here.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread apps/website-v2/proxy.ts
return response;
}

const response = request.headers.get("accept")?.includes(markdownAcceptHeader)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +8 to +10
--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;
Copy link
Copy Markdown
Contributor

@vercel vercel Bot May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Font theme variables should reference Next.js font CSS variables instead of hardcoding font names for maintainability and single source of truth

Fix on Vercel

Comment thread apps/website-v2/proxy.ts
aidenybai and others added 5 commits May 15, 2026 06:30
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ 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"],
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ec933b9. Configure here.

Copy link
Copy Markdown
Contributor

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

The pnpm-lock.yaml file is out of sync with packages/cli/package.json, causing Vercel build failures with ERR_PNPM_OUTDATED_LOCKFILE

Fix on Vercel

Copy link
Copy Markdown
Contributor

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

The pnpm-lock.yaml file is out of sync with packages/cli/package.json, causing Vercel build failures with ERR_PNPM_OUTDATED_LOCKFILE

Fix on Vercel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant