Skip to content

convert mcp and ui to typescript#144

Merged
InfinityBowman merged 8 commits into
mainfrom
143-convert-packages-to-typescript
Dec 24, 2025
Merged

convert mcp and ui to typescript#144
InfinityBowman merged 8 commits into
mainfrom
143-convert-packages-to-typescript

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Dec 24, 2025

Summary by CodeRabbit

  • New Features
    • UI library ports to TypeScript with typed component props/hooks; unified UI entrypoint restored. Tour UI reintroduced.
  • Chores
    • Added Dependabot weekly updates configuration.
    • Added TypeScript build configs, updated package scripts and test setups to support TS/TSX.
  • Bug Fixes
    • Various test imports and runtime entry paths updated to ensure correct module resolution and server start paths.

✏️ Tip: You can customize this high-level summary in your review settings.

@InfinityBowman InfinityBowman linked an issue Dec 24, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 24, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Migrates MCP and UI packages from JavaScript to TypeScript/TSX, adds tsconfigs and build scripts, tightens types across MCP tools and UI components, updates MCP binary to dist/server.js, adds Dependabot config, updates monorepo turbo tasks, adjusts tests and UI re-exports to the new TypeScript sources.

Changes

Cohort / File(s) Summary
Repo automation & CI
\.github/dependabot.yml, \.github/workflows/prettier.yml, turbo.json, packages/workers/turbo.json
Add Dependabot weekly config; remove explicit pnpm version in Prettier workflow; overhaul turbo.json tasks (build/dev/test/lint/format/deploy) and remove workers turbo config.
MCP build, config & entry
packages/mcp/package.json, packages/mcp/tsconfig.json, packages/mcp/vitest.config.ts, packages/mcp/.gitignore, .cursor/mcp.json, .vscode/mcp.json
Add TS build/dev/clean scripts and devDeps (typescript, tsx, @types/node); new tsconfig; vitest globs include .ts; update bin/start to dist/server.js; update launch/config paths; gitignore additions.
MCP typing & constants
packages/mcp/constants.js, packages/mcp/src/constants.ts, packages/mcp/src/types.ts, packages/mcp/src/server.ts
Remove JS CACHE_TTL export; add typed CACHE_TTL in src/constants.ts; add and export McpServerType alias; small repoRoot/docsRoot resolution and top-level typing updates.
MCP tools — typed conversions
packages/mcp/src/scrape-icons.ts, packages/mcp/__tests__/icons.test.ts, packages/mcp/src/tools/*
Convert tools to TypeScript with explicit interfaces/types (IconManifest, ExecFileResult/Error, DrizzleDocsCache, ZagDocsCache, etc.); tighten signatures and error handling; update register*Tools to accept McpServerType.
UI package — project config & entry
packages/ui/package.json, packages/ui/tsconfig.json, packages/ui/jsconfig.json, packages/ui/vitest.config.js
Remove jsconfig.json; add tsconfig.json with strict settings and path aliases; point main/types/exports to .ts sources; add typescript devDep; update vitest setup/include to TS.
UI barrel & re-exports
packages/ui/src/index.d.ts, packages/ui/src/index.ts, packages/ui/src/zag/index.js, packages/ui/src/zag/index.ts
Remove legacy index.d.ts and old JS re-export index; add src/zag/index.ts barrel that re-exports TS/TSX components; update top-level index to re-export TS sources.
UI tests & test setup
packages/ui/src/__tests__/setup.ts, packages/ui/src/zag/__tests__/*
Replace JS test setup with typed setup.ts; refine global mocks typings (ResizeObserver, IntersectionObserver, PointerEvent, crypto, RAF); update test imports from .jsx.tsx and adjust named/default import styles where needed.
UI utilities & hooks
packages/ui/src/lib/cn.ts, packages/ui/src/constants/zIndex.ts, packages/ui/src/primitives/useWindowDrag.ts
Narrow cn parameter types; make Z_INDEX as const; add optional onDragEnd callback and explicit return type for useWindowDrag.
UI components — bulk TSX migrations & typings
packages/ui/src/zag/*.tsx (many files)
Convert many Zag components to TSX: add exported prop interfaces/types, tighten handler signatures, switch many default exports to typed named exports or aliases, and reintroduce a typed Tour.tsx.
UI components — removals/replacements
packages/ui/src/zag/Splitter.jsx, packages/ui/src/zag/Tour.jsx, packages/ui/src/zag/index.js
Remove legacy JS/JSX files (old Splitter, old Tour, JS re-export index); replace with TSX implementations and new barrel file.
Workers — tests & env
packages/workers/src/middleware/__tests__/rateLimit.test.js, packages/workers/src/routes/__tests__/{contact,email}.test.js
Update test invocations to pass ENVIRONMENT: 'production' context for rate-limit and email route tests (adjust env passed to app.request/fetch).

Sequence Diagram(s)

(Skipped — changes span many independent components and files; no single concise multi-component control flow to visualize.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 From .js burrows into .ts I hop,

Types snug like carrots in my crop.
Exports tidy, build scripts hum,
Tests and barrels all become.
A tiny hop — the repo's won!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.71% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the primary change: converting the mcp and ui packages from JavaScript to TypeScript, which is the main objective reflected throughout the changeset.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bec4fe1 and 2668f35.

📒 Files selected for processing (2)
  • .cursor/mcp.json
  • .vscode/mcp.json

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Dec 24, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
corates 2668f35 Commit Preview URL Dec 24 2025, 11:50 PM

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
packages/mcp/package.json (1)

6-27: The Zod version constraint is invalid and will fail installation.

The package.json specifies zod: "^4.2.1", which requires version 4.2.1 or higher. However, the latest stable Zod version available is 4.1.12 (released October 6, 2025). This version constraint cannot be satisfied and will cause npm install to fail.

Update to a valid version such as "^4.1.12" or "^4.1.0".

packages/ui/src/zag/Collapsible.tsx (1)

57-77: Type mismatch: passing non-accessor to functions expecting Accessor.

Lines 62 and 73 pass collapsibleApi directly to render functions, but the type signature in CollapsibleProps specifies these functions receive Accessor<CollapsibleApi> (a function that returns the API). The value returned by useCollapsible is likely a reactive object/store, not an accessor function.

Either:

  1. The prop type definition should be (api: CollapsibleApi) instead of (api: Accessor<CollapsibleApi>)
  2. Or wrap the API in an accessor: () => collapsibleApi
🔎 Proposed fixes

Option 1: Fix the type definition (if the API object is stable and reactive)

  /** Trigger element or render function receiving collapsible API */
- trigger?: JSX.Element | ((api: Accessor<CollapsibleApi>) => JSX.Element);
+ trigger?: JSX.Element | ((api: CollapsibleApi) => JSX.Element);
  /** Indicator element or render function receiving collapsible API */
- indicator?: JSX.Element | ((api: Accessor<CollapsibleApi>) => JSX.Element);
+ indicator?: JSX.Element | ((api: CollapsibleApi) => JSX.Element);

Option 2: Wrap the API in an accessor (if consumers need a function)

     if (typeof triggerValue === 'function') {
-      return triggerValue(collapsibleApi);
+      return triggerValue(() => collapsibleApi);
     }
     if (typeof indicatorValue === 'function') {
-      return indicatorValue(collapsibleApi);
+      return indicatorValue(() => collapsibleApi);
     }
packages/ui/src/zag/__tests__/tabs.test.tsx (1)

37-47: Replace emoji characters with proper icon components.

The test fixtures use emoji characters (📁, 📄) which violates the coding guideline that states "NEVER use emojis anywhere in code, comments, documentation". Use components from the solid-icons library instead.

