Skip to content

70 zag package#71

Merged
InfinityBowman merged 5 commits into
mainfrom
70-zag-package
Dec 16, 2025
Merged

70 zag package#71
InfinityBowman merged 5 commits into
mainfrom
70-zag-package

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Dec 16, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a centralized UI package for shared components
    • Added a hook to detect files dragged over the window
  • UI Changes

    • Simplified file upload UX and file size display
    • Streamlined editable field controls and dialog button text ("Loading...")
    • Added checklist header for ROBINS-I
  • Documentation

    • Added package README and a migration plan
  • Refactor

    • App updated to consume the centralized UI package; sidebar supports per-study expansion controls
  • Tests

    • Updated mocks/tests to use the new UI package and expanded toast API

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

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

coderabbitai Bot commented Dec 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Creates a new shared UI package packages/ui (published as @corates/ui) containing Zag components and a window-drag primitive; adds barrels/entrypoints, updates web to depend on @corates/ui, removes individual Zag deps from web, and replaces many local Zag imports with imports from @corates/ui.

Changes

Cohort / File(s) Summary
UI Package Infrastructure
packages/ui/package.json, packages/ui/jsconfig.json, packages/ui/README.md
New package manifest, path aliases, and README for @corates/ui.
UI Entry & Barrels
packages/ui/src/index.js, packages/ui/src/zag/index.js
Added public entry and a zag barrel that re-exports all Zag components/primitives.
Primitives
packages/ui/src/primitives/useWindowDrag.js
New Solid primitive hook useWindowDrag exposing isDraggingOverWindow.
Moved/Edited Components
packages/ui/src/zag/{Clipboard.jsx,Combobox.jsx,Dialog.jsx,Editable.jsx,FileUpload.jsx,RadioGroup.jsx,Splitter.jsx}
Component formatting/styling edits; Dialog made a named export (default re-export added); FileUpload refactored (simplified dropzone, file-size formatter, conditional callbacks); Editable control layout changed; Splitter/FileUpload gained default exports.
Web manifest & config
packages/web/package.json, packages/web/src/global.css
Added dependency @corates/ui (workspace:*); removed many @zag-js/* deps; added Tailwind/@source directive to include UI sources.
Web import updates
packages/web/src/components/**/*.jsx, packages/web/src/primitives/*.js, packages/web/src/Layout.jsx
Replaced numerous local @components/zag/* imports with consolidated imports from @corates/ui (Avatar, Dialog/ConfirmDialog/useConfirmDialog, Tooltip, PasswordInput, FileUpload, Select, Collapsible, Switch, Tabs, QRCode, PinInput, FloatingPanel, Checkbox, showToast, toaster, etc.).
Sidebar & Tree (behavioral wiring)
packages/web/src/components/sidebar/{Sidebar.jsx,ProjectTreeItem.jsx,StudyTreeItem.jsx}
Sidebar now tracks expandedStudies and passes isStudyExpanded/onToggleStudy; StudyTreeItem is controlled (derives open from props.isExpanded) and invokes props.onToggle.
Docs & tests
packages/web/src/components/zag/README.md, packages/web/src/primitives/__tests__/useAddStudies.sync.test.js
Removed old Zag README; updated test mocks to import showToast from @corates/ui and expanded mock shape.
Small UI tweak
packages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsx
Added a header div showing checklist title above the Response Legend.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Areas to review closely:

  • packages/ui/src/zag/FileUpload.jsx — drop handling, formatFileSize, when callbacks fire.
  • packages/ui/src/zag/Editable.jsx and Dialog.jsx — export surface (named vs default) and control layout changes.
  • packages/ui/src/zag/index.js and packages/ui/src/index.js — ensure exported names match all updated import sites in web.
  • Sidebar/StudyTreeItem — controlled expansion contract and prop usage.

Possibly related PRs

Poem

🐰 I hopped through code, with nimble feet,

Collected Zag parts tidy and neat,
Barrelled them up, a shared delight,
Now UI hops from one cozy site. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title "70 zag package" is vague and uses non-descriptive phrasing that doesn't clearly convey the main objective of the changeset. Clarify the title to better describe the primary change, such as 'Extract Zag components into shared UI package' or 'Create @corates/ui package with Zag components' to make the intent clear to reviewers.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 904b9ea and e392d2d.

📒 Files selected for processing (2)
  • packages/web/src/components/checklist-ui/AMSTAR2Checklist.jsx (2 hunks)
  • packages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsx (1 hunks)

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 16, 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 e392d2d Commit Preview URL Dec 16 2025, 07:44 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: 2

🧹 Nitpick comments (8)
packages/web/src/components/project-ui/google-drive/GoogleDrivePickerModal.jsx (1)

22-46: Consider extracting the IIFE to improve readability.

The immediately invoked async function expression (IIFE) pattern works but could be more readable as a named async function.

Apply this diff to refactor:

+  const handleImport = async (file, projectId, studyId, onImportSuccess) => {
+    try {
+      setImporting(true);
+      const result = await importFromGoogleDrive(file.id, projectId, studyId);
+      showToast.success(
+        'PDF Imported',
+        `Successfully imported "${file.name}" from Google Drive.`,
+      );
+      onImportSuccess?.(result.file);
+    } catch (err) {
+      console.error('Picker import error:', err);
+      showToast.error('Import Failed', err.message);
+    } finally {
+      setImporting(false);
+    }
+  };
+
   const handlePicked = picked => {
     const file = picked?.[0];
     if (!file) return;
 
-    const projectId = props.projectId;
-    const studyId = props.studyId;
-    const onImportSuccess = props.onImportSuccess;
-
-    (async () => {
-      try {
-        setImporting(true);
-        const result = await importFromGoogleDrive(file.id, projectId, studyId);
-        showToast.success(
-          'PDF Imported',
-          `Successfully imported "${file.name}" from Google Drive.`,
-        );
-        onImportSuccess?.(result.file);
-      } catch (err) {
-        console.error('Picker import error:', err);
-        showToast.error('Import Failed', err.message);
-      } finally {
-        setImporting(false);
-      }
-    })();
+    handleImport(file, props.projectId, props.studyId, props.onImportSuccess);
   };
packages/web/src/components/project-ui/ReviewerAssignment.jsx (1)

338-419: Consider extracting ReviewerPoolSection as a separate component.

The nested ReviewerPoolSection function is substantial (80+ lines) and could be extracted into its own file for better modularity and reusability. This would make the main component more concise and the pool section independently testable.

If extracted, it could live in a ReviewerPoolSection.jsx sibling file or within a ReviewerAssignment/ directory structure with an index.jsx entry point.

packages/ui/src/primitives/useWindowDrag.js (2)

29-33: Consider cleanup for the timeout to prevent memory leaks.

The setTimeout in the drop handler could continue executing even after component unmount, potentially causing issues. Store the timeout ID and clear it in onCleanup.

Apply this diff:

 export function useWindowDrag() {
   const [isDraggingOverWindow, setIsDraggingOverWindow] = createSignal(false);
   let dragCounter = 0;
+  let dropTimeoutId = null;
 
   onMount(() => {
     const handleDragEnter = e => {
       // Only respond to file drags
       if (e.dataTransfer?.types?.includes('Files')) {
         dragCounter++;
         setIsDraggingOverWindow(true);
       }
     };
 
     const handleDragLeave = () => {
       dragCounter--;
       if (dragCounter === 0) {
         setIsDraggingOverWindow(false);
       }
     };
 
     const handleDrop = () => {
       dragCounter = 0;
       // Delay state update to avoid interfering with drop handlers
-      setTimeout(() => setIsDraggingOverWindow(false), 50);
+      dropTimeoutId = setTimeout(() => setIsDraggingOverWindow(false), 50);
     };
 
     window.addEventListener('dragenter', handleDragEnter);
     window.addEventListener('dragleave', handleDragLeave);
     window.addEventListener('drop', handleDrop, true);
 
     onCleanup(() => {
+      if (dropTimeoutId) clearTimeout(dropTimeoutId);
       window.removeEventListener('dragenter', handleDragEnter);
       window.removeEventListener('dragleave', handleDragLeave);
       window.removeEventListener('drop', handleDrop, true);
     });
   });
 
   return { isDraggingOverWindow };
 }

14-20: Consider adding preventDefault for better cross-browser compatibility.

Adding e.preventDefault() in the dragenter handler can improve cross-browser behavior and prevent default browser actions during file drags.

Apply this diff:

 const handleDragEnter = e => {
   // Only respond to file drags
   if (e.dataTransfer?.types?.includes('Files')) {
+    e.preventDefault();
     dragCounter++;
     setIsDraggingOverWindow(true);
   }
 };
docs/plans/ui-package-migration.md (2)

7-44: Add language specifier to the fenced code block.

The package structure diagram should have a language specifier for consistency with other code blocks in the document.

-```
+```text
 packages/
   ui/
     package.json

157-166: Consider using proper headings instead of bold emphasis.

The markdown linter flags "Emphasis used instead of a heading" for Option A and Option B. While this is a minor formatting issue, using proper headings (e.g., #### Option A and #### Option B) would improve document structure and navigation.

packages/ui/src/zag/Dialog.jsx (1)

204-204: Removed disabled:cursor-not-allowed from button styles.

The disabled state now only applies disabled:opacity-50. Users may expect a not-allowed cursor on disabled buttons as a UX affordance. Consider keeping disabled:cursor-not-allowed for clearer disabled state indication.

-class='shrink-0 p-1 text-gray-400 hover:text-gray-500 rounded-md hover:bg-gray-100 transition-colors disabled:opacity-50'
+class='shrink-0 p-1 text-gray-400 hover:text-gray-500 rounded-md hover:bg-gray-100 transition-colors disabled:opacity-50 disabled:cursor-not-allowed'

Also applies to: 215-215, 222-222

packages/ui/src/zag/FileUpload.jsx (1)

215-220: Utility function for file size formatting.

The formatFileSize function is clean and handles the common B/KB/MB cases appropriately. One minor suggestion: consider handling edge cases for negative or non-numeric inputs defensively.

 const formatFileSize = bytes => {
+  if (typeof bytes !== 'number' || bytes < 0) return '0 B';
   if (bytes < 1024) return bytes + ' B';
   if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + ' KB';
   return (bytes / (1024 * 1024)).toFixed(1) + ' MB';
 };
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eef6ba9 and cd166bc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (56)
  • docs/plans/ui-package-migration.md (1 hunks)
  • packages/ui/README.md (1 hunks)
  • packages/ui/jsconfig.json (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/src/index.js (1 hunks)
  • packages/ui/src/primitives/useWindowDrag.js (1 hunks)
  • packages/ui/src/zag/Clipboard.jsx (1 hunks)
  • packages/ui/src/zag/Combobox.jsx (3 hunks)
  • packages/ui/src/zag/Dialog.jsx (4 hunks)
  • packages/ui/src/zag/Editable.jsx (1 hunks)
  • packages/ui/src/zag/FileUpload.jsx (3 hunks)
  • packages/ui/src/zag/RadioGroup.jsx (1 hunks)
  • packages/ui/src/zag/Splitter.jsx (1 hunks)
  • packages/ui/src/zag/index.js (1 hunks)
  • packages/web/package.json (1 hunks)
  • packages/web/src/Layout.jsx (1 hunks)
  • packages/web/src/components/admin-ui/UserTable.jsx (1 hunks)
  • packages/web/src/components/auth-ui/SignIn.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/AMSTAR2Checklist.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/ChecklistsDashboard.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/CreateLocalChecklist.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/ScoreTag.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/compare/Navbar.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsx (1 hunks)
  • packages/web/src/components/checklist-ui/pdf/PdfToolbar.jsx (1 hunks)
  • packages/web/src/components/profile-ui/AccountProviderCard.jsx (1 hunks)
  • packages/web/src/components/profile-ui/GoogleDriveSettings.jsx (1 hunks)
  • packages/web/src/components/profile-ui/LinkedAccountsSection.jsx (1 hunks)
  • packages/web/src/components/profile-ui/MergeAccountsDialog.jsx (1 hunks)
  • packages/web/src/components/profile-ui/ProfilePage.jsx (1 hunks)
  • packages/web/src/components/profile-ui/SettingsPage.jsx (1 hunks)
  • packages/web/src/components/profile-ui/TwoFactorSetup.jsx (1 hunks)
  • packages/web/src/components/project-ui/AddMemberModal.jsx (1 hunks)
  • packages/web/src/components/project-ui/AddStudiesForm.jsx (1 hunks)
  • packages/web/src/components/project-ui/CreateProjectForm.jsx (1 hunks)
  • packages/web/src/components/project-ui/EditStudyModal.jsx (1 hunks)
  • packages/web/src/components/project-ui/ProjectDashboard.jsx (1 hunks)
  • packages/web/src/components/project-ui/ProjectView.jsx (1 hunks)
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx (1 hunks)
  • packages/web/src/components/project-ui/add-studies/DoiLookupSection.jsx (1 hunks)
  • packages/web/src/components/project-ui/add-studies/PdfUploadSection.jsx (1 hunks)
  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx (1 hunks)
  • packages/web/src/components/project-ui/google-drive/GoogleDrivePickerModal.jsx (1 hunks)
  • packages/web/src/components/project-ui/tabs/AllStudiesTab.jsx (1 hunks)
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx (1 hunks)
  • packages/web/src/components/sidebar/Sidebar.jsx (1 hunks)
  • packages/web/src/components/sidebar/StudyTreeItem.jsx (1 hunks)
  • packages/web/src/components/zag/README.md (0 hunks)
  • packages/web/src/global.css (1 hunks)
  • packages/web/src/primitives/__tests__/useAddStudies.sync.test.js (1 hunks)
  • packages/web/src/primitives/useAddStudies.js (1 hunks)
  • packages/web/src/primitives/useProjectChecklistHandlers.js (1 hunks)
  • packages/web/src/primitives/useProjectMemberHandlers.js (1 hunks)
  • packages/web/src/primitives/useProjectStudyHandlers.js (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/web/src/components/zag/README.md
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,jsx,ts,tsx}: Do not use emojis in code, comments, or documentation
For UI icons, use the solid-icons library or SVGs only. Do not use emojis
Follow standard JavaScript/SolidJS/Cloudflare best practices
Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Prefer using config files rather than hardcoding values
Use Zod for schema and input validation

**/*.{js,jsx,ts,tsx}: Do not use emojis in code, comments, or documentation
Follow standard JavaScript/SolidJS/Cloudflare best practices
Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Keep files small, focused, and modular. Extract sub-modules into a folder (e.g., ComponentName/ with index.jsx and helper components). Move complex logic into separate utility files or primitives. Split large forms into section components
Each file should handle one coherent responsibility
Use Zod for schema and input validation

