chore: remove tailwind-merge dependency#254
Conversation
Simplify cn utility to use clsx only, fix tailwindcss import with
source("."), and gitignore meta.json.
Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Error agent completed without reporting progress |
@react-grab/cli
grab
@react-grab/amp
@react-grab/claude-code
@react-grab/codex
@react-grab/copilot
@react-grab/cursor
@react-grab/droid
@react-grab/gemini
@react-grab/opencode
react-grab
@react-grab/relay
@react-grab/utils
commit: |
There was a problem hiding this comment.
7 issues found across 22 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="packages/react-grab/src/components/tooltip.tsx">
<violation number="1" location="packages/react-grab/src/components/tooltip.tsx:28">
P0: Malformed `createEffect` call. The visibility logic is passed as the initial value instead of the effect function, so the tooltip will never appear.</violation>
</file>
<file name="packages/react-grab/src/utils/create-anchored-dropdown.ts">
<violation number="1" location="packages/react-grab/src/utils/create-anchored-dropdown.ts:1">
P1: Restore the `onCleanup` import. SolidJS requires `onCleanup` for effect cleanups, unlike React which uses returned functions.</violation>
<violation number="2" location="packages/react-grab/src/utils/create-anchored-dropdown.ts:63">
P0: This effect will never run because its logic is passed as the initial value argument. SolidJS `createEffect` requires a single callback, and cleanups must be registered with `onCleanup`.</violation>
</file>
<file name="packages/react-grab/src/components/renderer.tsx">
<violation number="1" location="packages/react-grab/src/components/renderer.tsx:1">
P0: Revert the `<For>` components back to `<Index>`. The change to `<For>` will cause runtime `TypeError` crashes because the inner code expects list items to be accessor functions, which only `<Index>` provides.</violation>
</file>
<file name="packages/react-grab/src/components/toolbar/index.tsx">
<violation number="1" location="packages/react-grab/src/components/toolbar/index.tsx:219">
P1: Returning a function from `createEffect` does not register it as a cleanup in SolidJS. You must use `onCleanup`.</violation>
<violation number="2" location="packages/react-grab/src/components/toolbar/index.tsx:353">
P1: Returning a function from `createEffect` does not register a cleanup in SolidJS. You must use `onCleanup`.</violation>
<violation number="3" location="packages/react-grab/src/components/toolbar/index.tsx:467">
P1: Returning a function from `createEffect` does not register a cleanup in SolidJS. You must use `onCleanup`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| clearTimeout(delayTimeoutId); | ||
| delayTimeoutId = undefined; | ||
| } | ||
| () => props.visible, |
There was a problem hiding this comment.
P0: Malformed createEffect call. The visibility logic is passed as the initial value instead of the effect function, so the tooltip will never appear.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react-grab/src/components/tooltip.tsx, line 28:
<comment>Malformed `createEffect` call. The visibility logic is passed as the initial value instead of the effect function, so the tooltip will never appear.</comment>
<file context>
@@ -25,32 +25,30 @@ export const Tooltip: Component<TooltipProps> = (props) => {
- clearTimeout(delayTimeoutId);
- delayTimeoutId = undefined;
- }
+ () => props.visible,
+ (isVisible) => {
+ if (delayTimeoutId !== undefined) {
</file context>
| } | ||
| onCleanup(clearAnimationHandles); | ||
| }); | ||
| createEffect( |
There was a problem hiding this comment.
P0: This effect will never run because its logic is passed as the initial value argument. SolidJS createEffect requires a single callback, and cleanups must be registered with onCleanup.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react-grab/src/utils/create-anchored-dropdown.ts, line 63:
<comment>This effect will never run because its logic is passed as the initial value argument. SolidJS `createEffect` requires a single callback, and cleanups must be registered with `onCleanup`.</comment>
<file context>
@@ -60,51 +60,55 @@ export const createAnchoredDropdown = (
- }
- onCleanup(clearAnimationHandles);
- });
+ createEffect(
+ () => anchorAccessor(),
+ (anchor) => {
</file context>
| @@ -1,4 +1,4 @@ | |||
| import { Show, Index } from "solid-js"; | |||
| import { Show, For } from "solid-js"; | |||
There was a problem hiding this comment.
P0: Revert the <For> components back to <Index>. The change to <For> will cause runtime TypeError crashes because the inner code expects list items to be accessor functions, which only <Index> provides.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react-grab/src/components/renderer.tsx, line 1:
<comment>Revert the `<For>` components back to `<Index>`. The change to `<For>` will cause runtime `TypeError` crashes because the inner code expects list items to be accessor functions, which only `<Index>` provides.</comment>
<file context>
@@ -1,4 +1,4 @@
-import { Show, Index } from "solid-js";
+import { Show, For } from "solid-js";
import type { Component } from "solid-js";
import type { AgentSession, ReactGrabRendererProps } from "../types.js";
</file context>
| @@ -1,4 +1,4 @@ | |||
| import { createSignal, createEffect, createMemo, onCleanup } from "solid-js"; | |||
| import { createSignal, createEffect, createMemo } from "solid-js"; | |||
There was a problem hiding this comment.
P1: Restore the onCleanup import. SolidJS requires onCleanup for effect cleanups, unlike React which uses returned functions.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react-grab/src/utils/create-anchored-dropdown.ts, line 1:
<comment>Restore the `onCleanup` import. SolidJS requires `onCleanup` for effect cleanups, unlike React which uses returned functions.</comment>
<file context>
@@ -1,4 +1,4 @@
-import { createSignal, createEffect, createMemo, onCleanup } from "solid-js";
+import { createSignal, createEffect, createMemo } from "solid-js";
import type { Accessor } from "solid-js";
import type { DropdownAnchor } from "../types.js";
</file context>
| return () => { | ||
| clearTimeout(timerId); | ||
| setIsHistoryTooltipVisible(false); | ||
| }; | ||
| }, |
There was a problem hiding this comment.
P1: Returning a function from createEffect does not register a cleanup in SolidJS. You must use onCleanup.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react-grab/src/components/toolbar/index.tsx, line 467:
<comment>Returning a function from `createEffect` does not register a cleanup in SolidJS. You must use `onCleanup`.</comment>
<file context>
@@ -460,51 +450,49 @@ export const Toolbar: Component<ToolbarProps> = (props) => {
+ clockFlashRef?.classList.remove("animate-clock-flash");
+ setIsHistoryTooltipVisible(false);
+ }, FEEDBACK_DURATION_MS);
+ return () => {
+ clearTimeout(timerId);
+ setIsHistoryTooltipVisible(false);
</file context>
| return () => { | |
| clearTimeout(timerId); | |
| setIsHistoryTooltipVisible(false); | |
| }; | |
| }, | |
| onCleanup(() => { | |
| if (historyItemCountTimeout) { | |
| clearTimeout(historyItemCountTimeout); | |
| } | |
| }); |
| shakeTooltipTimeout = setTimeout(() => { | ||
| setIsShakeTooltipVisible(false); | ||
| }, TOOLBAR_SHAKE_TOOLTIP_DURATION_MS); | ||
| return () => clearShakeTooltipTimeout(); |
There was a problem hiding this comment.
P1: Returning a function from createEffect does not register a cleanup in SolidJS. You must use onCleanup.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react-grab/src/components/toolbar/index.tsx, line 353:
<comment>Returning a function from `createEffect` does not register a cleanup in SolidJS. You must use `onCleanup`.</comment>
<file context>
@@ -342,47 +340,39 @@ export const Toolbar: Component<ToolbarProps> = (props) => {
+ shakeTooltipTimeout = setTimeout(() => {
+ setIsShakeTooltipVisible(false);
+ }, TOOLBAR_SHAKE_TOOLTIP_DURATION_MS);
+ return () => clearShakeTooltipTimeout();
+ }
+ },
</file context>
| return () => clearShakeTooltipTimeout(); | |
| onCleanup(() => clearShakeTooltipTimeout()); |
| (previousIndex) => (previousIndex + 1) % SELECTION_HINT_COUNT, | ||
| ); | ||
| }, SELECTION_HINT_CYCLE_INTERVAL_MS); | ||
| return () => clearInterval(intervalId); |
There was a problem hiding this comment.
P1: Returning a function from createEffect does not register it as a cleanup in SolidJS. You must use onCleanup.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/react-grab/src/components/toolbar/index.tsx, line 219:
<comment>Returning a function from `createEffect` does not register it as a cleanup in SolidJS. You must use `onCleanup`.</comment>
<file context>
@@ -206,22 +205,21 @@ export const Toolbar: Component<ToolbarProps> = (props) => {
+ (previousIndex) => (previousIndex + 1) % SELECTION_HINT_COUNT,
+ );
+ }, SELECTION_HINT_CYCLE_INTERVAL_MS);
+ return () => clearInterval(intervalId);
+ },
+ undefined,
</file context>
| return () => clearInterval(intervalId); | |
| onCleanup(() => clearInterval(intervalId)); |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
There was a problem hiding this comment.
Additional Suggestions:
- The design-system package uses outdated Solid 1.9.10 dependencies and imports from non-existent 'solid-js/web' path, causing build failures when bundling upgraded react-grab code that was migrated to Solid 2.0.0-beta.3
- Missing @solidjs/web in design-system's tsup noExternal configuration causing bundle resolution failures after react-grab was updated to Solid 2.0
Rename "Cursor Cloud specific instructions" to "Development instructions" and remove outdated "Known flaky test" section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
122b66a to
aa7bc22
Compare