Suggested fix using solid-icons
+import { FiFolder, FiFile } from 'solid-icons/fi';
+
     it('should render with icons', () => {
       const tabsWithIcons = [
-        { value: 'tab1', label: 'Tab 1', icon: <span data-testid='icon1'>📁</span> },
-        { value: 'tab2', label: 'Tab 2', icon: <span data-testid='icon2'>📄</span> },
+        { value: 'tab1', label: 'Tab 1', icon: <FiFolder data-testid='icon1' /> },
+        { value: 'tab2', label: 'Tab 2', icon: <FiFile data-testid='icon2' /> },
       ];

As per coding guidelines, always use 'solid-icons' library for icons.

packages/ui/src/zag/Select.tsx (1)

127-142: Unsafe type cast for multiple selection mode.

The cast details.value as unknown as string on line 131 is type-unsafe. When multiple is true, onChange receives a string[] but the prop type declares onChange?: (value: string) => void. Consider updating the onChange signature to handle both cases.

Proposed fix - update onChange signature
 export interface SelectProps {
   // ...
   /** Callback when value changes */
-  onChange?: (value: string) => void;
+  onChange?: (value: string | string[]) => void;
   // ...
 }

Then update the handler:

   const handleValueChange = (details: { value: string[] }) => {
     if (!local.onChange) return;

     if (merged.multiple) {
-      local.onChange(details.value as unknown as string);
+      local.onChange(details.value);
     } else {
       // ...
     }
   };
packages/ui/src/zag/Clipboard.tsx (1)

70-83: API stub implementations may cause runtime issues.

The getRootProps, getLabelProps, getControlProps, getInputProps, and getTriggerProps methods return empty objects {}. If consumers of the render prop API call these methods expecting actual props, they won't work correctly. Consider either removing these stubs or documenting that they're not fully implemented.

packages/ui/src/zag/Avatar.tsx (1)

32-38: Potential runtime error in getInitials with edge cases.

If name contains leading/trailing spaces or multiple consecutive spaces, parts could have empty strings, causing parts[0][0] to throw.

Proposed defensive fix
 const getInitials = () => {
   const displayName = name();
   if (!displayName) return '';
-  const parts = displayName.trim().split(' ');
+  const parts = displayName.trim().split(/\s+/).filter(Boolean);
+  if (parts.length === 0) return '';
   if (parts.length === 1) return parts[0][0].toUpperCase();
   return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
 };
♻️ Duplicate comments (4)
packages/ui/src/zag/__tests__/tooltip.test.tsx (1)

7-7: Same concern: explicit .tsx extension in import.

As noted in RadioGroup.test.tsx, verify that explicit file extensions work correctly with your build setup.

packages/ui/src/zag/__tests__/progress.test.tsx (1)

7-7: Same concern: explicit .tsx extension in import.

See RadioGroup.test.tsx for details on verifying explicit file extensions.

packages/ui/src/zag/__tests__/Dialog.test.tsx (1)

7-7: Same concern: explicit .tsx extension in import.

See RadioGroup.test.tsx for details on verifying explicit file extensions.

packages/ui/src/zag/Popover.tsx (1)

12-25: Duplicate Placement type.

Same duplication issue as noted in Tooltip.tsx. This is the fourth file with an identical Placement type definition.

🧹 Nitpick comments (18)
renovate.json (1)

6-13: Overlapping package rules may cause unexpected grouping.

A devDependency in apps/** or packages/** will match both rules. Renovate processes rules in order, so the first match (workspace dependencies) takes precedence. This means workspace devDependencies won't be grouped with other devDependencies as might be expected.

If you intend to keep devDependencies separate regardless of location, reorder the rules or make them mutually exclusive using excludeDepTypes in the first rule.

Suggested reordering to clarify precedence
  "packageRules": [
+   {
+     "matchDepTypes": ["devDependencies"],
+     "groupName": "dev dependencies"
+   },
    {
      "matchPaths": ["apps/**", "packages/**"],
      "groupName": "workspace dependencies"
-   },
-   {
-     "matchDepTypes": ["devDependencies"],
-     "groupName": "dev dependencies"
    }
  ]

Or make them mutually exclusive:

  "packageRules": [
    {
      "matchPaths": ["apps/**", "packages/**"],
+     "excludeDepTypes": ["devDependencies"],
      "groupName": "workspace dependencies"
    },
    {
      "matchDepTypes": ["devDependencies"],
      "groupName": "dev dependencies"
    }
  ]
packages/mcp/__tests__/icons.test.ts (1)

9-11: Consider importing IconManifest from a shared location.

The IconManifest interface is duplicated here, in scrape-icons.ts, and potentially in icons.ts. For maintainability, consider exporting this interface from a central types file (e.g., types.ts) and importing it in all three locations.

packages/mcp/src/scrape-icons.ts (1)

15-32: Redundant type annotation with as const.

Using as const already makes the array readonly with literal types, so readonly string[] is redundant and actually widens the type. Consider removing the explicit type annotation:

Suggested change
-const iconSets: readonly string[] = [
+const iconSets = [
   'ai',
   'bi',
   // ... rest of items
 ] as const;
packages/mcp/src/tools/lint.ts (1)

8-12: Refine code property type for accuracy.

Node's child_process exec errors typically have code as number | null, not string. The current typing may be overly permissive.

Suggested refinement
 interface ExecError extends Error {
   stdout?: string;
   stderr?: string;
-  code?: number | string;
+  code?: number | null;
 }
packages/mcp/src/tools/code-review.ts (2)

25-45: Redundant readonly annotation with as const.

Using as const already makes the array readonly and infers literal types. The explicit readonly string[] annotation widens the type back to string[] elements, defeating the purpose of as const.

Proposed fix
-const IGNORED_EXTENSIONS: readonly string[] = [
+const IGNORED_EXTENSIONS = [
   '.txt',
   '.lock',
   '.png',
   '.jpg',
   '.jpeg',
   '.gif',
   '.svg',
   '.ico',
   '.woff',
   '.woff2',
   '.ttf',
   '.eot',
 ] as const;

-const IGNORED_FILES: readonly string[] = [
+const IGNORED_FILES = [
   'package-lock.json',
   'pnpm-lock.yaml',
   'yarn.lock',
   'bun.lockb',
 ] as const;

68-70: Consider narrowing CompareTarget if possible.

The type 'staged' | 'unstaged' | string effectively collapses to just string since string is a supertype of the literals. This is fine if branch names need to be any string, but the literals provide no additional type safety. If intentional, a branded type or template literal could make the intent clearer, though this is optional.

packages/ui/src/zag/Tabs.tsx (1)

85-87: Consider adding a default export for consistency.

Other Zag components in this PR (QRCode, PinInput, Switch) include both named and default exports. For consistency across the UI package:

Suggested change
 };

 export { TabsComponent as Tabs };
+export default TabsComponent;
packages/ui/src/zag/PasswordInput.tsx (1)

78-79: Redundant default export alongside named export.

The component has both a named export (PasswordInput) and a default export. Other components in this PR (e.g., Drawer, TagsInput, ToggleGroup) only use named exports. Consider removing the default export for consistency.

Proposed fix
 export { PasswordInputComponent as PasswordInput };
-export default PasswordInputComponent;
packages/ui/src/zag/Select.tsx (1)

259-267: Redundant default export alongside named export.

Similar to PasswordInput.tsx, this component has both default and named exports. Consider keeping only the named export for consistency with other components in this PR.

Proposed fix
-export default SelectComponent;
-
 // Export hook for programmatic control
 export { useSelect };

 // Export component
 export { SelectComponent as Select };
packages/ui/src/zag/Tooltip.tsx (1)

12-24: Duplicate Placement type across multiple files.

The Placement type is identically defined in Menu.tsx, Popover.tsx, Tour.tsx, and this file. Consider extracting it to a shared types file to maintain DRY principle.

Suggested approach

Create a shared types file:

// packages/ui/src/zag/types.ts
export type Placement =
  | 'top'
  | 'top-start'
  | 'top-end'
  | 'bottom'
  | 'bottom-start'
  | 'bottom-end'
  | 'left'
  | 'left-start'
  | 'left-end'
  | 'right'
  | 'right-start'
  | 'right-end';

Then import and re-export from each component file:

import { Placement } from './types';
export { Placement };
packages/ui/src/zag/Tour.tsx (2)

23-23: Inconsistent import extension.

This file uses .ts extension for importing zIndex, while other files in this PR (e.g., Popover.tsx line 10, Tooltip.tsx line 10) use .js extension for the same import. Standardize on one approach across all files.


161-161: Type assertion may warrant refinement, but implementation is currently sound.

The as TourApi cast does assert a type without explicit verification, which could theoretically mask incompatibilities. However, the TourApi interface is explicitly defined in the same file with comprehensive method signatures, and all usages throughout the component (api().open, api().getBackdropProps(), etc.) align with the interface. With strict: true TypeScript configuration enabled, there are no detected mismatches.

Consider whether an explicit type mapping or validation could be more robust, though the current approach is functional and TypeScript-safe given the explicit interface definition.

packages/ui/src/zag/RadioGroup.tsx (1)

84-84: Prefer Show component for conditional rendering.

Per coding guidelines, use the Show component from solid-js for conditional rendering instead of logical AND operators.

Suggested change
-               {item.description && <span class='text-xs text-gray-500'>{item.description}</span>}
+               <Show when={item.description}>
+                 <span class='text-xs text-gray-500'>{item.description}</span>
+               </Show>

You'll also need to add Show to the imports on line 6:

-import { Component, For, splitProps, createMemo } from 'solid-js';
+import { Component, For, Show, splitProps, createMemo } from 'solid-js';
packages/ui/src/zag/Editable.tsx (2)

234-235: Inconsistent export pattern: both default and named exports.

This file exports both export default EditableComponent and export { EditableComponent as Editable }. Other migrated components in this PR (Accordion, FileUpload, Menu, etc.) use only named exports. This inconsistency could cause confusion about which import style to use.

Suggested fix: Remove default export for consistency
 export { EditableComponent as Editable };
-export default EditableComponent;

114-125: Type assertions can be avoided with stricter prop handling.

The type assertions on lines 114-116 and 122-124 are necessary because mergeProps widens the types. While these work correctly, the pattern could be simplified.

Alternative: Define defaults with explicit literal types
 const merged = mergeProps(
     {
       placeholder: 'Click to edit...',
-      activationMode: 'dblclick',
-      submitMode: 'both',
+      activationMode: 'dblclick' as const,
+      submitMode: 'both' as const,
       selectOnFocus: true,
       autoResize: true,
       showControls: false,
       showEditIcon: false,
-      variant: 'default',
+      variant: 'default' as const,
     },
     props,
   );

This would preserve literal types through mergeProps and eliminate the need for assertions in accessor functions.

packages/ui/src/zag/Menu.tsx (1)

10-22: Placement type is duplicated across multiple components.

The Placement type is identically defined in Menu.tsx, Popover.tsx, Tooltip.tsx, and Tour.tsx (as shown in relevant code snippets). Consider extracting this to a shared types file to avoid duplication and ensure consistency.

Suggested: Extract to shared types file

Create a shared types file (e.g., packages/ui/src/zag/types.ts):

export type Placement =
  | 'top'
  | 'top-start'
  | 'top-end'
  | 'bottom'
  | 'bottom-start'
  | 'bottom-end'
  | 'left'
  | 'left-start'
  | 'left-end'
  | 'right'
  | 'right-start'
  | 'right-end';

Then import in each component:

import { Placement } from './types.js';
packages/ui/src/zag/Dialog.tsx (1)

232-238: ConfirmDialogConfig duplicates ConfirmDialogProps fields.

The ConfirmDialogConfig interface repeats the same fields as ConfirmDialogProps minus the control/callback properties. Consider using TypeScript utility types for DRY.

Suggested: Use Pick or Omit utility types
-export interface ConfirmDialogConfig {
-  title?: string;
-  description?: string;
-  confirmText?: string;
-  cancelText?: string;
-  variant?: 'danger' | 'warning' | 'info';
-}
+export type ConfirmDialogConfig = Pick<
+  ConfirmDialogProps,
+  'title' | 'description' | 'confirmText' | 'cancelText' | 'variant'
+>;
packages/ui/src/zag/index.ts (1)

9-9: Mixed export patterns reflect inconsistent source file exports.

Several components use export { default as X } (Collapsible, Editable, PasswordInput, PinInput, QRCode, Select, Switch) while others use direct named exports. This is a consequence of some source files still having default exports. Consider standardizing all source files to named exports for consistency.

As noted in the Editable.tsx review, standardizing to named-only exports across all components would simplify this barrel file and make the codebase more consistent.

Also applies to: 13-13, 18-18, 19-19, 22-22, 24-24, 26-26

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 74105db and f7f9404.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (73)
  • .github/dependabot.yml
  • packages/mcp/.gitignore
  • packages/mcp/__tests__/better-auth.test.ts
  • packages/mcp/__tests__/drizzle.test.ts
  • packages/mcp/__tests__/icons.test.ts
  • packages/mcp/__tests__/zag.test.ts
  • packages/mcp/constants.js
  • packages/mcp/package.json
  • packages/mcp/src/constants.ts
  • packages/mcp/src/scrape-icons.ts
  • packages/mcp/src/server.ts
  • packages/mcp/src/tools/better-auth.ts
  • packages/mcp/src/tools/code-review.ts
  • packages/mcp/src/tools/drizzle.ts
  • packages/mcp/src/tools/icons.ts
  • packages/mcp/src/tools/lint.ts
  • packages/mcp/src/tools/local-docs.ts
  • packages/mcp/src/tools/zag.ts
  • packages/mcp/src/types.ts
  • packages/mcp/tsconfig.json
  • packages/mcp/vitest.config.ts
  • packages/ui/jsconfig.json
  • packages/ui/package.json
  • packages/ui/src/__tests__/setup.ts
  • packages/ui/src/constants/zIndex.ts
  • packages/ui/src/index.d.ts
  • packages/ui/src/index.ts
  • packages/ui/src/lib/cn.ts
  • packages/ui/src/primitives/useWindowDrag.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/FileUpload.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Popover.tsx
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Splitter.jsx
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/Toast.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.jsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/src/zag/__tests__/RadioGroup.test.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/index.js
  • packages/ui/src/zag/index.ts
  • packages/ui/tsconfig.json
  • packages/ui/vitest.config.js
  • packages/workers/turbo.json
  • renovate.json
  • turbo.json
💤 Files with no reviewable changes (7)
  • packages/mcp/constants.js
  • packages/ui/src/zag/Splitter.jsx
  • packages/ui/src/zag/Tour.jsx
  • packages/workers/turbo.json
  • packages/ui/src/zag/index.js
  • packages/ui/jsconfig.json
  • packages/ui/src/index.d.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Do not use emojis in code, comments, documentation, or commit messages

NEVER use emojis anywhere in code, comments, documentation, plan files, or commit messages. This includes unicode symbols. For UI icons, use solid-icons library or SVGs only.

Files:

  • renovate.json
  • packages/mcp/tsconfig.json
  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/mcp/src/tools/lint.ts
  • packages/ui/tsconfig.json
  • packages/ui/src/zag/Popover.tsx
  • packages/mcp/src/types.ts
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/lib/cn.ts
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/vitest.config.js
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/primitives/useWindowDrag.ts
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/mcp/src/tools/better-auth.ts
  • packages/mcp/vitest.config.ts
  • packages/mcp/src/tools/zag.ts
  • packages/mcp/src/tools/local-docs.ts
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/constants/zIndex.ts
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/src/zag/__tests__/RadioGroup.test.tsx
  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/mcp/__tests__/icons.test.ts
  • packages/ui/src/zag/FileUpload.tsx
  • packages/ui/src/zag/Tabs.tsx
  • turbo.json
  • packages/mcp/package.json
  • packages/ui/src/zag/Avatar.tsx
  • packages/mcp/src/tools/code-review.ts
  • packages/mcp/src/scrape-icons.ts
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/__tests__/setup.ts
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/mcp/src/constants.ts
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/mcp/src/tools/icons.ts
  • packages/mcp/src/tools/drizzle.ts
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/mcp/src/server.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Toast.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features in JavaScript/TypeScript code
Comments should explain why something is being done, not narrate what the code does. Avoid comments that repeat variable names or describe obvious code behavior.

Files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/mcp/src/tools/lint.ts
  • packages/ui/src/zag/Popover.tsx
  • packages/mcp/src/types.ts
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/lib/cn.ts
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/vitest.config.js
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/primitives/useWindowDrag.ts
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/mcp/src/tools/better-auth.ts
  • packages/mcp/vitest.config.ts
  • packages/mcp/src/tools/zag.ts
  • packages/mcp/src/tools/local-docs.ts
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/constants/zIndex.ts
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/src/zag/__tests__/RadioGroup.test.tsx
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/mcp/__tests__/icons.test.ts
  • packages/ui/src/zag/FileUpload.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/mcp/src/tools/code-review.ts
  • packages/mcp/src/scrape-icons.ts
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/__tests__/setup.ts
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/mcp/src/constants.ts
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/mcp/src/tools/icons.ts
  • packages/mcp/src/tools/drizzle.ts
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/mcp/src/server.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Toast.tsx
packages/{web,ui}/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)

Group related components in subdirectories with barrel exports

Files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/Popover.tsx
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/src/zag/__tests__/RadioGroup.test.tsx
  • packages/ui/src/zag/FileUpload.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Toast.tsx
packages/{web,ui}/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

packages/{web,ui}/**/*.{js,jsx,ts,tsx}: Import UI components from '@corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'
Always use 'solid-icons' library for icons. Never use emoji characters or text as icon replacements. Import from specific icon sets like 'solid-icons/bi', 'solid-icons/fi', 'solid-icons/ai', etc.

Files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/Popover.tsx
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/lib/cn.ts
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/vitest.config.js
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/primitives/useWindowDrag.ts
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/constants/zIndex.ts
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/src/zag/__tests__/RadioGroup.test.tsx
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/FileUpload.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/__tests__/setup.ts
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Toast.tsx
packages/{web,ui}/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

Use Tailwind CSS classes for styling components

Files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/Popover.tsx
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/src/zag/__tests__/RadioGroup.test.tsx
  • packages/ui/src/zag/FileUpload.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Toast.tsx
🧠 Learnings (34)
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/web/**/*.{js,jsx,ts,tsx} : Use import aliases from 'packages/web/jsconfig.json' instead of relative paths. Aliases include: '@/*' (src/*), 'components/*' (src/components/*), 'auth-ui/*' (src/components/auth-ui/*), 'checklist-ui/*' (src/components/checklist-ui/*), 'project-ui/*' (src/components/project-ui/*), 'routes/*' (src/routes/*), 'primitives/*' (src/primitives/*), 'api/*' (src/api/*), 'config/*' (src/config/*), and 'lib/*' (src/lib/*)

Applied to files:

  • packages/mcp/tsconfig.json
  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/tsconfig.json
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/vitest.config.js
  • packages/mcp/vitest.config.ts
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/mcp/package.json
  • packages/ui/src/zag/__tests__/progress.test.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use import aliases from jsconfig.json instead of relative paths

Applied to files:

  • packages/mcp/tsconfig.json
  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/tsconfig.json
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/vitest.config.js
  • packages/mcp/vitest.config.ts
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/__tests__/progress.test.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Prefer modern ES6+ syntax and features in JavaScript/TypeScript code

Applied to files:

  • packages/mcp/tsconfig.json
  • packages/ui/tsconfig.json
  • packages/ui/vitest.config.js
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Prefer modern ES6+ syntax and features

Applied to files:

  • packages/mcp/tsconfig.json
  • packages/ui/tsconfig.json
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use Zag.js for UI components and design system

Applied to files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/tsconfig.json
  • packages/ui/src/zag/Popover.tsx
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/mcp/src/tools/zag.ts
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/FileUpload.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/__tests__/setup.ts
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/mcp/.gitignore
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/Accordion.tsx
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/{web,ui}/**/*.{js,jsx,ts,tsx} : Import UI components from 'corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'

Applied to files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/tsconfig.json
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/vitest.config.js
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/__tests__/progress.test.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/Select.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use aliases for imports when appropriate to improve readability

Applied to files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/tsconfig.json
  • packages/ui/src/zag/__tests__/tooltip.test.tsx
  • packages/ui/src/zag/__tests__/switch.test.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/src/index.ts
  • packages/ui/src/zag/__tests__/progress.test.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Zag component exist in `packages/web/src/components/zag/*` and should be reused. Check the README.md in that folder for a list of existing components before adding new components and when debugging

Applied to files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/mcp/src/tools/zag.ts
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/mcp/.gitignore
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Accordion.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx} : Use Ark UI components from corates/ui package, not local component implementations

Applied to files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/vitest.config.js
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/__tests__/checkbox.test.tsx
  • packages/ui/src/zag/__tests__/Dialog.test.tsx
  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Import stores directly in components rather than prop-drilling store data through component hierarchies.

Applied to files:

  • packages/ui/src/zag/__tests__/tabs.test.tsx
  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Do not destructure props in SolidJS components as it breaks reactivity. Instead, access props directly from the props object or wrap them in a function to ensure they are always up-to-date

Applied to files:

  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/Accordion.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Ensure browser compatibility for all frontend code (Safari is usually problematic)

Applied to files:

  • packages/ui/tsconfig.json
  • packages/ui/vitest.config.js
  • packages/ui/src/index.ts
  • packages/ui/src/__tests__/setup.ts
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/workers/src/**/*.{js,ts} : Use Zod for schema and input validation on the backend

Applied to files:

  • packages/ui/tsconfig.json
  • packages/mcp/src/tools/zag.ts
  • packages/ui/package.json
  • packages/mcp/package.json
  • packages/mcp/src/tools/code-review.ts
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx} : Use solid-icons library (e.g., solid-icons/bi, solid-icons/fi) for icon imports

Applied to files:

  • packages/ui/vitest.config.js
  • packages/ui/package.json
  • packages/mcp/__tests__/icons.test.ts
  • packages/mcp/src/scrape-icons.ts
  • packages/mcp/src/tools/icons.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context

Applied to files:

  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/Accordion.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use the `Show` component from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.

Applied to files:

  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/Editable.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Drawer.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use responsive design principles for UI components

Applied to files:

  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/workers/src/**/*.{js,ts} : Use Better-Auth for authentication and user management

Applied to files:

  • packages/mcp/src/tools/better-auth.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Use the Corates MCP tools to explore local documentation sources for Better-Auth, Drizzle, Icons, and Zag documentation

Applied to files:

  • packages/mcp/src/tools/better-auth.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Keep files small, focused, and modular. If a file exceeds a high number of lines, consider refactoring by extracting sub-modules into a folder with index.jsx and helper components, moving complex logic into separate utility files or primitives, or splitting large forms into section components

Applied to files:

  • packages/ui/src/zag/Splitter.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,ui}/src/**/*.{jsx,tsx} : Group related components in subdirectories with barrel exports