Files:

  • packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsx
  • packages/web/src/Layout.jsx
  • packages/web/src/components/profile-ui/GoogleDriveSettings.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/primitives/__tests__/useAddStudies.sync.test.js
  • packages/web/src/components/project-ui/tabs/AllStudiesTab.jsx
  • packages/web/src/components/profile-ui/LinkedAccountsSection.jsx
  • packages/web/src/primitives/useProjectMemberHandlers.js
  • packages/ui/src/index.js
  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/checklist-ui/ChecklistsDashboard.jsx
  • packages/ui/src/zag/RadioGroup.jsx
  • packages/web/src/components/checklist-ui/ScoreTag.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfToolbar.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsx
  • packages/web/src/primitives/useProjectStudyHandlers.js
  • packages/web/src/components/auth-ui/SignIn.jsx
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/AddMemberModal.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/web/src/components/profile-ui/ProfilePage.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/checklist-ui/CreateLocalChecklist.jsx
  • packages/ui/src/zag/Clipboard.jsx
  • packages/ui/src/primitives/useWindowDrag.js
  • packages/web/src/components/project-ui/add-studies/DoiLookupSection.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/ui/src/zag/Editable.jsx
  • packages/web/src/components/profile-ui/SettingsPage.jsx
  • packages/web/src/components/checklist-ui/AMSTAR2Checklist.jsx
  • packages/web/src/primitives/useAddStudies.js
  • packages/web/src/components/admin-ui/UserTable.jsx
  • packages/ui/src/zag/Dialog.jsx
  • packages/web/src/components/profile-ui/MergeAccountsDialog.jsx
  • packages/ui/src/zag/Splitter.jsx
  • packages/web/src/components/profile-ui/TwoFactorSetup.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/primitives/useProjectChecklistHandlers.js
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/ui/src/zag/FileUpload.jsx
  • packages/web/src/components/project-ui/CreateProjectForm.jsx
  • packages/ui/src/zag/index.js
  • packages/web/src/components/checklist-ui/compare/Navbar.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
  • packages/web/src/components/profile-ui/AccountProviderCard.jsx
  • packages/ui/src/zag/Combobox.jsx
  • packages/web/src/components/project-ui/add-studies/PdfUploadSection.jsx
  • packages/web/src/components/project-ui/google-drive/GoogleDrivePickerModal.jsx
