70 zag package#71
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughCreates a new shared UI package Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Areas to review closely:
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
corates | e392d2d | Commit Preview URL | Dec 16 2025, 07:44 PM |
There was a problem hiding this comment.
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 extractingReviewerPoolSectionas a separate component.The nested
ReviewerPoolSectionfunction 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.jsxsibling file or within aReviewerAssignment/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
setTimeoutin the drop handler could continue executing even after component unmount, potentially causing issues. Store the timeout ID and clear it inonCleanup.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 Aand#### Option B) would improve document structure and navigation.packages/ui/src/zag/Dialog.jsx (1)
204-204: Removeddisabled:cursor-not-allowedfrom 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 keepingdisabled:cursor-not-allowedfor 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
formatFileSizefunction 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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 thesolid-iconslibrary 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/withindex.jsxand 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.jsxpackages/web/src/Layout.jsxpackages/web/src/components/profile-ui/GoogleDriveSettings.jsxpackages/web/src/components/project-ui/ReviewerAssignment.jsxpackages/web/src/primitives/__tests__/useAddStudies.sync.test.jspackages/web/src/components/project-ui/tabs/AllStudiesTab.jsxpackages/web/src/components/profile-ui/LinkedAccountsSection.jsxpackages/web/src/primitives/useProjectMemberHandlers.jspackages/ui/src/index.jspackages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsxpackages/web/src/components/checklist-ui/ChecklistsDashboard.jsxpackages/ui/src/zag/RadioGroup.jsxpackages/web/src/components/checklist-ui/ScoreTag.jsxpackages/web/src/components/checklist-ui/pdf/PdfToolbar.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsxpackages/web/src/primitives/useProjectStudyHandlers.jspackages/web/src/components/auth-ui/SignIn.jsxpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/web/src/components/profile-ui/ProfilePage.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/checklist-ui/CreateLocalChecklist.jsxpackages/ui/src/zag/Clipboard.jsxpackages/ui/src/primitives/useWindowDrag.jspackages/web/src/components/project-ui/add-studies/DoiLookupSection.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/ui/src/zag/Editable.jsxpackages/web/src/components/profile-ui/SettingsPage.jsxpackages/web/src/components/checklist-ui/AMSTAR2Checklist.jsxpackages/web/src/primitives/useAddStudies.jspackages/web/src/components/admin-ui/UserTable.jsxpackages/ui/src/zag/Dialog.jsxpackages/web/src/components/profile-ui/MergeAccountsDialog.jsxpackages/ui/src/zag/Splitter.jsxpackages/web/src/components/profile-ui/TwoFactorSetup.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/primitives/useProjectChecklistHandlers.jspackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/ui/src/zag/FileUpload.jsxpackages/web/src/components/project-ui/CreateProjectForm.jsxpackages/ui/src/zag/index.jspackages/web/src/components/checklist-ui/compare/Navbar.jsxpackages/web/src/components/sidebar/StudyTreeItem.jsxpackages/web/src/components/profile-ui/AccountProviderCard.jsxpackages/ui/src/zag/Combobox.jsxpackages/web/src/components/project-ui/add-studies/PdfUploadSection.jsxpackages/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.jsxpackages/web/src/Layout.jsxpackages/web/src/components/profile-ui/GoogleDriveSettings.jsxpackages/web/src/components/project-ui/ReviewerAssignment.jsxpackages/web/src/primitives/__tests__/useAddStudies.sync.test.jspackages/web/src/components/project-ui/tabs/AllStudiesTab.jsxpackages/web/src/components/profile-ui/LinkedAccountsSection.jsxpackages/web/src/primitives/useProjectMemberHandlers.jspackages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsxpackages/web/src/components/checklist-ui/ChecklistsDashboard.jsxpackages/web/src/components/checklist-ui/ScoreTag.jsxpackages/web/src/components/checklist-ui/pdf/PdfToolbar.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsxpackages/web/src/primitives/useProjectStudyHandlers.jspackages/web/src/components/auth-ui/SignIn.jsxpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/web/src/components/profile-ui/ProfilePage.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/checklist-ui/CreateLocalChecklist.jsxpackages/web/src/components/project-ui/add-studies/DoiLookupSection.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/web/src/components/profile-ui/SettingsPage.jsxpackages/web/src/components/checklist-ui/AMSTAR2Checklist.jsxpackages/web/src/primitives/useAddStudies.jspackages/web/src/components/admin-ui/UserTable.jsxpackages/web/src/components/profile-ui/MergeAccountsDialog.jsxpackages/web/src/components/profile-ui/TwoFactorSetup.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/primitives/useProjectChecklistHandlers.jspackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/web/src/components/project-ui/CreateProjectForm.jsxpackages/web/src/components/checklist-ui/compare/Navbar.jsxpackages/web/src/components/sidebar/StudyTreeItem.jsxpackages/web/src/components/profile-ui/AccountProviderCard.jsxpackages/web/src/components/project-ui/add-studies/PdfUploadSection.jsxpackages/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 thesolid-iconslibrary 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 inpackages/web/src/components/zag/*and should be reused
Files:
packages/web/src/components/checklist-ui/compare/ChecklistReconciliation.jsxpackages/web/src/components/profile-ui/GoogleDriveSettings.jsxpackages/web/src/components/project-ui/ReviewerAssignment.jsxpackages/web/src/components/project-ui/tabs/AllStudiesTab.jsxpackages/web/src/components/profile-ui/LinkedAccountsSection.jsxpackages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsxpackages/web/src/components/checklist-ui/ChecklistsDashboard.jsxpackages/web/src/components/checklist-ui/ScoreTag.jsxpackages/web/src/components/checklist-ui/pdf/PdfToolbar.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsxpackages/web/src/components/auth-ui/SignIn.jsxpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/web/src/components/profile-ui/ProfilePage.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/checklist-ui/CreateLocalChecklist.jsxpackages/web/src/components/project-ui/add-studies/DoiLookupSection.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/web/src/components/profile-ui/SettingsPage.jsxpackages/web/src/components/checklist-ui/AMSTAR2Checklist.jsxpackages/web/src/components/admin-ui/UserTable.jsxpackages/web/src/components/profile-ui/MergeAccountsDialog.jsxpackages/web/src/components/profile-ui/TwoFactorSetup.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/web/src/components/project-ui/CreateProjectForm.jsxpackages/web/src/components/checklist-ui/compare/Navbar.jsxpackages/web/src/components/sidebar/StudyTreeItem.jsxpackages/web/src/components/profile-ui/AccountProviderCard.jsxpackages/web/src/components/project-ui/add-studies/PdfUploadSection.jsxpackages/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.jsxpackages/web/src/Layout.jsxpackages/web/src/components/profile-ui/GoogleDriveSettings.jsxpackages/web/src/components/project-ui/ReviewerAssignment.jsxpackages/web/src/primitives/__tests__/useAddStudies.sync.test.jspackages/web/src/components/project-ui/tabs/AllStudiesTab.jsxpackages/web/src/components/profile-ui/LinkedAccountsSection.jsxpackages/web/src/primitives/useProjectMemberHandlers.jspackages/ui/src/index.jspackages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsxpackages/web/src/components/checklist-ui/ChecklistsDashboard.jsxpackages/ui/src/zag/RadioGroup.jsxpackages/web/src/components/checklist-ui/ScoreTag.jsxpackages/web/src/components/checklist-ui/pdf/PdfToolbar.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/pdf/PdfEmptyState.jsxpackages/web/package.jsonpackages/web/src/primitives/useProjectStudyHandlers.jspackages/web/src/components/auth-ui/SignIn.jsxpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/web/src/components/profile-ui/ProfilePage.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/checklist-ui/CreateLocalChecklist.jsxpackages/ui/src/zag/Clipboard.jsxpackages/ui/src/primitives/useWindowDrag.jspackages/web/src/components/project-ui/add-studies/DoiLookupSection.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/ui/src/zag/Editable.jsxpackages/web/src/components/profile-ui/SettingsPage.jsxpackages/ui/jsconfig.jsonpackages/web/src/components/checklist-ui/AMSTAR2Checklist.jsxpackages/web/src/primitives/useAddStudies.jspackages/web/src/components/admin-ui/UserTable.jsxpackages/ui/src/zag/Dialog.jsxpackages/web/src/components/profile-ui/MergeAccountsDialog.jsxpackages/ui/src/zag/Splitter.jsxpackages/web/src/components/profile-ui/TwoFactorSetup.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/primitives/useProjectChecklistHandlers.jspackages/ui/package.jsonpackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/ui/src/zag/FileUpload.jsxpackages/web/src/components/project-ui/CreateProjectForm.jsxpackages/ui/src/zag/index.jspackages/web/src/components/checklist-ui/compare/Navbar.jsxpackages/web/src/components/sidebar/StudyTreeItem.jsxpackages/web/src/components/profile-ui/AccountProviderCard.jsxpackages/ui/src/zag/Combobox.jsxpackages/web/src/components/project-ui/add-studies/PdfUploadSection.jsxpackages/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.jsbarrel export
Files:
packages/ui/src/index.jspackages/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.jsxpackages/web/src/Layout.jsxpackages/ui/README.mdpackages/ui/src/index.jspackages/web/src/components/checklist-ui/ChecklistsDashboard.jsxdocs/plans/ui-package-migration.mdpackages/web/src/components/checklist-ui/pdf/PdfToolbar.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/package.jsonpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/checklist-ui/CreateLocalChecklist.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/ui/src/zag/Editable.jsxpackages/ui/jsconfig.jsonpackages/web/src/components/profile-ui/TwoFactorSetup.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/primitives/useProjectChecklistHandlers.jspackages/ui/package.jsonpackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/ui/src/zag/FileUpload.jsxpackages/ui/src/zag/index.jspackages/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.jsxpackages/web/src/Layout.jsxpackages/web/src/components/project-ui/tabs/AllStudiesTab.jsxpackages/web/src/primitives/useProjectMemberHandlers.jspackages/ui/README.mdpackages/ui/src/index.jspackages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsxpackages/web/src/components/checklist-ui/ChecklistsDashboard.jsxdocs/plans/ui-package-migration.mdpackages/web/src/components/checklist-ui/pdf/PdfToolbar.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/package.jsonpackages/web/src/primitives/useProjectStudyHandlers.jspackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/web/src/components/profile-ui/ProfilePage.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/checklist-ui/CreateLocalChecklist.jsxpackages/web/src/components/project-ui/add-studies/DoiLookupSection.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/ui/src/zag/Editable.jsxpackages/web/src/components/profile-ui/SettingsPage.jsxpackages/ui/jsconfig.jsonpackages/web/src/components/admin-ui/UserTable.jsxpackages/web/src/components/profile-ui/TwoFactorSetup.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/primitives/useProjectChecklistHandlers.jspackages/ui/package.jsonpackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/ui/src/zag/FileUpload.jsxpackages/web/src/components/project-ui/CreateProjectForm.jsxpackages/ui/src/zag/index.jspackages/web/src/components/sidebar/StudyTreeItem.jsxpackages/ui/src/zag/Combobox.jsxpackages/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.jsxpackages/web/src/components/project-ui/add-studies/ReferenceImportSection.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/profile-ui/SettingsPage.jsxpackages/web/src/components/admin-ui/UserTable.jsxpackages/web/src/components/profile-ui/MergeAccountsDialog.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/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.jsxpackages/web/src/global.cssdocs/plans/ui-package-migration.mdpackages/web/src/components/project-ui/ProjectView.jsxpackages/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.jsxpackages/web/src/global.cssdocs/plans/ui-package-migration.mdpackages/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.jsxpackages/ui/src/index.jsdocs/plans/ui-package-migration.mdpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/ui/src/zag/index.jspackages/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.jsxpackages/ui/src/index.jsdocs/plans/ui-package-migration.mdpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/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.jsxdocs/plans/ui-package-migration.mdpackages/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.jsxpackages/web/src/components/project-ui/ReviewerAssignment.jsxpackages/web/src/primitives/useProjectMemberHandlers.jspackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/web/src/primitives/useAddStudies.jspackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/components/project-ui/AddStudiesForm.jsxpackages/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.jsxpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/components/project-ui/ProjectDashboard.jsxpackages/web/src/primitives/useAddStudies.jspackages/web/src/components/sidebar/Sidebar.jsxpackages/web/src/components/project-ui/CreateProjectForm.jsxpackages/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.jsxpackages/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.jsxpackages/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.jsdocs/plans/ui-package-migration.mdpackages/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.jspackages/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.jsxpackages/web/src/components/sidebar/ProjectTreeItem.jsxpackages/ui/jsconfig.jsonpackages/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.jsxpackages/web/src/components/project-ui/EditStudyModal.jsxpackages/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.mdpackages/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
| 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'; |
There was a problem hiding this comment.
🧩 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"
fiRepository: 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
fiRepository: 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
toasterdirectly:import { toaster } from '@corates/ui'and replace allshowToast.calls withtoaster. - Or create a
showToastwrapper utility function inpackages/uithat 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.
Summary by CodeRabbit
New Features
UI Changes
Documentation
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.