Applied to files:

  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Group related components in subdirectories with an index.js barrel export

Applied to files:

  • packages/ui/package.json
  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/stores/**/*.{js,ts} : In SolidJS, shared state should live in external stores under packages/web/src/stores/

Applied to files:

  • packages/ui/package.json
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/{web,ui}/**/*.{js,jsx,ts,tsx} : Always use 'solid-icons' library for icons. Never use emoji characters or text as icon replacements. Import from specific icon sets like 'solid-icons/bi', 'solid-icons/fi', 'solid-icons/ai', etc.

Applied to files:

  • packages/ui/package.json
  • packages/mcp/__tests__/icons.test.ts
  • packages/mcp/src/scrape-icons.ts
  • packages/mcp/src/tools/icons.ts
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : In SolidJS, use createMemo for derived values

Applied to files:

  • packages/ui/package.json
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/primitives/**/*.{js,ts} : Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering

Applied to files:

  • packages/ui/src/index.ts
  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/src/primitives/**/*.{jsx,tsx,js,ts} : Create reusable component logic in primitives (custom hooks) rather than embedding business logic directly in components. Primitives should encapsulate store access and complex logic patterns.

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis

Applied to files:

  • packages/mcp/__tests__/icons.test.ts
  • packages/mcp/src/scrape-icons.ts
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use the `For` component from solid-js for rendering lists. It provides better performance and keying compared to JavaScript's map function in JSX.

Applied to files:

  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Menu.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : When manipulating children in wrapper components, use the `children` helper from solid-js to ensure proper reactivity and handling of child elements.

Applied to files:

  • packages/ui/src/zag/Tabs.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : In SolidJS components, components should receive at most 1-5 props (local config only, not shared state)

Applied to files:

  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/Accordion.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/workers/src/**/*.{js,ts} : Use Drizzle ORM for database interactions and migrations

Applied to files:

  • packages/mcp/src/tools/drizzle.ts
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/workers/**/*.{ts,sql} : Use Drizzle ORM for ALL database interactions and migrations

Applied to files:

  • packages/mcp/src/tools/drizzle.ts
📚 Learning: 2025-12-24T17:22:56.372Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/error-handling.mdc:0-0
Timestamp: 2025-12-24T17:22:56.372Z
Learning: Applies to packages/workers/src/**/*.{js,ts} : Always use `createDomainError` from `corates/shared` for error handling in backend routes with predefined error constants (PROJECT_ERRORS, AUTH_ERRORS, VALIDATION_ERRORS, SYSTEM_ERRORS, USER_ERRORS)

Applied to files:

  • packages/mcp/src/server.ts
🧬 Code graph analysis (19)
packages/mcp/src/tools/lint.ts (1)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/ui/src/zag/Popover.tsx (3)
packages/ui/src/zag/Menu.tsx (1)
  • Placement (10-22)
packages/ui/src/zag/Tooltip.tsx (1)
  • Placement (12-24)
packages/ui/src/zag/Tour.tsx (1)
  • Placement (25-37)
packages/ui/src/lib/cn.ts (1)
packages/ui/src/index.ts (1)
  • cn (10-10)
packages/ui/src/zag/Tooltip.tsx (3)
packages/ui/src/zag/Menu.tsx (1)
  • Placement (10-22)