packages/web/src/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

packages/web/src/**/*.{js,jsx,ts,tsx}: Use responsive design principles for UI components
Keep files small, focused, and modular. If a file exceeds a high number of lines, extract sub-modules into a folder with index.jsx and helper components, or move complex logic into separate utility files or primitives
Each file should handle one coherent responsibility
Group related components in subdirectories with an index.js barrel export
Do NOT prop-drill application state. Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file
Import stores directly where needed instead of passing values through multiple components
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 (when scoped to a feature)
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 (e.g., () => props.name) to ensure they are always up-to-date
Use createMemo for derived values based on props or state to ensure reactive updates
Use Solid's createStore for complex state or state objects for better performance and reactivity
Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Components should be lean and focused. Do not implement business logic; move that into stores, utilities, or primitives
Never have a component act as a 'God component' coordinating multiple large concerns

packages/web/src/**/*.{js,jsx,ts,tsx}: Do NOT prop-drill application state. Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file
Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 ...

Files:

  • packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsx
  • packages/web/src/Layout.jsx
  • packages/web/src/components/profile-ui/GoogleDriveSettings.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/primitives/__tests__/useAddStudies.sync.test.js
  • packages/web/src/components/project-ui/tabs/AllStudiesTab.jsx
  • packages/web/src/components/profile-ui/LinkedAccountsSection.jsx
  • packages/web/src/primitives/useProjectMemberHandlers.js
  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/checklist-ui/ChecklistsDashboard.jsx
  • packages/web/src/components/checklist-ui/ScoreTag.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfToolbar.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsx
  • packages/web/src/primitives/useProjectStudyHandlers.js
  • packages/web/src/components/auth-ui/SignIn.jsx
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/AddMemberModal.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/web/src/components/profile-ui/ProfilePage.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/checklist-ui/CreateLocalChecklist.jsx
  • packages/web/src/components/project-ui/add-studies/DoiLookupSection.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/web/src/components/profile-ui/SettingsPage.jsx
  • packages/web/src/components/checklist-ui/AMSTAR2Checklist.jsx
  • packages/web/src/primitives/useAddStudies.js
  • packages/web/src/components/admin-ui/UserTable.jsx
  • packages/web/src/components/profile-ui/MergeAccountsDialog.jsx
  • packages/web/src/components/profile-ui/TwoFactorSetup.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/primitives/useProjectChecklistHandlers.js
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/web/src/components/project-ui/CreateProjectForm.jsx
  • packages/web/src/components/checklist-ui/compare/Navbar.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
  • packages/web/src/components/profile-ui/AccountProviderCard.jsx
  • packages/web/src/components/project-ui/add-studies/PdfUploadSection.jsx
  • packages/web/src/components/project-ui/google-drive/GoogleDrivePickerModal.jsx