Summary
tailwind-mergefrom dependencies andnoExternalin tsup configcnutility to useclsxonlysource(".")directivemeta.jsonto.gitignoreTest plan
tailwind-mergeclsx-onlycnMade with Cursor
Note
Medium Risk
Moderate risk because
cnno longer resolves Tailwind class conflicts viatailwind-merge, which can subtly change styling in components relying on override ordering. Build/config changes are otherwise straightforward dependency cleanup.Overview
Removes
tailwind-mergefromreact-grab(dependency +tsupbundling config) and simplifies thecnhelper to useclsxonly.Updates Tailwind CSS entry import to
@import "tailwindcss" source(".")for correct source resolution, tweaks repo hygiene/docs by addingmeta.jsonto.gitignore, and trims agent/development notes inAGENTS.md.Written by Cursor Bugbot for commit aa7bc22. This will update automatically on new commits. Configure here.
Summary by cubic
Removed
tailwind-mergeand migratedreact-grabtosolid-js2.0.0-beta.3 with@solidjs/webfor a smaller build and simpler reactivity. Also fixed async effect errors and timing/state edge cases.Refactors
@solidjs/web, replaceonMount/onCleanupwithonSettled(return cleanup), splitcreateEffectinto compute/apply, and switchIndextoFor.setStorewithstorePath; removedbatch,on, andcreateResourcewith signal+effect replacements.cntoclsxonly; removedtailwind-merge(deps andtsupnoExternal), keptsolid-jsandbippyas no-externals.@import "tailwindcss" source(".")and ignoredmeta.json.Bug Fixes
.catch()handlers to async effect replacements for context menu component name/file path lookups.keyHoldDurationin compute so timers restart on duration changes.updateLabelInstanceto a single atomic draft setter for consistent status/error updates.Written for commit aa7bc22. Summary will update on new commits.