packages/ui/src/zag/Popover.tsx (1)
  • Placement (12-24)
packages/ui/src/zag/Tour.tsx (1)
  • Placement (25-37)
packages/ui/src/primitives/useWindowDrag.ts (2)
packages/ui/src/index.ts (1)
  • useWindowDrag (7-7)
packages/web/src/primitives/useWindowDrag.js (2)
  • isDraggingOverWindow (10-10)
  • dragCounter (11-11)
packages/mcp/src/tools/better-auth.ts (1)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/mcp/src/tools/local-docs.ts (1)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/ui/src/zag/Clipboard.tsx (1)
packages/ui/src/zag/index.ts (1)
  • CopyButton (8-8)
packages/ui/src/zag/Splitter.tsx (1)
packages/ui/src/zag/index.ts (1)
  • Splitter (25-25)
packages/mcp/__tests__/icons.test.ts (1)
packages/mcp/iconSearch.js (1)
  • manifest (20-20)
packages/ui/src/zag/FileUpload.tsx (2)
packages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsx (1)
  • handleFileAccept (21-25)
packages/web/src/primitives/useWindowDrag.js (1)
  • isDraggingOverWindow (10-10)
packages/mcp/src/tools/code-review.ts (1)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/mcp/src/scrape-icons.ts (2)
packages/workers/src/auth/routes.js (1)
  • path (114-114)
packages/mcp/iconSearch.js (1)
  • manifest (20-20)
packages/ui/src/zag/Menu.tsx (3)
packages/ui/src/zag/Popover.tsx (1)
  • Placement (12-24)
packages/ui/src/zag/Tooltip.tsx (1)
  • Placement (12-24)
packages/ui/src/zag/Tour.tsx (1)
  • Placement (25-37)
packages/ui/src/zag/Dialog.tsx (1)
packages/ui/src/zag/index.ts (1)
  • useConfirmDialog (11-11)
packages/mcp/src/tools/icons.ts (2)
packages/mcp/iconSearch.js (3)
  • manifestCache (8-8)
  • manifestPath (11-11)
  • manifest (20-20)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/mcp/src/tools/drizzle.ts (1)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/ui/src/zag/Drawer.tsx (2)
packages/web/src/components/project-ui/PdfPreviewPanel.jsx (1)
  • handleOpenChange (14-18)
packages/ui/src/zag/index.ts (1)
  • Dialog (11-11)
packages/ui/src/zag/Toast.tsx (1)
packages/ui/src/zag/index.ts (2)
  • showToast (29-29)
  • toaster (29-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: corates
  • GitHub Check: Workers Builds: corates-workers-prod

Comment on lines +25 to +27
const manifestPath = path.join(__dirname, '..', '..', 'icon-manifest.json');
const content = await fs.readFile(manifestPath, 'utf8');
manifestCache = JSON.parse(content) as IconManifest;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify icon-manifest.json exists at the expected location relative to the tools directory
fd -t f "icon-manifest.json" packages/mcp --max-depth 2

Repository: InfinityBowman/corates

Length of output: 48


🏁 Script executed:

#!/bin/bash
# Search for icon-manifest.json anywhere in the repository
fd -t f "icon-manifest.json"

Repository: InfinityBowman/corates

Length of output: 48


🏁 Script executed:

#!/bin/bash
# Read the icons.ts file to see the context around lines 25-27
cat -n packages/mcp/src/tools/icons.ts | head -40

# Also search for any references to icon-manifest in the codebase
rg "icon-manifest" --type ts --type js

Repository: InfinityBowman/corates

Length of output: 2288


Fix the manifest path — it traverses one level too many.

The path path.join(__dirname, '..', '..', 'icon-manifest.json') traverses two levels up from src/tools/, landing at packages/mcp/. However, based on the path used in src/scrape-icons.ts and the test files (__tests__/icons.test.ts), the manifest should be one level up: path.join(__dirname, '..', 'icon-manifest.json'). All references in the codebase expect the file at packages/mcp/icon-manifest.json, not deeper.

Additionally, the file does not currently exist in the repository, which will cause a runtime error when loadManifest() is called.

🤖 Prompt for AI Agents
In packages/mcp/src/tools/icons.ts around lines 25 to 27, the manifest path
currently goes up two directories but should go up one; change the path to use
path.join(__dirname, '..', 'icon-manifest.json') so it resolves to
packages/mcp/icon-manifest.json, and add or commit the missing
icon-manifest.json file at that location (or add a guard with a clear error
message if the file is optional) so loadManifest() does not fail at runtime.

Comment on lines +124 to 145
export interface CopyButtonProps {
/** Value to copy */
value: string;
/** Callback when copy status changes */
onStatusChange?: (details: { copied: boolean }) => void;
/** Time in ms before resetting (default: 3000) */
timeout?: number;
/** Button label (default: 'Copy') */
label?: string;
/** Label when copied (default: 'Copied!') */
copiedLabel?: string;
/** Button size (default: 'md') */
size?: 'sm' | 'md' | 'lg';
/** Button variant (default: 'solid') */
variant?: 'solid' | 'outline' | 'ghost';
/** Show copy/check icon (default: true) */
showIcon?: boolean;
/** Show text label (default: true) */
showLabel?: boolean;
/** Additional class for button */
class?: string;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Missing defaultValue in CopyButtonProps interface.

The CopyButton component passes defaultValue={machineProps.defaultValue} to Clipboard.Root (line 214), but defaultValue is not declared in the CopyButtonProps interface. This will cause a TypeScript error or silently ignore the prop.

Proposed fix
 export interface CopyButtonProps {
   /** Value to copy */
   value: string;
+  /** Initial value to copy */
+  defaultValue?: string;
   /** Callback when copy status changes */
   onStatusChange?: (details: { copied: boolean }) => void;
   // ...
 }

Also applies to: 211-216

🤖 Prompt for AI Agents
In packages/ui/src/zag/Clipboard.tsx around lines 124 to 145 (and related usage
at 211–216), the CopyButtonProps interface is missing the defaultValue prop that
CopyButton passes to Clipboard.Root (defaultValue={machineProps.defaultValue});
add a new optional property defaultValue?: string to CopyButtonProps, update the
JSDoc comment to describe it (value to initialize the clipboard state), and
ensure any usage/tests/types are adjusted accordingly so TypeScript recognizes
the prop.

Comment on lines 54 to 55
const arkProps = () => props.arkProps;
const collapsibleApi = useCollapsible(arkProps());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Breaking reactivity by passing snapshot to useCollapsible hook.

Line 55 calls arkProps() which creates a snapshot of the props at that moment. In Solid.js, hooks like useCollapsible need reactive access to props to track changes. Passing a snapshot means the collapsible won't respond to prop updates (e.g., controlled open state changes).

🔎 Proposed fix to preserve reactivity
-  const arkProps = () => props.arkProps;
-  const collapsibleApi = useCollapsible(arkProps());
+  const collapsibleApi = useCollapsible(() => props.arkProps);

Or if useCollapsible expects a direct object, wrap it in a reactive getter:

-  const arkProps = () => props.arkProps;
-  const collapsibleApi = useCollapsible(arkProps());
+  const collapsibleApi = useCollapsible(props.arkProps);

Check Ark UI's documentation for the expected prop format.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In packages/ui/src/zag/Collapsible.tsx around lines 54 to 55, you're creating a
snapshot by calling arkProps() and passing that value to useCollapsible, which
breaks Solid reactivity; instead pass a reactive getter/function so
useCollapsible can track changes — e.g. call useCollapsible(arkProps) (or
directly useCollapsible(() => props.arkProps)) rather than
useCollapsible(arkProps()).

Comment on lines +79 to 81
const handleFileReject = (details: { files: unknown[] }) => {
merged.onFileReject?.(details);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Ark UI FileUpload onFileReject callback type signature file rejection

💡 Result:

onFileReject signature

  • Type: (details: FileRejectDetails) => void. Source docs show the prop as onFileReject with a FileRejectDetails parameter. [1]

what FileRejectDetails contains (from docs)

  • It includes rejectedFiles (an array of FileRejection) — the files that were rejected. FileRejection entries include the original File plus one or more error codes from the built-in errors (TOO_MANY_FILES, FILE_INVALID_TYPE, FILE_TOO_LARGE, FILE_TOO_SMALL, FILE_INVALID, FILE_EXISTS). Use these to show messages or handle rejections. [1][2]

example (TypeScript / usage)

  • onFileReject: (details) => {
    // details.rejectedFiles: FileRejection[]
    details.rejectedFiles.forEach(r => {
    // r.file: File
    // r.errors: FileUploadFileError[] (one or more of the built-in error codes)
    })
    }

References

  • Ark UI FileUpload docs — props & error types. [1]
  • Ark UI package source (file-upload root) showing onFileReject in prop list. [2]

Sources
[1] Ark UI — File Upload component docs.
[2] @ark-ui/react file-upload (dist) listing onFileReject in exported props.


🏁 Script executed:

# Search for Ark UI types in the repository
fd -e "package.json" | head -5 | xargs grep -l "@ark-ui\|ark-ui" 2>/dev/null

# Look for FileUpload usage in the codebase
rg "onFileReject" --type tsx --type ts -A 3 -B 3

Repository: InfinityBowman/corates

Length of output: 93


🏁 Script executed:

# Search for onFileReject usage with proper syntax
rg "onFileReject" -A 3 -B 3

# Look at the FileUpload.tsx file to see imports and current implementation
fd "FileUpload.tsx" -x cat -n {}

# Check if Ark UI types are available in package.json
fd "package.json" | xargs grep "@ark-ui" 2>/dev/null | head -10

Repository: InfinityBowman/corates

Length of output: 9063


Use proper Ark UI types for rejected files.

The files: unknown[] type in both the FileUploadProps interface and handleFileReject should match Ark UI's actual FileRejectDetails structure, which contains rejectedFiles: FileRejection[] (where FileRejection includes file: File and errors: FileUploadFileError[]). Update the type signature to match Ark UI's API for proper type safety.

🤖 Prompt for AI Agents
In packages/ui/src/zag/FileUpload.tsx around lines 79 to 81, the rejected-files
parameter is typed as files: unknown[]; update the FileUploadProps interface and
the handleFileReject signature to use Ark UI's actual types (use
FileRejectDetails which contains rejectedFiles: FileRejection[] and ensure
FileRejection includes file: File and errors: FileUploadFileError[]). Import the
correct types from Ark UI (where those types are exported) and replace the
unknown[] occurrences so merged.onFileReject?.(details) and handleFileReject
accept the properly typed FileRejectDetails object.

Comment thread packages/ui/src/zag/Splitter.tsx Outdated
Comment on lines +28 to +48
const SplitterComponent: Component<SplitterProps> = (props) => {
return (
<Splitter.Root
panels={props.panels || [
{ id: 'a', minSize: 10 },
{ id: 'b', minSize: 10 },
]}
defaultSize={props.defaultSize || [80, 20]}
orientation={props.orientation || 'horizontal'}
class={props.class}
>
<Splitter.Panel id='a'>
<p>A</p>
</Splitter.Panel>
<Splitter.ResizeTrigger id='a:b' aria-label='Resize' />
<Splitter.Panel id='b'>
<p>B</p>
</Splitter.Panel>
</Splitter.Root>
);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Panels render hardcoded placeholder content, making this component unusable.

The component accepts panels configuration but renders hardcoded <p>A</p> and <p>B</p> content. There's no way for consumers to provide their own panel content, which defeats the purpose of a reusable splitter component.

Consider adding a children prop (similar to the Tabs component pattern) or a render function per panel:

Suggested approach using children
 export interface SplitterProps {
   /** Default panel sizes as percentages */
   defaultSize?: number[];
   /** Panel configurations */
   panels?: SplitterPanel[];
   /** Orientation (default: 'horizontal') */
   orientation?: 'horizontal' | 'vertical';
   /** Additional class for root element */
   class?: string;
+  /** Content for panels [panelA, panelB] */
+  children?: [JSX.Element, JSX.Element];
 }

 const SplitterComponent: Component<SplitterProps> = (props) => {
+  const children = () => props.children;
+
   return (
     <Splitter.Root
       panels={props.panels || [
         { id: 'a', minSize: 10 },
         { id: 'b', minSize: 10 },
       ]}
       defaultSize={props.defaultSize || [80, 20]}
       orientation={props.orientation || 'horizontal'}
       class={props.class}
     >
       <Splitter.Panel id='a'>
-        <p>A</p>
+        {children()?.[0]}
       </Splitter.Panel>
       <Splitter.ResizeTrigger id='a:b' aria-label='Resize' />
       <Splitter.Panel id='b'>
-        <p>B</p>
+        {children()?.[1]}
       </Splitter.Panel>
     </Splitter.Root>
   );
 };
📝 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.

Suggested change
const SplitterComponent: Component<SplitterProps> = (props) => {
return (
<Splitter.Root
panels={props.panels || [
{ id: 'a', minSize: 10 },
{ id: 'b', minSize: 10 },
]}
defaultSize={props.defaultSize || [80, 20]}
orientation={props.orientation || 'horizontal'}
class={props.class}
>
<Splitter.Panel id='a'>
<p>A</p>
</Splitter.Panel>
<Splitter.ResizeTrigger id='a:b' aria-label='Resize' />
<Splitter.Panel id='b'>
<p>B</p>
</Splitter.Panel>
</Splitter.Root>
);
};
export interface SplitterProps {
/** Default panel sizes as percentages */
defaultSize?: number[];
/** Panel configurations */
panels?: SplitterPanel[];
/** Orientation (default: 'horizontal') */
orientation?: 'horizontal' | 'vertical';
/** Additional class for root element */
class?: string;
/** Content for panels [panelA, panelB] */
children?: [JSX.Element, JSX.Element];
}
const SplitterComponent: Component<SplitterProps> = (props) => {
const childElements = () => props.children;
return (
<Splitter.Root
panels={props.panels || [
{ id: 'a', minSize: 10 },
{ id: 'b', minSize: 10 },
]}
defaultSize={props.defaultSize || [80, 20]}
orientation={props.orientation || 'horizontal'}
class={props.class}
>
<Splitter.Panel id='a'>
{childElements()?.[0]}
</Splitter.Panel>
<Splitter.ResizeTrigger id='a:b' aria-label='Resize' />
<Splitter.Panel id='b'>
{childElements()?.[1]}
</Splitter.Panel>
</Splitter.Root>
);
};
🤖 Prompt for AI Agents
In packages/ui/src/zag/Splitter.tsx around lines 28 to 48, the component renders
hardcoded placeholder content ("A" and "B") instead of exposing panel content to
consumers; update the component to accept and render dynamic content by
supporting either a children prop (paired panels as children nodes) or a panels
array that includes content/render functions per panel, then map over
props.panels (or children) to produce <Splitter.Panel id=...> elements with the
provided content and render the corresponding <Splitter.ResizeTrigger> between
panels; keep existing defaults for panels/defaultSize/orientation when props are
missing.

Comment thread packages/ui/src/zag/Toast.tsx
Comment thread renovate.json Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
turbo.json (1)

19-22: Consider using ["^build"] for consistency with the build task.

The deploy task uses dependsOn: ["build"] while the build task uses ["^build"]. While your current deployment strategy (orchestrated through package.json scripts) explicitly handles dependency builds, this inconsistency could cause issues if someone directly invokes turbo run deploy with --filter. Aligning this to ["^build"] improves consistency and prevents potential missed transitive dependencies.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7f9404 and 918d332.

📒 Files selected for processing (5)
  • packages/ui/tsconfig.json
  • packages/workers/src/middleware/__tests__/rateLimit.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
  • packages/workers/src/routes/__tests__/email.test.js
  • turbo.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ui/tsconfig.json
🧰 Additional context used
📓 Path-based instructions (7)
**/*

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Do not use emojis in code, comments, documentation, or commit messages

NEVER use emojis anywhere in code, comments, documentation, plan files, or commit messages. This includes unicode symbols. For UI icons, use solid-icons library or SVGs only.

Files:

  • packages/workers/src/routes/__tests__/email.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
  • packages/workers/src/middleware/__tests__/rateLimit.test.js
  • turbo.json
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features in JavaScript/TypeScript code
Comments should explain why something is being done, not narrate what the code does. Avoid comments that repeat variable names or describe obvious code behavior.

Files:

  • packages/workers/src/routes/__tests__/email.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
  • packages/workers/src/middleware/__tests__/rateLimit.test.js
packages/workers/src/**/*.{js,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

packages/workers/src/**/*.{js,ts}: Use Zod for schema and input validation on the backend
Use Drizzle ORM for database interactions and migrations
Use Better-Auth for authentication and user management

packages/workers/src/**/*.{js,ts}: Use Zod for schema and input validation on the backend
Use Better-Auth for authentication and user management

packages/workers/src/**/*.{js,ts}: Always use createDomainError from @corates/shared for error handling in backend routes with predefined error constants (PROJECT_ERRORS, AUTH_ERRORS, VALIDATION_ERRORS, SYSTEM_ERRORS, USER_ERRORS)
Wrap database operations in try-catch blocks and return domain errors using createDomainError(SYSTEM_ERRORS.DB_ERROR, {...}) instead of throwing raw errors
Use validation middleware with validateRequest(schema) to handle validation errors automatically rather than manually creating validation errors in routes

Files:

  • packages/workers/src/routes/__tests__/email.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
  • packages/workers/src/middleware/__tests__/rateLimit.test.js
packages/workers/src/routes/**/*.js

📄 CodeRabbit inference engine (.cursor/rules/api-routes.mdc)

packages/workers/src/routes/**/*.js: Always use validateRequest middleware for request body validation in API routes, passing appropriate schema from validation config
Use validateQueryParams middleware for validating query string parameters with Zod schemas
Always create database client from environment using createDb(c.env.DB) in route handlers
Use db.batch() for related database operations that must be atomic (succeed or fail together)
Always use Drizzle ORM for database queries; never use raw SQL
Always use createDomainError from @corates/shared for error responses, with appropriate error constants (PROJECT_ERRORS, AUTH_ERRORS, VALIDATION_ERRORS, SYSTEM_ERRORS, USER_ERRORS)
Never create error objects manually or throw error strings; use error constants from @corates/shared
Order middleware chain in routes as: authentication (requireAuth), authorization (requireEntitlement, requireQuota), validation (validateRequest, validateQueryParams), then route handler
Use getAuth(c) to retrieve authenticated user information in route handlers
Use c.get('validatedBody') to access request body data after validation middleware
Use c.get('validatedQuery') to access query parameters after validation middleware

Files:

  • packages/workers/src/routes/__tests__/email.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)

packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}: Never throw string literals; always throw Error objects or return domain errors from API routes
Use error utility functions like isErrorCode from @corates/shared or @/lib/error-utils.js to check specific error types instead of manual string comparisons

Files:

  • packages/workers/src/routes/__tests__/email.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
  • packages/workers/src/middleware/__tests__/rateLimit.test.js
packages/workers/src/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/workers.mdc)

ALWAYS use db.batch() for multiple related database operations to ensure atomicity in Drizzle transactions. Single independent operations do not need batch.

Files:

  • packages/workers/src/routes/__tests__/email.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
  • packages/workers/src/middleware/__tests__/rateLimit.test.js
packages/workers/src/routes/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/workers.mdc)