packages/web/src/components/**/*.{js,jsx,ts,tsx}

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

packages/web/src/components/**/*.{js,jsx,ts,tsx}: For UI icons, use the solid-icons library or SVGs only. Do not use emojis
Use responsive design principles for UI components
Use Zag.js for UI components and design system. Zag components exist in packages/web/src/components/zag/* and should be reused

Files:

  • packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsx
  • packages/web/src/components/profile-ui/GoogleDriveSettings.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/tabs/AllStudiesTab.jsx
  • packages/web/src/components/profile-ui/LinkedAccountsSection.jsx
  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/checklist-ui/ChecklistsDashboard.jsx
  • packages/web/src/components/checklist-ui/ScoreTag.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfToolbar.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsx
  • packages/web/src/components/auth-ui/SignIn.jsx
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/AddMemberModal.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/web/src/components/profile-ui/ProfilePage.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/checklist-ui/CreateLocalChecklist.jsx
  • packages/web/src/components/project-ui/add-studies/DoiLookupSection.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/web/src/components/profile-ui/SettingsPage.jsx
  • packages/web/src/components/checklist-ui/AMSTAR2Checklist.jsx
  • packages/web/src/components/admin-ui/UserTable.jsx
  • packages/web/src/components/profile-ui/MergeAccountsDialog.jsx
  • packages/web/src/components/profile-ui/TwoFactorSetup.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/web/src/components/project-ui/CreateProjectForm.jsx
  • packages/web/src/components/checklist-ui/compare/Navbar.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
  • packages/web/src/components/profile-ui/AccountProviderCard.jsx
  • packages/web/src/components/project-ui/add-studies/PdfUploadSection.jsx
  • packages/web/src/components/project-ui/google-drive/GoogleDrivePickerModal.jsx
**/*.{js,jsx,ts,tsx,json,yaml,yml,toml}

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

