Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
There was a problem hiding this comment.
3 issues found across 21 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
2 issues found across 9 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
…d glow when it fades in
… can't disturb the showcase (discard-edits prompt, panel keys, modifier state, icon rotation, prompt confirmation)
…500ing on Vercel readFile with a computed path is invisible to output tracing, so the deployed function shipped without dist/index.global.js. Declare it via outputFileTracingIncludes and read it from a plain cwd-relative path instead of the require.resolve token dance.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8161ec0. Configure here.
|
|
||
| onMount(() => { | ||
| const resizeObserver = new ResizeObserver(handleViewportChange); | ||
| resizeObserver.observe(scopeContainer); |
There was a problem hiding this comment.
Scoped glow lacks ResizeObserver guard
Low Severity
Scoped FrozenGlow always constructs ResizeObserver on mount. Other scoped UI in this PR guards with typeof ResizeObserver !== "undefined", so container-scoped grab on engines without ResizeObserver can throw during mount instead of degrading.
Reviewed by Cursor Bugbot for commit 8161ec0. Configure here.
There was a problem hiding this comment.
1 issue found across 2 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/next.config.ts">
<violation number="1" location="apps/website/next.config.ts:8">
P1: The `outputFileTracingIncludes` for `/script.js` points to a file two directories above the Next.js app (`../../packages/react-grab/dist/index.global.js`), but the tracing root is still the `apps/website` project directory. Next.js excludes files outside the tracing root even when they are listed in `outputFileTracingIncludes`, so the bundle may still be missing from the deployed function and the route could 500. To fix this, widen `outputFileTracingRoot` to the monorepo root alongside the include.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| // The /script.js route streams the library bundle off disk with readFile, | ||
| // which output tracing can't follow — without this the file is missing from | ||
| // the deployed function and the route 500s on Vercel. | ||
| outputFileTracingIncludes: { |
There was a problem hiding this comment.
P1: The outputFileTracingIncludes for /script.js points to a file two directories above the Next.js app (../../packages/react-grab/dist/index.global.js), but the tracing root is still the apps/website project directory. Next.js excludes files outside the tracing root even when they are listed in outputFileTracingIncludes, so the bundle may still be missing from the deployed function and the route could 500. To fix this, widen outputFileTracingRoot to the monorepo root alongside the include.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/website/next.config.ts, line 8:
<comment>The `outputFileTracingIncludes` for `/script.js` points to a file two directories above the Next.js app (`../../packages/react-grab/dist/index.global.js`), but the tracing root is still the `apps/website` project directory. Next.js excludes files outside the tracing root even when they are listed in `outputFileTracingIncludes`, so the bundle may still be missing from the deployed function and the route could 500. To fix this, widen `outputFileTracingRoot` to the monorepo root alongside the include.</comment>
<file context>
@@ -2,6 +2,12 @@ import type { NextConfig } from "next";
+ // The /script.js route streams the library bundle off disk with readFile,
+ // which output tracing can't follow — without this the file is missing from
+ // the deployed function and the route 500s on Vercel.
+ outputFileTracingIncludes: {
+ "/script.js": ["../../packages/react-grab/dist/index.global.js"],
+ },
</file context>
…name in prod
The demo card's hover/selection label reads the nearest composite fiber's
name, which minification mangles to a single letter ("S.h1").


Summary
process.env.IS_DEMO) that compiles React Grab into a display-only showcase, plus areact-grab/demodriver (createGrabDemo) for scripting it with synthetic events.isTrusted) input is ignored, the clipboard andlocalStorageare never written, host animations / React updates / cursor /bodystyles are never frozen, and the overlay is click-through.IS_DEMOconstant that dead-code-eliminates from normal library builds — the default bundle's behavior and size are unchanged (verified: zero demo markers inindex.global.js).data-react-grab-demo) so it can coexist with a normal React Grab instance on the same page.How it works
process.env.IS_DEMOis a build-time define: library entries compile it to""(soif (IS_DEMO)branches are DCE'd), demo entries to"true".pnpm build:demoemits the extrademo.*bundles (opt-in, so the published package stays lean).createGrabDemo({ container })mounts demo-mode React Grab scoped to the container, paints an animated cursor, and returns low-level synthetic-event drivers (moveCursor,pulseCursor,click,pressKey,typeText,getInput,cancel,dispose, …). The consumer scripts the showcase; the library doesn't bake in a sequence.createGrabDemothrows on a second concurrent instance and restores the container'sposition+ scope ondispose.Also in here
updateToolbarState/ a newsyncEnabledState, with a canonicalDEFAULT_TOOLBAR_STATE.reset()API (returns React Grab to a clean slate without disposing).makeIifePack/makeModulePackbuild factories replace four near-identical pack configs.Test plan
pnpm typecheck,pnpm lint,pnpm formathtmlpointer-events: auto, body styles untouched); overlay click-through; library + demo coexist with separate shadow hosts;reset()and the single-instance/dispose lifecycle behaveNote
Medium Risk
Large removal of a whole app can break CI, deploy, or docs if anything still references
website-v2; the OpenStory define is a low-risk build fix.Overview
Removes the entire
apps/website-v2Next.js app from the monorepo—the shadcn component gallery homepage, root layout/theme wiring, the/script.jsroute that servedreact-grab’s global bundle, and all local UI primitives.Monorepo housekeeping drops
@react-grab/website-v2from the Changesetsignorelist (the package no longer exists) and stops ignoringapps/website/public/script.jsin the root.gitignore.apps/openstoryadds a Vitedefineforprocess.env.IS_DEMOso bundledreact-grabsource that reads it at module scope does not throw in the browser whenprocessis undefined.Reviewed by Cursor Bugbot for commit 957d8b8. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds a build‑time, display‑only demo mode for
react-grabwith a scriptablereact-grab/demodriver, and ships the v2 website inapps/websitewith a homepage autoplay demo, Benchmarks, and a Paper theme. Demo builds are safe, container‑scoped, dead‑code‑eliminated from normal builds, and the oldapps/website-v2app is removed.New Features
process.env.IS_DEMO(pnpm build:demoemitsdemo.*); click‑through overlay; no clipboard/localStoragewrites; container‑scoped hit‑testing/toolbar with scroll re‑anchoring;api.reset()and single‑instance lifecycle.react-grab/demodriver:createGrabDemo({ container })withmoveCursor/click/drag/pressKey/typeText/cancel/dispose; cancellation‑aware steps; per‑frame cursor moves with cached rects; homepage autoplay loadsreact-grab/dist/demo.json intersection.apps/website: Paper theme, new homepage demo, Benchmarks leaderboard (responsive, keyboard‑accessible), updated OG cards;/script.jsserved via a route with CORS + revalidate headers; unused shadcn components/deps pruned; Changesets ignore list updated.Bug Fixes
pointercancelcan’t abort scripted drags; paused demos don’t fire pending keypresses; lazy demo bundle load errors logged.null/bad payloads; open‑in‑editor URLs re‑encode file paths; OG image route caches fonts with a fallback and logs fallback use; privacy copy and analytics usage aligned;apps/openstorydefinesprocess.env.IS_DEMO; ThemeProvider wrapped to avoidnext-themesbuild issues on Vercel.ResizeObserverwhere unavailable./script.js: trace thereact-grabbundle into the function and read it via a cwd‑relative path so Vercel output tracing includesdist/index.global.js(fixes deploy 500s).GrabDemo.displayNameso the hover/selection label reads correctly in production builds; afterreset(), resume the showcase instead of leaving it paused.Written for commit 957d8b8. Summary will update on new commits.