ALWAYS validate request bodies using validateRequest middleware from validation config. Do not perform manual validation.

Files:

  • packages/workers/src/routes/__tests__/email.test.js
  • packages/workers/src/routes/__tests__/contact.test.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: corates-workers-prod
  • GitHub Check: Workers Builds: corates
🔇 Additional comments (7)
packages/workers/src/routes/__tests__/email.test.js (1)

52-52: LGTM: Production environment applied to all email tests.

Adding ENVIRONMENT: 'production' to the fetchEmail helper ensures all email route tests run with production-like behavior, which is particularly important for rate limiting tests.

packages/workers/src/middleware/__tests__/rateLimit.test.js (1)

43-43: LGTM: Consistent production environment setup across rate limit tests.

The production environment is now consistently applied across all rate limit middleware test cases, ensuring that rate limiting behavior is tested under production-like conditions. The approach of creating a testEnv object and passing it as the second argument to app.request() is clean and maintainable.

Also applies to: 90-90, 124-124, 158-158, 208-208, 248-248

packages/workers/src/routes/__tests__/contact.test.js (1)

305-305: No action needed - this inconsistency is intentional and correct.

The different environment configurations between email and contact tests reflect the different testing needs of each route. Rate limiting middleware (in rateLimit.js line 62) explicitly skips rate limiting when ENVIRONMENT !== 'production', making the production environment essential only for rate limiting tests. The contact.test.js approach of setting ENVIRONMENT: 'production' only in the rate limiting test is appropriate since no other contact route features are environment-dependent. If email.test.js applies it globally, that reflects broader testing requirements for the email route (such as queue behavior), not an inconsistency that needs to be resolved.

turbo.json (4)

4-7: LGTM! Build task properly configured.

The addition of dependsOn: ["^build"] ensures dependency builds complete first, and the expanded outputs correctly capture additional build artifacts (.output/**, .vinxi/**) likely from Vinxi/SolidStart frameworks.


8-14: LGTM! Test tasks properly configured.

The test task correctly depends on ["^build"] to ensure all dependencies are built before tests run. The watch variant appropriately disables caching for continuous feedback during development.


15-18: LGTM! Dev task properly configured.

Disabling cache and enabling persistence is appropriate for the development server task.


23-28: LGTM! Lint and format tasks properly configured.

Empty outputs arrays correctly indicate these tasks don't produce build artifacts, which is appropriate for code quality checks and formatting operations.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/mcp/src/tools/code-review.ts (1)

94-213: Replace emojis with text markers to comply with coding guidelines.

The prompt template uses emoji characters (🔴, 🟠, 🟡) for severity indicators, which violates the project's strict no-emoji policy: "NEVER use emojis anywhere in code, comments, documentation, plan files, or commit messages."

Ironically, line 112 of this same prompt instructs reviewers to avoid emojis ("solid-icons (NO emoji characters)"). The severity markers should use text-based alternatives.

Proposed fix using text markers
-### 🔴 CRITICAL
+### [CRITICAL]
 Issues that can:
 // ...

-### 🟠 MODERATE
+### [MODERATE]
 Issues that:
 // ...

-### 🟡 LOW
+### [LOW]
 Issues that:
 // ...

 ## Output Format (STRICT)

-### 🔴 CRITICAL ISSUES
+### [CRITICAL] ISSUES
 [Important and dangerous]
 // ...

-### 🟠 MODERATE ISSUES
+### [MODERATE] ISSUES
 [Important but not immediately dangerous]
 // ...

-### 🟡 LOW ISSUES
+### [LOW] ISSUES
 [Cleanups and improvements]

As per coding guidelines.

packages/ui/src/zag/Select.tsx (1)

131-146: Type mismatch between onChange signature and multiple select handling.

The onChange callback is typed as (value: string) => void, but for multiple selection, an array is passed using an unsafe cast details.value as unknown as string. This breaks type safety.

🔎 Suggested fix to support both single and multiple selection

Update the interface to handle both cases:

 export interface SelectProps {
   // ...
   /** Callback when value changes */
-  onChange?: (value: string) => void;
+  onChange?: (value: string | string[]) => void;
   // ...
 }