Prefer using config files rather than hardcoding values

Files:

  • packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsx
  • packages/web/src/Layout.jsx
  • packages/web/src/components/profile-ui/GoogleDriveSettings.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/primitives/__tests__/useAddStudies.sync.test.js
  • packages/web/src/components/project-ui/tabs/AllStudiesTab.jsx
  • packages/web/src/components/profile-ui/LinkedAccountsSection.jsx
  • packages/web/src/primitives/useProjectMemberHandlers.js
  • packages/ui/src/index.js
  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/checklist-ui/ChecklistsDashboard.jsx
  • packages/ui/src/zag/RadioGroup.jsx
  • packages/web/src/components/checklist-ui/ScoreTag.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfToolbar.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsx
  • packages/web/package.json
  • packages/web/src/primitives/useProjectStudyHandlers.js
  • packages/web/src/components/auth-ui/SignIn.jsx
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/AddMemberModal.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/web/src/components/profile-ui/ProfilePage.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/checklist-ui/CreateLocalChecklist.jsx
  • packages/ui/src/zag/Clipboard.jsx
  • packages/ui/src/primitives/useWindowDrag.js
  • packages/web/src/components/project-ui/add-studies/DoiLookupSection.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/ui/src/zag/Editable.jsx
  • packages/web/src/components/profile-ui/SettingsPage.jsx
  • packages/ui/jsconfig.json
  • packages/web/src/components/checklist-ui/AMSTAR2Checklist.jsx
  • packages/web/src/primitives/useAddStudies.js
  • packages/web/src/components/admin-ui/UserTable.jsx
  • packages/ui/src/zag/Dialog.jsx
  • packages/web/src/components/profile-ui/MergeAccountsDialog.jsx
  • packages/ui/src/zag/Splitter.jsx
  • packages/web/src/components/profile-ui/TwoFactorSetup.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/primitives/useProjectChecklistHandlers.js
  • packages/ui/package.json
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/ui/src/zag/FileUpload.jsx
  • packages/web/src/components/project-ui/CreateProjectForm.jsx
  • packages/ui/src/zag/index.js
  • packages/web/src/components/checklist-ui/compare/Navbar.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
  • packages/web/src/components/profile-ui/AccountProviderCard.jsx
  • packages/ui/src/zag/Combobox.jsx
  • packages/web/src/components/project-ui/add-studies/PdfUploadSection.jsx
  • packages/web/src/components/project-ui/google-drive/GoogleDrivePickerModal.jsx
**/{index,index.js,index.jsx,index.ts,index.tsx}

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