Then update the handler:

   const handleValueChange = (details: { value: string[] }) => {
     if (!local.onChange) return;

     if (merged.multiple) {
-      local.onChange(details.value as unknown as string);
+      local.onChange(details.value);
     } else {
       // ... existing single select logic
     }
   };
♻️ Duplicate comments (2)
packages/ui/src/zag/Collapsible.tsx (1)

54-55: Reactivity issue: snapshot passed to useCollapsible hook.

The concern from the past review remains valid. Calling arkProps() creates a snapshot that breaks Solid.js reactivity. The hook won't respond to prop changes.

packages/ui/src/zag/Clipboard.tsx (1)

124-232: Missing defaultValue in CopyButtonProps interface.

The CopyButton component passes defaultValue={machineProps.defaultValue} to Clipboard.Root at line 214, but defaultValue is not declared in the CopyButtonProps interface (lines 124-145). TypeScript will reject this or silently ignore the prop.

Proposed fix
 export interface CopyButtonProps {
   /** Value to copy */
   value: string;
+  /** Initial value to copy */
+  defaultValue?: string;
   /** Callback when copy status changes */
   onStatusChange?: (details: { copied: boolean }) => void;
🧹 Nitpick comments (9)
packages/mcp/src/tools/code-review.ts (2)

25-45: Consider simplifying the redundant immutability annotations.

Both readonly string[] type annotation and as const assertion are used together. Since as const already provides readonly + literal types, the explicit readonly annotation is redundant. You can either keep the type annotation and remove as const, or remove the explicit type and rely on type inference from as const.

Proposed simplification

Option 1 - Keep explicit type, remove as const:

-const IGNORED_EXTENSIONS: readonly string[] = [
+const IGNORED_EXTENSIONS: readonly string[] = [
   '.txt',
   '.lock',
   // ...
-] as const;
+];

Option 2 - Use as const with inferred type:

-const IGNORED_EXTENSIONS: readonly string[] = [
+const IGNORED_EXTENSIONS = [
   '.txt',
   '.lock',
   // ...
 ] as const;

268-271: Consider extracting buffer size magic numbers as named constants.

The buffer sizes 1024 * 1024 (1MB) and 1024 * 1024 * 5 (5MB) are repeated throughout the code as magic numbers. Extracting them as named constants would improve maintainability and make the intent clearer.

Proposed refactor

Add constants at the top of the file:

+const MAX_FILE_LIST_BUFFER = 1024 * 1024; // 1MB
+const MAX_DIFF_BUFFER = 1024 * 1024 * 5; // 5MB
+
 // Files to exclude from review (binary, generated, lock files)
 const IGNORED_EXTENSIONS: readonly string[] = [

Then use them in the code:

 const { stdout: rawFiles } = (await execFileAsync('git', filesArgs, {
   cwd: repoRoot,
-  maxBuffer: 1024 * 1024,
+  maxBuffer: MAX_FILE_LIST_BUFFER,
 })) as ExecFileResult;

 // ... later ...

 const { stdout: diff } = (await execFileAsync(
   'git',
   ['diff', '--', ...unstagedFiles.trim().split('\n')],
   {
     cwd: repoRoot,
-    maxBuffer: 1024 * 1024 * 5,
+    maxBuffer: MAX_DIFF_BUFFER,
   },
 )) as ExecFileResult;

Also applies to: 305-307, 337-340

packages/ui/src/zag/Menu.tsx (1)

10-22: Consider extracting the Placement type to a shared module.

The Placement type is duplicated across at least three files: Menu.tsx, Popover.tsx, and Tooltip.tsx. This violates DRY and will require multiple updates if placement options change.

🔎 Suggested approach

Create a shared types file:

// packages/ui/src/zag/types.ts
export type Placement =
  | 'top'
  | 'top-start'
  | 'top-end'
  | 'bottom'
  | 'bottom-start'
  | 'bottom-end'
  | 'left'
  | 'left-start'
  | 'left-end'
  | 'right'
  | 'right-start'
  | 'right-end';

Then import from the shared file in each component.

packages/ui/src/zag/PinInput.tsx (1)

93-94: Inconsistent export pattern: uses both named and default exports.

Other components in this PR (Menu, Drawer, TagsInput, RadioGroup, etc.) use only named exports. PinInput exports both a named export and a default export, which is inconsistent.

🔎 Suggested fix for consistency
 export { PinInputComponent as PinInput };
-export default PinInputComponent;

If a default export is needed for backward compatibility, consider keeping it but documenting why.

packages/ui/src/zag/Select.tsx (1)

265-265: Dual export pattern for backward compatibility.

The component exports both a default export and a named export. If this is intentional for backward compatibility, consider adding a comment explaining why. Otherwise, align with the named-export-only pattern used by other components.

Also applies to: 271-271

packages/ui/src/zag/QRCode.tsx (1)

60-61: Consider removing the default export for consistency.

QRCode exports both a named export (QRCode) and a default export (QRCodeComponent). Other migrated components in this PR (Combobox, FloatingPanel, Progress, NumberInput, Avatar, Tooltip) use only named exports. For consistency across the Zag UI package, consider removing the default export.

Suggested change
 export { QRCodeComponent as QRCode };
-export default QRCodeComponent;
packages/ui/src/zag/Tooltip.tsx (1)

12-24: Consider extracting the duplicated Placement type.

The Placement type is duplicated across multiple Zag components:

  • Menu.tsx (lines 9-21)
  • Popover.tsx (lines 11-23)
  • Tour.tsx (lines 24-36)
  • Tooltip.tsx (lines 12-24)

Consider extracting this to a shared types file (e.g., packages/ui/src/zag/types.ts or packages/ui/src/types/placement.ts) and importing it across these components to follow DRY principles.

Example shared type

Create packages/ui/src/zag/types.ts:

export type Placement =
  | 'top'
  | 'top-start'
  | 'top-end'
  | 'bottom'
  | 'bottom-start'
  | 'bottom-end'
  | 'left'
  | 'left-start'
  | 'left-end'
  | 'right'
  | 'right-start'
  | 'right-end';

Then import in each component:

import { Placement } from './types.js';
packages/ui/src/zag/index.ts (1)

5-32: Consider whether explicit .tsx extensions are necessary.

All re-export statements include explicit .tsx file extensions. While this can be required for ESM compatibility or specific moduleResolution settings, TypeScript typically resolves these automatically. If your build configuration handles extension resolution, these explicit extensions may be redundant.

Optional: Verify extension resolution requirements

Check your tsconfig.json and build setup to confirm whether explicit extensions are required:

#!/bin/bash
# Check tsconfig moduleResolution and module settings
cat tsconfig.json | jq '.compilerOptions | {module, moduleResolution, allowImportingTsExtensions}'
packages/ui/src/zag/Tabs.tsx (1)

33-36: Optional: Simplify by removing redundant accessor wrappers.

The accessor wrapper functions (value(), defaultValue(), tabsList(), children()) are unnecessary in SolidJS. The props object is already a reactive proxy, so you can directly access props.value, props.tabs, etc., and reactivity will be maintained.

Proposed simplification
-  const value = () => props.value;
-  const defaultValue = () => props.defaultValue;
-  const tabsList = () => props.tabs;
-  const children = () => props.children;
-
   const handleValueChange = (details: { value: string }) => {
     if (props.onValueChange) {
       props.onValueChange(details.value);
     }
   };

   return (
     <Tabs.Root
-      value={value()}
-      defaultValue={defaultValue() || tabsList()[0]?.value}
+      value={props.value}
+      defaultValue={props.defaultValue || props.tabs[0]?.value}
       onValueChange={handleValueChange}
     >
-      <Tabs.List class='flex overflow-x-auto rounded-t-lg border-b border-gray-200 bg-white'>
-        <For each={tabsList()}>
+      <Tabs.List class='flex overflow-x-auto rounded-t-lg border-b border-gray-200 bg-white'>
+        <For each={props.tabs}>

And similarly update children() references to props.children.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 918d332 and bec4fe1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (35)
  • .github/dependabot.yml
  • .github/workflows/prettier.yml
  • packages/mcp/src/tools/better-auth.ts
  • packages/mcp/src/tools/code-review.ts
  • packages/mcp/src/tools/drizzle.ts
  • packages/mcp/src/tools/lint.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Popover.tsx
  • packages/ui/src/zag/Progress.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/Switch.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/Toast.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/index.ts
  • packages/workers/src/middleware/__tests__/rateLimit.test.js
  • turbo.json
💤 Files with no reviewable changes (1)
  • .github/workflows/prettier.yml
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/ui/src/zag/Checkbox.tsx
  • packages/ui/src/zag/Popover.tsx
  • packages/mcp/src/tools/drizzle.ts
  • packages/workers/src/middleware/tests/rateLimit.test.js
  • packages/ui/src/zag/Splitter.tsx
  • packages/ui/src/zag/Switch.tsx
  • .github/dependabot.yml
🧰 Additional context used
📓 Path-based instructions (5)
**/*

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Do not use emojis in code, comments, documentation, or commit messages

NEVER use emojis anywhere in code, comments, documentation, plan files, or commit messages. This includes unicode symbols. For UI icons, use solid-icons library or SVGs only.

Files:

  • packages/ui/src/zag/Toast.tsx
  • packages/mcp/src/tools/better-auth.ts
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/mcp/src/tools/lint.ts
  • packages/ui/src/zag/Tour.tsx
  • turbo.json
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/mcp/src/tools/code-review.ts
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Progress.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features in JavaScript/TypeScript code
Comments should explain why something is being done, not narrate what the code does. Avoid comments that repeat variable names or describe obvious code behavior.

Files:

  • packages/ui/src/zag/Toast.tsx
  • packages/mcp/src/tools/better-auth.ts
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/mcp/src/tools/lint.ts
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/mcp/src/tools/code-review.ts
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Progress.tsx
packages/{web,ui}/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)

Group related components in subdirectories with barrel exports

Files:

  • packages/ui/src/zag/Toast.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Progress.tsx
packages/{web,ui}/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

packages/{web,ui}/**/*.{js,jsx,ts,tsx}: Import UI components from '@corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'
Always use 'solid-icons' library for icons. Never use emoji characters or text as icon replacements. Import from specific icon sets like 'solid-icons/bi', 'solid-icons/fi', 'solid-icons/ai', etc.

Files:

  • packages/ui/src/zag/Toast.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Progress.tsx
packages/{web,ui}/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

Use Tailwind CSS classes for styling components

Files:

  • packages/ui/src/zag/Toast.tsx
  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/RadioGroup.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Progress.tsx
🧠 Learnings (26)
📓 Common learnings
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/web/**/*.{js,jsx,ts,tsx} : Use import aliases from 'packages/web/jsconfig.json' instead of relative paths. Aliases include: '@/*' (src/*), 'components/*' (src/components/*), 'auth-ui/*' (src/components/auth-ui/*), 'checklist-ui/*' (src/components/checklist-ui/*), 'project-ui/*' (src/components/project-ui/*), 'routes/*' (src/routes/*), 'primitives/*' (src/primitives/*), 'api/*' (src/api/*), 'config/*' (src/config/*), and 'lib/*' (src/lib/*)
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Ensure browser compatibility for all frontend code (Safari is usually problematic)
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use Zag.js for UI components and design system
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Prefer modern ES6+ syntax and features in JavaScript/TypeScript code
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use import aliases from jsconfig.json instead of relative paths
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Prefer modern ES6+ syntax and features
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use responsive design principles for UI components
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/{web,ui}/**/*.{jsx,tsx} : Use Tailwind CSS classes for styling components
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,ui}/src/**/*.{jsx,tsx} : Group related components in subdirectories with barrel exports
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Keep files small, focused, and modular. If a file exceeds a high number of lines, consider refactoring by extracting sub-modules into a folder with index.jsx and helper components, moving complex logic into separate utility files or primitives, or splitting large forms into section components
📚 Learning: 2025-12-24T17:22:56.372Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/error-handling.mdc:0-0
Timestamp: 2025-12-24T17:22:56.372Z
Learning: Applies to packages/web/src/**/*.{js,ts,jsx,tsx} : Always use `handleFetchError` from `@/lib/error-utils.js` for fetch calls in frontend code with options like `{ showToast: true }` for error handling

Applied to files:

  • packages/ui/src/zag/Toast.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx} : Use Ark UI components from corates/ui package, not local component implementations

Applied to files:

  • packages/ui/src/zag/Toast.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/TagsInput.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/workers/src/**/*.{js,ts} : Use Better-Auth for authentication and user management

Applied to files:

  • packages/mcp/src/tools/better-auth.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Use the Corates MCP tools to explore local documentation sources for Better-Auth, Drizzle, Icons, and Zag documentation

Applied to files:

  • packages/mcp/src/tools/better-auth.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use Zag.js for UI components and design system

Applied to files:

  • packages/ui/src/zag/QRCode.tsx
  • packages/ui/src/zag/Tooltip.tsx
  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Avatar.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Menu.tsx
  • packages/ui/src/zag/PasswordInput.tsx
  • packages/ui/src/zag/Clipboard.tsx
  • packages/ui/src/zag/FloatingPanel.tsx
  • packages/ui/src/zag/Progress.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context

Applied to files:

  • packages/ui/src/zag/NumberInput.tsx
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/PinInput.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Zag component exist in `packages/web/src/components/zag/*` and should be reused. Check the README.md in that folder for a list of existing components before adding new components and when debugging

Applied to files:

  • packages/ui/src/zag/ToggleGroup.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Combobox.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/Dialog.tsx
  • packages/ui/src/zag/Menu.tsx
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/{web,ui}/**/*.{js,jsx,ts,tsx} : Import UI components from 'corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'

Applied to files:

  • packages/ui/src/zag/Select.tsx
  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/index.ts
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/TagsInput.tsx
  • packages/ui/src/zag/Progress.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use the `Show` component from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.

Applied to files:

  • packages/ui/src/zag/Tour.tsx
  • packages/ui/src/zag/Tabs.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/Drawer.tsx
  • packages/ui/src/zag/Menu.tsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/workers/src/**/*.{js,ts} : Use Zod for schema and input validation on the backend

Applied to files:

  • turbo.json
  • packages/mcp/src/tools/code-review.ts
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use the `For` component from solid-js for rendering lists. It provides better performance and keying compared to JavaScript's map function in JSX.

Applied to files:

  • packages/ui/src/zag/Tabs.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,ui}/src/**/*.{jsx,tsx} : Group related components in subdirectories with barrel exports

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Group related components in subdirectories with an index.js barrel export

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/web/**/*.{js,jsx,ts,tsx} : Use import aliases from 'packages/web/jsconfig.json' instead of relative paths. Aliases include: '@/*' (src/*), 'components/*' (src/components/*), 'auth-ui/*' (src/components/auth-ui/*), 'checklist-ui/*' (src/components/checklist-ui/*), 'project-ui/*' (src/components/project-ui/*), 'routes/*' (src/routes/*), 'primitives/*' (src/primitives/*), 'api/*' (src/api/*), 'config/*' (src/config/*), and 'lib/*' (src/lib/*)

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use responsive design principles for UI components

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/primitives/**/*.{js,ts} : Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/src/primitives/**/*.{jsx,tsx,js,ts} : Create reusable component logic in primitives (custom hooks) rather than embedding business logic directly in components. Primitives should encapsulate store access and complex logic patterns.

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/{web,ui}/**/*.{jsx,tsx} : Use Tailwind CSS classes for styling components

Applied to files:

  • packages/ui/src/zag/index.ts
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Do not destructure props in SolidJS components as it breaks reactivity. Instead, access props directly from the props object or wrap them in a function to ensure they are always up-to-date

Applied to files:

  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/TagsInput.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : In SolidJS components, components should receive at most 1-5 props (local config only, not shared state)

Applied to files:

  • packages/ui/src/zag/Accordion.tsx
  • packages/ui/src/zag/Collapsible.tsx
  • packages/ui/src/zag/TagsInput.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Never destructure props in SolidJS components - destructuring breaks reactivity. Access props directly (e.g., `props.name`) or wrap in a function (e.g., `const name = () => props.name`) to maintain reactivity.

Applied to files:

  • packages/ui/src/zag/Collapsible.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : When manipulating children in wrapper components, use the `children` helper from solid-js to ensure proper reactivity and handling of child elements.

Applied to files:

  • packages/ui/src/zag/Collapsible.tsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : In SolidJS, do NOT destructure props. Access props.field directly or wrap in a function: () => props.field

Applied to files:

  • packages/ui/src/zag/Collapsible.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use `createMemo` from solid-js for derived values that depend on reactive state, ensuring computed values update only when their dependencies change.

Applied to files:

  • packages/ui/src/zag/Collapsible.tsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use `createSignal` from solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.

Applied to files:

  • packages/ui/src/zag/Collapsible.tsx
🧬 Code graph analysis (5)
packages/mcp/src/tools/better-auth.ts (1)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/ui/src/zag/Tooltip.tsx (3)
packages/ui/src/zag/Menu.tsx (1)
  • Placement (10-22)
packages/ui/src/zag/Popover.tsx (1)
  • Placement (12-24)
packages/ui/src/zag/Tour.tsx (1)
  • Placement (25-37)
packages/mcp/src/tools/lint.ts (1)
packages/mcp/src/types.ts (1)
  • McpServerType (3-3)
packages/ui/src/zag/Dialog.tsx (4)
packages/web/src/api/google-drive.js (1)
  • size (146-146)
packages/web/src/components/project-ui/PdfPreviewPanel.jsx (1)
  • handleOpenChange (14-18)
packages/web/src/lib/form-errors.js (1)
  • details (23-23)
packages/ui/src/zag/index.ts (1)
  • useConfirmDialog (11-11)
packages/ui/src/zag/Menu.tsx (3)
packages/ui/src/zag/Popover.tsx (1)
  • Placement (12-24)
packages/ui/src/zag/Tooltip.tsx (1)
  • Placement (12-24)
packages/web/src/components/checklist-ui/pdf/PdfSelector.jsx (1)
  • handleSelect (39-41)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: corates
🔇 Additional comments (47)
packages/mcp/src/tools/better-auth.ts (4)

1-3: LGTM! Clean TypeScript imports.

The type-only import of McpServerType and the .js extension in the import path are correct patterns for TypeScript ESM compatibility.


7-9: LGTM! Proper TypeScript typing for cache.

The explicit Map<string, string> type annotation adds clarity and type safety to the cache implementation.


11-32: LGTM! Well-typed async function with safe non-null assertion.

The explicit type annotations strengthen the function signature. The non-null assertion on line 21 is safe because it's guarded by the has() check on line 20—this is an idiomatic TypeScript pattern for Map access.


34-73: LGTM! Solid TypeScript conversion with improved error handling.

The explicit typing of the server parameter and the enhanced error handling on lines 67-70 strengthen the code. Checking error instanceof Error before accessing .message is a TypeScript best practice that prevents runtime errors when non-Error values are thrown.

turbo.json (8)

4-6: LGTM! Build task properly configured.

The dependsOn: ["^build"] ensures dependencies build first, and the expanded outputs cover multiple build tool conventions (standard dist, Nitro .output, Vinxi .vinxi).


11-13: LGTM! Test task properly depends on build.

Ensuring packages are built before running tests is a best practice.


14-17: LGTM! Watch mode configured correctly.

Disabling cache for watch mode ensures fresh results, and persistent: true is appropriate for long-running watch processes.


18-21: LGTM! Dev task properly configured for development.

Disabling cache for dev servers ensures fresh builds, and persistent: true correctly handles the long-running development server.


22-25: LGTM! Deploy task configuration is reasonable.

The dependsOn: ["build"] ensures builds complete first, and cache: false is appropriate since deployment involves side effects (uploading to external services) that can't be meaningfully cached.


26-28: LGTM! Lint task configured correctly.

Empty outputs is appropriate since linting is a check that doesn't produce build artifacts. Turbo will still cache results based on input files.


29-31: LGTM! Format task configured correctly.

Empty outputs is appropriate for format checking tasks. Turbo will cache results based on source file inputs.


8-10: The empty outputs array is intentional and correct for this Cloudflare Workers project. The workers package uses Wrangler CLI for bundling and direct deployment to the edge platform, not traditional local build artifacts. The build script only builds the shared dependency; Cloudflare's deployment pipeline handles the rest.

Likely an incorrect or invalid review comment.

packages/mcp/src/tools/code-review.ts (4)

1-11: LGTM! Clean imports with proper TypeScript types.

The imports are well-structured and align with the TypeScript conversion. Using Zod for validation follows backend best practices.


13-22: LGTM! Well-defined interfaces for git command results.

The interfaces accurately model the return types from Node.js execFile and provide proper type safety for the async operations.


48-66: LGTM! Robust validation with proper type safety.

The branch name validation prevents command injection attacks, and the file filtering logic correctly excludes unwanted file types. Type annotations are properly applied.


234-376: LGTM! Well-structured function with robust security and error handling.

The TypeScript conversion provides excellent type safety throughout. Security concerns are properly addressed:

  • Branch name validation prevents command injection
  • execFile usage (no shell) prevents shell injection
  • Buffer limits prevent DoS from large diffs
  • Error messages are sanitized to avoid leaking internal paths

The fallback logic to unstaged changes when no branch diff is found improves user experience.

packages/mcp/src/tools/lint.ts (3)

14-14: LGTM!

The function signature is properly typed with McpServerType and an explicit void return type.


21-21: LGTM!

The explicit return type annotation provides good type safety and clearly documents the handler's response shape.


34-44: LGTM!

The error handling is well-structured with defensive property access and appropriate fallbacks. The use of nullish coalescing on Line 44 correctly handles the case where code might be 0, null, or undefined.

packages/ui/src/zag/Menu.tsx (1)

24-57: Well-typed interfaces and event handlers.

The MenuItem and MenuProps interfaces are well-defined with JSDoc comments. The event handler signatures (handleSelect and handleOpenChange) are correctly typed with object parameters matching Ark UI's callback patterns.

Also applies to: 62-76, 81-86

packages/ui/src/zag/Drawer.tsx (2)

11-32: Clean interface design with appropriate JSDoc documentation.

The DrawerProps interface is well-structured with sensible defaults documented in comments. The prop types cover all necessary drawer functionality.


37-51: Correct internal event handler typing and prop unwrapping.

The handleOpenChange correctly receives { open: boolean } from Ark UI internally while exposing a simplified (open: boolean) callback to consumers. This is a clean API design.

packages/ui/src/zag/TagsInput.tsx (2)

9-42: Comprehensive and well-documented props interface.

The TagsInputProps interface covers all necessary configuration options with clear JSDoc comments. The blurBehavior union type correctly matches Ark UI's expected values.


47-71: Proper TypeScript migration with correct handler typing.

The component is correctly typed as Component<TagsInputProps>. The validate and handleValueChange handlers have appropriate type annotations. The named export pattern (TagsInputComponent as TagsInput) is consistent with other components in the PR.

Also applies to: 121-123

packages/ui/src/zag/PinInput.tsx (1)

8-25: Well-defined props interface with sensible defaults documented.

The PinInputProps interface is clean and properly typed. Default values are documented in JSDoc comments.

packages/ui/src/zag/Collapsible.tsx (3)

10-43: Well-structured interfaces for API and props.

The CollapsibleApi interface clearly defines the programmatic control surface. The CollapsibleProps interface properly types all configuration options including the render function signatures for trigger and indicator.


80-81: Proper event typing for click handlers.

The handleTriggerClick handlers are correctly typed with MouseEvent and the target is properly cast to HTMLElement.

Also applies to: 147-148


117-190: Clean component structure with conditional API usage.

The CollapsibleComponent correctly uses createMemo to determine when the API-enabled path is needed, and the Show component properly switches between the two rendering modes.

packages/ui/src/zag/RadioGroup.tsx (2)

8-34: Clean interface design for radio group items and props.

Both RadioGroupItem and RadioGroupProps interfaces are well-defined. The item interface supports optional description and disabled state per item.


39-49: Correct TypeScript component declaration and handler typing.

The component is properly typed as Component<RadioGroupProps>. The handleValueChange has the correct signature matching Ark UI's callback pattern. The export pattern is consistent with other components.

Also applies to: 92-94

packages/ui/src/zag/Select.tsx (1)

13-54: Comprehensive interface with positioning options.

The SelectOption and SelectProps interfaces are well-defined. The positioning options type allows for Ark UI's flexible configuration.

packages/ui/src/zag/Dialog.tsx (3)

11-24: Well-structured interfaces for dialog components and configuration.

The DialogProps, ConfirmDialogProps, and ConfirmDialogConfig interfaces are comprehensive and properly typed. The separation between component props and hook configuration is clean.

Also applies to: 94-113, 232-238


29-92: Properly typed dialog components with correct handler signatures.

Both DialogComponent and ConfirmDialogComponent are correctly typed as Component<...Props>. The handleOpenChange handlers correctly receive { open: boolean } from Ark UI and unwrap appropriately.

Also applies to: 118-230


243-321: Clean promise-based confirmation hook implementation.

The useConfirmDialog hook is well-typed with proper generics for the promise resolution. The resolvePromise variable is correctly typed as ((value: boolean) => void) | null, and the returned API surface is clean.

packages/ui/src/zag/Combobox.tsx (1)

14-183: LGTM! TypeScript migration is well-structured.

The conversion to TypeScript is solid:

  • ComboboxItem and ComboboxProps interfaces clearly define the public API
  • Type predicate filter at lines 112 correctly narrows undefined from mapped items
  • Event handlers are explicitly typed with proper details parameter shapes
  • Consistent with the broader PR migration pattern
packages/ui/src/zag/FloatingPanel.tsx (1)

12-217: LGTM! Comprehensive TypeScript conversion.

The FloatingPanel migration is thorough:

  • Clear separation of FloatingPanelSize and FloatingPanelPosition types
  • Comprehensive FloatingPanelProps interface covering all configuration options
  • All event handlers (onOpenChange, onSizeChange, onPositionChange, onStageChange) properly typed
  • Explicit return type on getResizeTriggerStyle helper
packages/ui/src/zag/Clipboard.tsx (1)

9-122: LGTM! Clipboard component TypeScript conversion is solid.

The main Clipboard component migration is well-executed:

  • ClipboardApi interface provides a clear programmatic surface
  • ClipboardProps includes all necessary fields including defaultValue
  • Event handlers properly typed
  • Render prop pattern correctly typed with Accessor<ClipboardApi>
packages/ui/src/zag/Progress.tsx (1)

8-101: LGTM! Clean TypeScript migration.

The Progress component conversion is straightforward and correct:

  • ProgressProps interface clearly defines all configuration options
  • Component properly typed as Component<ProgressProps>
  • Consistent with PR-wide migration pattern
packages/ui/src/zag/QRCode.tsx (1)

8-58: LGTM! TypeScript conversion is correct.

The QRCode component migration properly types all props and converts to Component<QRCodeProps>.

packages/ui/src/zag/NumberInput.tsx (1)

9-133: LGTM! Comprehensive TypeScript migration.

The NumberInput component conversion is thorough:

  • NumberInputProps interface covers all numeric input configuration options
  • Properly typed as Component<NumberInputProps>
  • Event handlers correctly typed
  • Consistent with PR migration pattern
packages/ui/src/zag/Avatar.tsx (1)

8-57: LGTM! Clean TypeScript migration.

The Avatar component conversion is well-executed:

  • AvatarProps interface clearly defines the component surface
  • Status callback properly typed with union literal 'loading' | 'loaded' | 'error'
  • Component correctly typed as Component<AvatarProps>
packages/ui/src/zag/Tooltip.tsx (1)

26-157: LGTM! Solid TypeScript conversion with comprehensive props.

The Tooltip component migration is well-executed:

  • TooltipProps interface thoroughly defines all tooltip configuration options
  • Event handlers properly typed
  • Positioning logic correctly typed with explicit 'fixed' as const at line 132
  • Component properly typed as Component<TooltipProps>
packages/ui/src/zag/Toast.tsx (1)

5-5: Past review concern resolved.

The previous review flagged that ToastOptions was incompatible with the toaster.promise API. This has been correctly addressed by:

  • Importing ToastPromiseOptions from @ark-ui/solid/toast (line 5)
  • Using ToastPromiseOptions as the type for the promise method parameter (line 116)
  • Re-exporting the ToastPromiseOptions type (line 125)

The local ToastOptions interface is appropriately used for basic toast operations (success, error, info, loading, update).

Also applies to: 116-117, 125-125

packages/ui/src/zag/Tour.tsx (1)

157-157: Verify type assertion compatibility with actual @zag-js/tour API.

The type assertion as TourApi at line 157 cannot be definitively verified as safe without inspecting the actual return type of tour.connect() from the @zag-js/tour package. The project's tsconfig.json has skipLibCheck: true, which prevents TypeScript from validating this assertion against the library's type definitions. While all api() method calls in the render function align with the TourApi interface and this pattern is consistent with other Zag.js components in the codebase, the actual type compatibility should be confirmed, especially since this component is deferred from migration and not currently in use.

packages/ui/src/zag/Accordion.tsx (1)

6-87: LGTM! Excellent TypeScript conversion with proper SolidJS patterns.

The TypeScript conversion is well-executed:

  • Comprehensive type definitions with JSDoc comments
  • Proper use of splitProps to maintain SolidJS reactivity
  • Correctly typed event handlers
  • Clean migration to named exports

The component follows SolidJS best practices by avoiding prop destructuring and using the For component for list rendering.

packages/ui/src/zag/Tabs.tsx (1)

6-87: Strong TypeScript conversion with comprehensive type definitions.

The component properly defines TabDefinition and TabsProps interfaces with clear documentation, uses typed event handlers, and follows the named export pattern. The use of Show and For components aligns with SolidJS best practices.

packages/ui/src/zag/ToggleGroup.tsx (1)

6-97: LGTM! Comprehensive TypeScript conversion with excellent reactive patterns.

The TypeScript conversion demonstrates strong SolidJS patterns:

  • Well-structured type definitions with extensive documentation
  • Proper use of splitProps to maintain reactivity
  • Correct use of createMemo for derived state (isVertical)
  • Clean helper function for size classes
  • Properly typed event handlers
  • Correct use of For component with index tracking

The component exposes a rich API surface with sensible defaults while maintaining type safety throughout.

Comment on lines +8 to +12
interface ExecError extends Error {
stdout?: string;
stderr?: string;
code?: number | string;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's see the complete file to understand the error handling context
cat -n packages/mcp/src/tools/lint.ts | head -50

Repository: InfinityBowman/corates

Length of output: 2086


🏁 Script executed:

# Check if ExecException is already being used in the codebase
rg -n "ExecException" --type ts

Repository: InfinityBowman/corates

Length of output: 48


🏁 Script executed:

# Check how the error is actually being used around lines 34-44
sed -n '30,50p' packages/mcp/src/tools/lint.ts

Repository: InfinityBowman/corates

Length of output: 811


🏁 Script executed:

# Check if error utility functions from corates/shared are being used
rg -n "isErrorCode|error-utils" --type ts packages/

Repository: InfinityBowman/corates

Length of output: 48


🌐 Web query:

Node.js child_process ExecException type definition code property

💡 Result:

Short answer — types:

  • child_process.ExecException.code: optional number (code?: number). [1][3]
  • child_process.ExecFileException (used by execFile): code is string | number | null (merged with ErrnoException). [2]

Sources: Type definitions from @types/node and Node docs. References: [1] child_process.d.ts (@types/node). [2] ExecFileException type (Node/Bun reference). [3] Node.js child_process docs describing error.code as the process exit code.


Update the ExecError.code type to number instead of number | string.

Node.js exec errors have code as a numeric exit code, not a string. Consider using the built-in ExecException type from child_process instead of the custom interface: interface ExecError extends ExecException with stdout and stderr properties.

🤖 Prompt for AI Agents
In packages/mcp/src/tools/lint.ts around lines 8 to 12, the custom ExecError
defines code as number | string but Node exec errors use a numeric exit code;
change the type to number and preferably extend Node's built-in ExecException
instead of redefining the whole interface: import ExecException from
child_process (or use the built-in type), declare interface ExecError extends
ExecException { stdout?: string; stderr?: string } so code is inherited as
number, or at minimum change the current code?: number | string to code?: number
and update any call sites/types accordingly.

@InfinityBowman InfinityBowman merged commit a8e47a0 into main Dec 24, 2025
1 of 3 checks passed
@InfinityBowman InfinityBowman deleted the 143-convert-packages-to-typescript branch December 24, 2025 23:48
@github-actions github-actions Bot restored the 143-convert-packages-to-typescript branch December 24, 2025 23:48
@coderabbitai coderabbitai Bot mentioned this pull request Dec 29, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Apr 7, 2026
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.

convert packages to typescript

2 participants