Group related components in subdirectories with an index.js barrel export

Files:

  • packages/ui/src/index.js
  • packages/ui/src/zag/index.js
docs/plans/**/*.{md,txt}

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

Place plans in the docs/plans/ directory

Files:

  • docs/plans/ui-package-migration.md
🧠 Learnings (29)
📓 Common learnings
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/components/zag/**/*.{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 or debugging
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use Zag.js for UI components and design system. Zag components exist in `packages/web/src/components/zag/*` and should be reused
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Group related components in subdirectories with an index.js barrel export
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Create reusable logic in 'primitives' (hooks) that can be shared across components to keep components clean and focused on rendering
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to **/{index,index.js,index.jsx,index.ts,index.tsx} : Group related components in subdirectories with an `index.js` barrel export
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/components/zag/**/*.{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 or debugging

Applied to files:

  • packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsx
  • packages/web/src/Layout.jsx
  • packages/ui/README.md
  • packages/ui/src/index.js
  • packages/web/src/components/checklist-ui/ChecklistsDashboard.jsx
  • docs/plans/ui-package-migration.md
  • packages/web/src/components/checklist-ui/pdf/PdfToolbar.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/package.json
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/AddMemberModal.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/checklist-ui/CreateLocalChecklist.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/ui/src/zag/Editable.jsx
  • packages/ui/jsconfig.json
  • packages/web/src/components/profile-ui/TwoFactorSetup.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/primitives/useProjectChecklistHandlers.js
  • packages/ui/package.json
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/ui/src/zag/FileUpload.jsx
  • packages/ui/src/zag/index.js
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use Zag.js for UI components and design system. Zag components exist in `packages/web/src/components/zag/*` and should be reused

Applied to files:

  • packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsx
  • packages/web/src/Layout.jsx
  • packages/web/src/components/project-ui/tabs/AllStudiesTab.jsx
  • packages/web/src/primitives/useProjectMemberHandlers.js
  • packages/ui/README.md
  • packages/ui/src/index.js
  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/checklist-ui/ChecklistsDashboard.jsx
  • docs/plans/ui-package-migration.md
  • packages/web/src/components/checklist-ui/pdf/PdfToolbar.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/package.json
  • packages/web/src/primitives/useProjectStudyHandlers.js
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/AddMemberModal.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/web/src/components/profile-ui/ProfilePage.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/checklist-ui/CreateLocalChecklist.jsx
  • packages/web/src/components/project-ui/add-studies/DoiLookupSection.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/ui/src/zag/Editable.jsx
  • packages/web/src/components/profile-ui/SettingsPage.jsx
  • packages/ui/jsconfig.json
  • packages/web/src/components/admin-ui/UserTable.jsx
  • packages/web/src/components/profile-ui/TwoFactorSetup.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/primitives/useProjectChecklistHandlers.js
  • packages/ui/package.json
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/ui/src/zag/FileUpload.jsx
  • packages/web/src/components/project-ui/CreateProjectForm.jsx
  • packages/ui/src/zag/index.js
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
  • packages/ui/src/zag/Combobox.jsx
  • packages/web/src/components/project-ui/add-studies/PdfUploadSection.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Import stores directly where needed instead of passing values through multiple components

Applied to files:

  • packages/web/src/Layout.jsx
  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/profile-ui/SettingsPage.jsx
  • packages/web/src/components/admin-ui/UserTable.jsx
  • packages/web/src/components/profile-ui/MergeAccountsDialog.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use responsive design principles for UI components

Applied to files:

  • packages/web/src/Layout.jsx
  • packages/web/src/global.css
  • docs/plans/ui-package-migration.md
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/package.json
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use responsive design principles for UI components

Applied to files:

  • packages/web/src/Layout.jsx
  • packages/web/src/global.css
  • docs/plans/ui-package-migration.md
  • packages/ui/src/zag/index.js
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Components should be lean and focused. Do not implement business logic; move that into stores, utilities, or primitives

Applied to files:

  • packages/web/src/Layout.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering

Applied to files:

  • packages/web/src/Layout.jsx
  • packages/ui/src/index.js
  • docs/plans/ui-package-migration.md
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/ui/src/zag/index.js
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Never have a component act as a 'God component' coordinating multiple large concerns

Applied to files:

  • packages/web/src/Layout.jsx
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Create reusable logic in 'primitives' (hooks) that can be shared across components to keep components clean and focused on rendering

Applied to files:

  • packages/web/src/Layout.jsx
  • packages/ui/src/index.js
  • docs/plans/ui-package-migration.md
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/ui/src/zag/index.js
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
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, extract sub-modules into a folder with index.jsx and helper components, or move complex logic into separate utility files or primitives

Applied to files:

  • packages/web/src/Layout.jsx
  • docs/plans/ui-package-migration.md
  • packages/ui/src/zag/FileUpload.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use Solid's createStore for complex state or state objects for better performance and reactivity

Applied to files:

  • packages/web/src/Layout.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/primitives/useProjectMemberHandlers.js
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/web/src/primitives/useAddStudies.js
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : When you have complex state or state objects, use Solid's `createStore` for better performance and reactivity

Applied to files:

  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/ProjectDashboard.jsx
  • packages/web/src/primitives/useAddStudies.js
  • packages/web/src/components/sidebar/Sidebar.jsx
  • packages/web/src/components/project-ui/CreateProjectForm.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : When you need to compute a value based on props or state, use `createMemo` to ensure it updates reactively

Applied to files:

  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use createMemo for derived values based on props or state to ensure reactive updates

Applied to files:

  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/sidebar/StudyTreeItem.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Group related components in subdirectories with an index.js barrel export

Applied to files:

  • packages/ui/src/index.js
  • docs/plans/ui-package-migration.md
  • packages/ui/src/zag/index.js
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to **/{index,index.js,index.jsx,index.ts,index.tsx} : Group related components in subdirectories with an `index.js` barrel export

Applied to files:

  • packages/ui/src/index.js
  • packages/ui/src/zag/index.js
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use aliases for imports when appropriate to improve readability

Applied to files:

  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/sidebar/ProjectTreeItem.jsx
  • packages/ui/jsconfig.json
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis

Applied to files:

  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
  • packages/web/src/components/project-ui/EditStudyModal.jsx
  • packages/web/src/components/project-ui/AddStudiesForm.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis

Applied to files:

  • packages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: This project is split into multiple packages under the packages/ directory: landing/marketing site, main app (web), and backend services (workers). Each package may have its own dependencies and configurations

Applied to files:

  • docs/plans/ui-package-migration.md
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context (when scoped to a feature)

Applied to files:

  • docs/plans/ui-package-migration.md
  • packages/web/src/components/project-ui/EditStudyModal.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{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 (e.g., () => props.name) to ensure they are always up-to-date

Applied to files:

  • packages/web/src/components/project-ui/EditStudyModal.jsx
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to packages/web/src/**/*.{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/web/src/components/project-ui/EditStudyModal.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Prefer using config files rather than hardcoding values

Applied to files:

  • packages/ui/jsconfig.json
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use Zod for schema and input validation

Applied to files:

  • packages/ui/jsconfig.json
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to **/*.{js,jsx,ts,tsx,json,yaml,yml,toml} : Prefer using config files rather than hardcoding values

Applied to files:

  • packages/ui/jsconfig.json
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/workers/**/*.{js,ts} : Use Better-Auth for authentication and user management

Applied to files:

  • packages/web/src/components/sidebar/Sidebar.jsx
📚 Learning: 2025-12-16T18:28:31.657Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T18:28:31.657Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Keep files small, focused, and modular. Extract sub-modules into a folder (e.g., `ComponentName/` with `index.jsx` and helper components). Move complex logic into separate utility files or primitives. Split large forms into section components

Applied to files:

  • packages/ui/src/zag/FileUpload.jsx
🧬 Code graph analysis (4)
packages/ui/src/primitives/useWindowDrag.js (2)
packages/ui/src/zag/FileUpload.jsx (2)
  • useWindowDrag (153-153)
  • handleDrop (159-213)
packages/web/src/primitives/useWindowDrag.js (3)
  • useWindowDrag (9-47)
  • dragCounter (29-33)
  • dragCounter (22-27)
packages/ui/src/zag/Editable.jsx (13)
packages/ui/src/zag/PinInput.jsx (2)
  • inputClass (35-40)
  • api (33-33)
packages/ui/src/zag/PasswordInput.jsx (1)
  • inputClass (10-10)
packages/ui/src/zag/Combobox.jsx (1)
  • api (80-80)
packages/ui/src/zag/FileUpload.jsx (1)
  • api (150-150)
packages/ui/src/zag/RadioGroup.jsx (1)
  • api (29-29)
packages/ui/src/zag/Splitter.jsx (1)
  • api (15-15)
packages/ui/src/zag/Avatar.jsx (1)
  • api (16-16)
packages/ui/src/zag/Accordion.jsx (1)
  • api (26-26)
packages/ui/src/zag/Checkbox.jsx (1)
  • api (51-51)
packages/ui/src/zag/FloatingPanel.jsx (2)
  • api (60-60)
  • showControls (61-61)
packages/ui/src/zag/Menu.jsx (1)
  • api (41-41)
packages/ui/src/zag/Collapsible.jsx (1)
  • api (32-32)
packages/ui/src/zag/Select.jsx (1)
  • placeholder (25-25)
packages/ui/src/zag/Dialog.jsx (2)
packages/web/src/components/admin-ui/UserTable.jsx (2)
  • loading (39-39)
  • handleConfirm (104-122)
packages/web/src/components/auth-ui/SignIn.jsx (1)
  • loading (21-21)
packages/ui/src/zag/FileUpload.jsx (2)
packages/ui/src/zag/Switch.jsx (2)
  • merged (6-11)
  • classValue (17-17)
packages/ui/src/zag/Menu.jsx (1)
  • api (41-41)
🪛 markdownlint-cli2 (0.18.1)
docs/plans/ui-package-migration.md

7-7: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


157-157: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


163-163: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


231-231: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

⏰ 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

Comment thread packages/web/src/components/admin-ui/UserTable.jsx Outdated
import { createSignal, createMemo, For, Show } from 'solid-js';
import { createStore, produce } from 'solid-js/store';
import { showToast } from '@components/zag/Toast.jsx';
import { showToast } from '@corates/ui';
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 showToast export from packages/ui

echo "=== packages/ui directory structure ==="
if [ -d "packages/ui" ]; then
  find packages/ui -type f \( -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "package.json" \) | head -30
else
  echo "packages/ui directory not found"
fi

echo -e "\n=== Searching for showToast export in packages/ui ==="
if [ -d "packages/ui" ]; then
  rg "export.*showToast|showToast.*export" packages/ui --type=ts --type=tsx --type=js 2>/dev/null || echo "No showToast export found via rg"
fi

echo -e "\n=== Checking packages/web/tsconfig.json for @corates/ui alias ==="
if [ -f "packages/web/tsconfig.json" ]; then
  cat packages/web/tsconfig.json | grep -A 5 -B 5 "@corates" || echo "@corates alias not found"
fi

echo -e "\n=== Searching for @corates/ui in package.json files ==="
find . -name "package.json" -type f -exec grep -l "@corates/ui" {} \; 2>/dev/null | head -10

echo -e "\n=== Checking ReviewerAssignment.jsx import statement ==="
if [ -f "packages/web/src/components/project-ui/ReviewerAssignment.jsx" ]; then
  head -20 packages/web/src/components/project-ui/ReviewerAssignment.jsx
fi

echo -e "\n=== Searching for showToast usage in ReviewerAssignment.jsx ==="
if [ -f "packages/web/src/components/project-ui/ReviewerAssignment.jsx" ]; then
  rg "showToast\.(warning|success|info|error)" packages/web/src/components/project-ui/ReviewerAssignment.jsx || echo "No showToast method calls found"
fi

Repository: InfinityBowman/corates

Length of output: 2421


🏁 Script executed:

#!/bin/bash
# More detailed verification

echo "=== packages/ui/src/index.js content ==="
if [ -f "packages/ui/src/index.js" ]; then
  cat packages/ui/src/index.js
else
  echo "File not found"
fi

echo -e "\n=== packages/ui/package.json exports field ==="
if [ -f "packages/ui/package.json" ]; then
  cat packages/ui/package.json | grep -A 30 '"exports"' || echo "No exports field"
fi

echo -e "\n=== Searching for 'showToast' anywhere in packages/ui ==="
rg "showToast" packages/ui --type=js --type=jsx --type=ts --type=tsx 2>/dev/null || echo "No showToast found in packages/ui"

echo -e "\n=== packages/web/package.json @corates/ui dependency ==="
if [ -f "packages/web/package.json" ]; then
  cat packages/web/package.json | grep -A 2 -B 2 "@corates/ui" || echo "Not found in dependencies"
fi

echo -e "\n=== Full packages/web/tsconfig.json content ==="
if [ -f "packages/web/tsconfig.json" ]; then
  cat packages/web/tsconfig.json
else
  echo "File not found"
fi

echo -e "\n=== Checking if packages/ui/src/zag/Toast.jsx contains showToast ==="
if [ -f "packages/ui/src/zag/Toast.jsx" ]; then
  head -50 packages/ui/src/zag/Toast.jsx
fi

Repository: InfinityBowman/corates

Length of output: 3271


Fix the import statement — showToast is not exported from @corates/ui.

The import path has been updated to @corates/ui, but this package does not export showToast. The Toast module in packages/ui/src/zag/Toast.jsx exports a toaster store from @zag-js/toast, not a showToast function.

The code calls showToast.warning(), showToast.info(), and showToast.success() on lines 178, 180, 187, 300, and 321, but this will fail at runtime since showToast is undefined.

Either:

  • Import and use toaster directly: import { toaster } from '@corates/ui' and replace all showToast. calls with toaster.
  • Or create a showToast wrapper utility function in packages/ui that provides the expected API and export it
🤖 Prompt for AI Agents
In packages/web/src/components/project-ui/ReviewerAssignment.jsx around line 8,
the file imports showToast from '@corates/ui' but that symbol is not exported;
update the import to import { toaster } from '@corates/ui' and then replace all
occurrences of showToast.warning/info/success on lines 178, 180, 187, 300, and
321 with the equivalent toaster.warning/info/success calls (or alternatively add
a showToast wrapper in packages/ui and export it, then keep current calls);
ensure the import name and all call sites are updated consistently so runtime
errors are resolved.

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.

zag package

2 participants