137 checklist status improvements#138
Conversation
📝 WalkthroughWalkthroughCentralizes checklist status around CHECKLIST_STATUS and domain utilities, removes the isReconciled flag, updates reconciliation/tab logic across UI and sync layers, extends the Select component (useSelect export, inDialog prop, z-index), and edits the landing contact copy. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as Checklist UI
participant Domain as checklist-domain.js
participant Status as CHECKLIST_STATUS
participant Store as Project Store
User->>UI: Click "Mark complete"
activate UI
UI->>Domain: getNextStatusForCompletion(study)
activate Domain
Domain->>Status: evaluate reviewer count & rules
Domain-->>UI: return nextStatus (COMPLETED / AWAITING_RECONCILE)
deactivate Domain
rect rgba(200,220,240,0.6)
Note over UI,Status: Validate transition
UI->>Status: canTransitionTo(current, nextStatus)
Status-->>UI: allowed / denied
end
UI->>Store: updateChecklist(id, { status: nextStatus })
activate Store
Store-->>UI: persist confirmation
deactivate Store
UI->>Domain: isReconciledChecklist(updatedChecklist)
Domain-->>UI: reconciled? (assignedTo === null)
UI-->>User: Render updated checklist state
deactivate UI
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 minutes Possibly related issues
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
corates | f317180 | Commit Preview URL | Dec 24 2025, 08:11 PM |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (5)
packages/landing/src/routes/contact.jsx (1)
184-207: Consider using SolidJSShowcomponent for conditional rendering.The ternary operator (line 184) and logical AND operators (lines 196, 202) for conditional rendering could be replaced with the
Showcomponent for better consistency with SolidJS patterns. This is especially useful for larger conditional blocks and maintains better reactivity semantics.🔎 Proposed refactor using Show component
{formState() === 'sending' ? <> <FiLoader class='h-5 w-5 animate-spin' /> Sending... </> : <> <FiSend class='h-5 w-5' /> Send Message </> }Could become:
+ import { Show } from 'solid-js'; + - {formState() === 'sending' ? - <> - <FiLoader class='h-5 w-5 animate-spin' /> - Sending... - </> - : <> - <FiSend class='h-5 w-5' /> - Send Message - </> - } + <Show when={formState() === 'sending'} fallback={ + <> + <FiSend class='h-5 w-5' /> + Send Message + </> + }> + <> + <FiLoader class='h-5 w-5 animate-spin' /> + Sending... + </> + </Show>Apply similarly to the status messages (lines 196–207).
As per coding guidelines, prefer
Showcomponent over ternary/logical operators for conditional rendering in SolidJS components.packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (1)
20-32: Verify edge case whenprops.getAssigneeNamereturns falsy value.The
waitingForReviewerfunction returns the result ofprops.getAssigneeName(waitingReviewerId)directly at line 31. If this returnsnullorundefined, the fallback UI (line 39) will render "Waiting for " with no name.Consider adding a fallback:
- return props.getAssigneeName(waitingReviewerId); + return props.getAssigneeName(waitingReviewerId) || 'reviewer';packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx (1)
60-77: Effect has potential reactivity issue withselectsReady.The effect tracks
props.study?.id,props.open, andcurrentStudy(), butsetSelectsReady(true)is called inside theif (isOpen && studyId && study)branch. However,selectsReadyis never reset tofalsewhen the modal opens with a different study, only when it closes. This could cause the Select components to render with stale data briefly.Consider resetting
selectsReadyat the start of the effect when opening:Proposed fix
createEffect(() => { const studyId = props.study?.id; const isOpen = props.open; const study = currentStudy(); if (isOpen && studyId && study) { + // Reset and re-set to force re-render of Select components + setSelectsReady(false); // Sync from the store's current study data setReviewer1(study.reviewer1 || ''); setReviewer2(study.reviewer2 || ''); // Small delay to ensure Select components are ready before rendering - setSelectsReady(true); + queueMicrotask(() => setSelectsReady(true)); } else if (!isOpen) { // Reset when modal closes setReviewer1(''); setReviewer2(''); + setSelectsReady(false); } });packages/ui/src/zag/Select.jsx (2)
65-72: Redundant accessor patterns mixingpropsandmerged.Lines 65-72 create accessors that access both
propsandmerged, but some values likeitemsanddisabledValuesare also inlocalfromsplitProps. This could lead to confusion:
items()usesprops.itemsbutitemsis also inlocalplaceholder()uses bothprops.placeholderandmerged.placeholderConsider consistently using either
localormergedfor convenience props:Proposed simplification
- const items = () => props.items || []; - // Access value reactively from props to maintain reactivity - const value = () => props.value; - const disabledValues = createMemo(() => props.disabledValues || []); - const placeholder = () => props.placeholder || merged.placeholder; + const items = () => local.items || []; + const value = () => local.value; + const disabledValues = createMemo(() => local.disabledValues || []); + const placeholder = () => local.placeholder || 'Select option';
171-232: Consider extracting shared dropdown content to reduce duplication.The
inDialogand Portal branches share identical item rendering logic (lines 176-199 vs 206-229). Extracting the content to a local variable would reduce duplication:Proposed refactor
const dropdownContent = ( <ArkSelect.Content class={`${Z_INDEX.SELECT} max-h-60 overflow-auto rounded-md border border-gray-200 bg-white py-1 shadow-lg focus:outline-none`} > <ArkSelect.ItemGroup> <Index each={collection().items}> {item => { const isDisabled = () => isValueDisabled(item().value); return ( <ArkSelect.Item item={item()} disabled={isDisabled()} class={`flex cursor-pointer items-center justify-between px-3 py-2 whitespace-nowrap hover:bg-gray-100 data-[highlighted]:bg-blue-50 ${ isDisabled() ? 'cursor-not-allowed text-gray-400 hover:bg-transparent' : 'text-gray-900' }`} > <ArkSelect.ItemText>{item().label}</ArkSelect.ItemText> <ArkSelect.ItemIndicator> <BiRegularCheck class='h-5 w-5 text-blue-600' /> </ArkSelect.ItemIndicator> </ArkSelect.Item> ); }} </Index> </ArkSelect.ItemGroup> </ArkSelect.Content> ); // Then use: {inDialog() ? <ArkSelect.Positioner>{dropdownContent}</ArkSelect.Positioner> : <Portal> <ArkSelect.Positioner>{dropdownContent}</ArkSelect.Positioner> </Portal> }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (28)
packages/landing/src/routes/contact.jsxpackages/ui/src/constants/zIndex.jspackages/ui/src/index.d.tspackages/ui/src/zag/Select.jsxpackages/ui/src/zag/index.jspackages/web/src/AMSTAR2/__tests__/checklist-compare.test.jspackages/web/src/AMSTAR2/checklist-compare.jspackages/web/src/ROBINS-I/checklist-compare.jspackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/lib/checklist-domain.jspackages/web/src/primitives/useProject/checklists.jspackages/web/src/primitives/useProject/sync.jspackages/web/src/utils/reconciliation.js
💤 Files with no reviewable changes (4)
- packages/web/src/primitives/useProject/sync.js
- packages/web/src/AMSTAR2/tests/checklist-compare.test.js
- packages/web/src/AMSTAR2/checklist-compare.js
- packages/web/src/ROBINS-I/checklist-compare.js
🧰 Additional context used
📓 Path-based instructions (16)
**/*
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Do not use emojis in code, comments, documentation, or commit messages
NEVER use emojis anywhere in code, comments, documentation, plan files, or commit messages. This includes unicode symbols. For UI icons, use solid-icons library or SVGs only.
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/ui/src/index.d.tspackages/web/src/components/project-ui/ProjectView.jsxpackages/landing/src/routes/contact.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/ui/src/constants/zIndex.jspackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/ui/src/zag/index.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.jspackages/ui/src/zag/Select.jsx
packages/web/src/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/**/*.{js,jsx,ts,tsx}: For UI icons, use thesolid-iconslibrary or SVGs only. Do not use emojis
Ensure browser compatibility for all frontend code (Safari is usually problematic)
Keep files small, focused, and modular. If a file exceeds a high number of lines, consider refactoring by extracting sub-modules into a folder with index.jsx and helper components, moving complex logic into separate utility files or primitives, or splitting large forms into section components
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
UsecreateMemofor derived values to ensure they update reactivelyUse import aliases from jsconfig.json instead of relative paths
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.js
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features in JavaScript/TypeScript code
Comments should explain why something is being done, not narrate what the code does. Avoid comments that repeat variable names or describe obvious code behavior.
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/ui/src/index.d.tspackages/web/src/components/project-ui/ProjectView.jsxpackages/landing/src/routes/contact.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/ui/src/constants/zIndex.jspackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/ui/src/zag/index.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.jspackages/ui/src/zag/Select.jsx
packages/web/src/components/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/components/**/*.{js,jsx,ts,tsx}: Use responsive design principles for UI components
Group related components in subdirectories with an index.js barrel export
Use Zag.js for UI components and design system
Zag component exist inpackages/web/src/components/zag/*and should be reused. Check the README.md in that folder for a list of existing components before adding new components and when debugging
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
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
Components should be lean and focused. They should not implement business logic; move that into stores, utilities, or primitives
Never have a component act as a God component coordinating multiple large concerns
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
packages/{web,ui}/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
Group related components in subdirectories with barrel exports
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/ui/src/zag/Select.jsx
packages/{web,landing}/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
packages/{web,landing}/src/**/*.{jsx,tsx}: Use Ark UI components from @corates/ui package, not local component implementations
Use solid-icons library (e.g., solid-icons/bi, solid-icons/fi) for icon imports
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/landing/src/routes/contact.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
packages/web/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
packages/web/src/**/*.{jsx,tsx}: In SolidJS, do NOT prop-drill application state. Import stores directly where needed instead.
In SolidJS, do NOT destructure props. Access props.field directly or wrap in a function: () => props.field
In SolidJS components, components should receive at most 1-5 props (local config only, not shared state)
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
packages/web/src/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
In SolidJS, use createMemo for derived values
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.js
packages/web/src/**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
packages/web/src/**/*.{js,ts,jsx,tsx}: Always usehandleFetchErrorfrom@/lib/error-utils.jsfor fetch calls in frontend code with options like{ showToast: true }for error handling
UsecreateFormErrorSignalsfrom@/lib/form-errors.jsfor form validation error handling with field-level and global error management
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.js
packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}: Never throw string literals; always throw Error objects or return domain errors from API routes
Use error utility functions likeisErrorCodefrom@corates/sharedor@/lib/error-utils.jsto check specific error types instead of manual string comparisons
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.js
{packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursor/rules/solidjs.mdc)
{packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts}: Never destructure props in SolidJS components - destructuring breaks reactivity. Access props directly (e.g.,props.name) or wrap in a function (e.g.,const name = () => props.name) to maintain reactivity.
Import stores directly in components rather than prop-drilling store data through component hierarchies.
Use separate read and write patterns for stores: import the store directly for reading data (e.g.,projectStore.getProjectList()) and import action stores separately for writing (e.g.,projectActionsStore.createProject()).
UsecreateSignalfrom solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.
UsecreateStorefrom solid-js/store for managing complex objects and arrays that require granular reactivity, enabling fine-grained updates where only affected parts re-render.
UsecreateMemofrom solid-js for derived values that depend on reactive state, ensuring computed values update only when their dependencies change.
Always clean up effects that create subscriptions or timers using theonCleanupfunction from solid-js. Use effects sparingly, only when derived values won't work well.
Keep components lean and focused on rendering. Move business logic to stores (for shared state and operations), primitives (for reusable hooks/logic), or utilities (for pure functions).
Use theShowcomponent from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.
Use theForcomponent from solid-js for rendering lists. It provides better performance and keying compared to JavaScript's map function in JSX.
When manipulating children in wrapper components, use thechildrenhelper from solid-js to ensure proper reactivity and handling of child elements.
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/landing/src/routes/contact.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.js
packages/{web,ui}/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
packages/{web,ui}/**/*.{js,jsx,ts,tsx}: Import UI components from '@corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'
Always use 'solid-icons' library for icons. Never use emoji characters or text as icon replacements. Import from specific icon sets like 'solid-icons/bi', 'solid-icons/fi', 'solid-icons/ai', etc.
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/ui/src/index.d.tspackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/ui/src/constants/zIndex.jspackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/ui/src/zag/index.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.jspackages/ui/src/zag/Select.jsx
packages/web/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
Use import aliases from 'packages/web/jsconfig.json' instead of relative paths. Aliases include: '@/' (src/), '@components/' (src/components/), '@auth-ui/' (src/components/auth-ui/), '@checklist-ui/' (src/components/checklist-ui/), '@project-ui/' (src/components/project-ui/), '@routes/' (src/routes/), '@primitives/' (src/primitives/), '@api/' (src/api/), '@config/' (src/config/), and '@lib/' (src/lib/)
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/utils/reconciliation.jspackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/constants/checklist-status.jspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/lib/checklist-domain.jspackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/primitives/useProject/checklists.js
packages/{web,ui}/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
Use Tailwind CSS classes for styling components
Files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/ChecklistRow.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/web/src/components/project-ui/overview-tab/OverviewTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/ui/src/zag/Select.jsx
packages/web/src/primitives/**/*.{js,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Files:
packages/web/src/primitives/useProject/checklists.js
{packages/web/**,packages/landing/**}/src/primitives/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursor/rules/solidjs.mdc)
Create reusable component logic in primitives (custom hooks) rather than embedding business logic directly in components. Primitives should encapsulate store access and complex logic patterns.
Files:
packages/web/src/primitives/useProject/checklists.js
🧠 Learnings (16)
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/web/**/*.{js,jsx,ts,tsx} : Use import aliases from 'packages/web/jsconfig.json' instead of relative paths. Aliases include: '@/*' (src/*), 'components/*' (src/components/*), 'auth-ui/*' (src/components/auth-ui/*), 'checklist-ui/*' (src/components/checklist-ui/*), 'project-ui/*' (src/components/project-ui/*), 'routes/*' (src/routes/*), 'primitives/*' (src/primitives/*), 'api/*' (src/api/*), 'config/*' (src/config/*), and 'lib/*' (src/lib/*)
Applied to files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/ui/src/zag/index.jspackages/web/src/primitives/useProject/checklists.jspackages/ui/src/zag/Select.jsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use separate read and write patterns for stores: import the store directly for reading data (e.g., `projectStore.getProjectList()`) and import action stores separately for writing (e.g., `projectActionsStore.createProject()`).
Applied to files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use `createStore` from solid-js/store for managing complex objects and arrays that require granular reactivity, enabling fine-grained updates where only affected parts re-render.
Applied to files:
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/ui/src/zag/index.jspackages/ui/src/zag/Select.jsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use the `Show` component from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.
Applied to files:
packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/sidebar/ChecklistTreeItem.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/ui/src/zag/index.js
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx} : Use solid-icons library (e.g., solid-icons/bi, solid-icons/fi) for icon imports
Applied to files:
packages/web/src/components/project-ui/ProjectView.jsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use `createSignal` from solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.
Applied to files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsxpackages/web/src/components/project-ui/overview-tab/ChartSection.jsxpackages/ui/src/zag/index.js
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx} : Use Ark UI components from corates/ui package, not local component implementations
Applied to files:
packages/web/src/components/project-ui/ChecklistRow.jsxpackages/ui/src/zag/index.jspackages/ui/src/zag/Select.jsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Import stores directly in components rather than prop-drilling store data through component hierarchies.
Applied to files:
packages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/ui/src/zag/index.jspackages/ui/src/zag/Select.jsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use Zag.js for UI components and design system
Applied to files:
packages/ui/src/zag/index.jspackages/ui/src/zag/Select.jsx
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/{web,ui}/**/*.{js,jsx,ts,tsx} : Import UI components from 'corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'
Applied to files:
packages/ui/src/zag/index.jspackages/ui/src/zag/Select.jsx
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Zag component exist in `packages/web/src/components/zag/*` and should be reused. Check the README.md in that folder for a list of existing components before adding new components and when debugging
Applied to files:
packages/ui/src/zag/index.js
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use import aliases from jsconfig.json instead of relative paths
Applied to files:
packages/ui/src/zag/index.js
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,ui}/src/**/*.{jsx,tsx} : Group related components in subdirectories with barrel exports
Applied to files:
packages/ui/src/zag/index.js
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Group related components in subdirectories with an index.js barrel export
Applied to files:
packages/ui/src/zag/index.js
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/src/primitives/**/*.{jsx,tsx,js,ts} : Create reusable component logic in primitives (custom hooks) rather than embedding business logic directly in components. Primitives should encapsulate store access and complex logic patterns.
Applied to files:
packages/ui/src/zag/index.js
📚 Learning: 2025-12-19T14:49:49.730Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-19T14:49:49.730Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Use responsive design principles for UI components
Applied to files:
packages/ui/src/zag/index.js
🧬 Code graph analysis (14)
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx (1)
packages/web/src/lib/checklist-domain.js (1)
getStudiesForTab(123-145)
packages/web/src/components/sidebar/ChecklistTreeItem.jsx (1)
packages/web/src/constants/checklist-status.js (2)
getStatusStyle(49-61)getStatusLabel(29-42)
packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx (3)
packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (2)
awaitingReconcileChecklists(13-16)isReady(18-18)packages/web/src/lib/checklist-domain.js (1)
isReconciledChecklist(16-20)packages/web/src/constants/checklist-status.js (2)
CHECKLIST_STATUS(8-13)CHECKLIST_STATUS(8-13)
packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (1)
packages/web/src/constants/checklist-status.js (1)
getStatusLabel(29-42)
packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (1)
packages/web/src/lib/checklist-domain.js (1)
getStudiesForTab(123-145)
packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (3)
packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx (2)
awaitingReconcileChecklists(19-23)isReady(26-26)packages/web/src/lib/checklist-domain.js (1)
isReconciledChecklist(16-20)packages/web/src/constants/checklist-status.js (2)
CHECKLIST_STATUS(8-13)CHECKLIST_STATUS(8-13)
packages/web/src/components/project-ui/ProjectView.jsx (1)
packages/web/src/lib/checklist-domain.js (1)
getChecklistCount(154-157)
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx (6)
packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx (2)
members(58-58)currentStudy(54-56)packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (2)
members(30-30)studies(29-29)packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx (1)
studies(18-18)packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx (1)
studies(62-62)packages/web/src/primitives/useProject/sync.js (1)
study(59-88)packages/web/src/components/project-ui/all-studies-tab/EditPdfMetadataModal.jsx (1)
handleSave(42-78)
packages/web/src/components/project-ui/ChecklistRow.jsx (1)
packages/web/src/constants/checklist-status.js (1)
getStatusLabel(29-42)
packages/web/src/constants/checklist-status.js (1)
packages/web/src/components/billing/SubscriptionCard.jsx (2)
status(13-13)currentStatus(33-33)
packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx (1)
packages/web/src/lib/checklist-domain.js (1)
getStudiesForTab(123-145)
packages/web/src/lib/checklist-domain.js (2)
packages/web/src/utils/reconciliation.js (2)
checklists(20-20)awaitingReconcile(24-26)packages/web/src/constants/checklist-status.js (2)
CHECKLIST_STATUS(8-13)CHECKLIST_STATUS(8-13)
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (2)
packages/web/src/lib/checklist-domain.js (7)
checklists(30-30)checklists(46-46)checklists(57-57)checklists(77-77)checklists(94-94)checklists(107-107)shouldShowInTab(69-114)packages/web/src/constants/checklist-status.js (2)
CHECKLIST_STATUS(8-13)CHECKLIST_STATUS(8-13)
packages/ui/src/zag/Select.jsx (4)
packages/ui/src/zag/Combobox.jsx (3)
local(46-53)merged(38-44)handleValueChange(82-86)packages/ui/src/zag/Collapsible.jsx (1)
local(92-92)packages/ui/src/zag/Tabs.jsx (2)
value(18-18)handleValueChange(23-27)packages/ui/src/constants/zIndex.js (2)
Z_INDEX(15-47)Z_INDEX(15-47)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Workers Builds: corates
🔇 Additional comments (43)
packages/landing/src/routes/contact.jsx (1)
80-83: Clear and helpful description with proper early-access guidance.The updated text effectively communicates the range of support available (platform questions, technical support, feedback, partnership) and provides explicit instruction for early-access requesters. The content is well-written and integrates naturally into the page flow.
packages/ui/src/index.d.ts (1)
745-746: LGTM! Type definition follows existing patterns.The
inDialogprop addition is consistent with similar props in ComboboxProps (line 268-269) and PopoverProps (line 637-638), maintaining API consistency across overlay components.packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (2)
9-9: LGTM! Centralizes domain logic.Importing from the centralized domain module aligns with the PR's objective to consolidate checklist filtering and status management.
33-37: LGTM! Replaced inline filtering with domain helper.The refactoring to use
getStudiesForTab(studies(), 'todo', userId)successfully centralizes the tab filtering logic. The helper handles the transformation to includetodoChecklistsand_needsChecklistflags, removing the need for inline filtering logic.Based on the relevant code snippet from
packages/web/src/lib/checklist-domain.js, the function properly handles the userId guard and returns an empty array when studies is invalid.packages/web/src/utils/reconciliation.js (2)
6-7: LGTM! Proper use of centralized utilities.Importing the status enum and domain helper aligns with the PR's centralization objectives.
22-29: LGTM! Simplified reconciliation logic.The refactoring replaces the previous multi-step heuristic with a clearer status-based approach using
CHECKLIST_STATUS.AWAITING_RECONCILEand theisReconciledChecklisthelper. The logic correctly identifies 1-2 individual reviewer checklists awaiting reconciliation.packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx (6)
11-15: LGTM! Proper imports for centralized status handling.The imports of
CHECKLIST_STATUSand domain helpers (findReconciledChecklist,getInProgressReconciledChecklists) support the migration from flag-based to status-based reconciliation logic.
233-242: LGTM! Status-based reconciliation detection.The refactoring correctly replaces the
isReconciledflag check with a status-based check (c.status !== CHECKLIST_STATUS.COMPLETED). This aligns with the PR's objective to centralize status management.
244-256: LGTM! Uses domain helper to find reconciled checklist.The change from manual checklist searching to using
findReconciledChecklist(study)centralizes the logic and ensures consistency across the codebase. The status check properly verifies the checklist is not completed.
270-274: LGTM! Sets initial status correctly.When creating a new reconciled checklist, the status is properly set to
CHECKLIST_STATUS.IN_PROGRESS, replacing the previousisReconciledflag approach.
299-316: LGTM! Race condition handling with domain helper.The race condition detection now uses
getInProgressReconciledChecklists(study)to find multiple in-progress reconciled checklists, which is clearer and more maintainable than the previous approach.
363-366: LGTM! Completion status set correctly.When completing reconciliation, the status is properly updated to
CHECKLIST_STATUS.COMPLETED, consistent with the status-based approach throughout the PR.packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx (2)
8-8: LGTM! Centralizes domain logic.Importing
getStudiesForTabfrom the centralized domain module aligns with the PR's objective to consolidate tab filtering logic.
23-25: LGTM! Replaced inline filtering with domain helper.The refactoring to use
getStudiesForTab(studies(), 'reconcile', null)centralizes the reconciliation tab filtering logic. TheuserIdis correctly passed asnullsince the reconcile tab doesn't filter by user.packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx (2)
7-7: LGTM! Centralizes domain logic.Importing
getStudiesForTabfrom the centralized domain module aligns with the PR's objective to consolidate tab filtering logic across all tab components.
20-22: LGTM! Replaced inline filtering with domain helper.The refactoring to use
getStudiesForTab(studies(), 'completed', null)centralizes the completed tab filtering logic. This completes the consistent pattern across all three tab components (ToDo, Reconcile, Completed).packages/web/src/components/sidebar/ChecklistTreeItem.jsx (2)
5-5: LGTM! Centralizes status display utilities.Importing the status helpers aligns with the PR's objective to consolidate status handling across the UI.
25-29: LGTM! Uses centralized status helpers.The refactoring replaces manual status badge rendering with
getStatusStyle()andgetStatusLabel()helpers, ensuring consistent status display across the application. TheShowwrapper correctly preserves the conditional rendering behavior.packages/ui/src/constants/zIndex.js (1)
24-25: LGTM! Z-index value supports Select in Dialog use case.The
z-[60]value correctly places Select dropdowns above Dialog content (z-50), which is necessary for the newinDialogprop functionality. This ensures Select dropdowns remain interactive when used inside modal dialogs.packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (2)
13-14: LGTM! Centralized imports improve maintainability.The addition of centralized status constants and domain utilities aligns well with the PR objectives and reduces magic strings throughout the codebase.
34-48: LGTM! Status management properly centralized.The replacement of string literals with
CHECKLIST_STATUSconstants and the use ofshouldShowInTabfor completed studies filtering properly centralizes the status management logic. This makes the code more maintainable and reduces duplication.packages/web/src/components/project-ui/ChecklistRow.jsx (1)
7-21: LGTM! Centralized status presentation.Replacing inline status styling and labeling logic with centralized
getStatusLabelandgetStatusStylefunctions ensures consistent status presentation across the UI and eliminates code duplication.packages/ui/src/zag/index.js (1)
24-24: LGTM! Public API extension is appropriate.Exposing the
useSelecthook alongside theSelectcomponent extends the public API appropriately while maintaining backward compatibility with the existing default export.packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx (1)
9-19: LGTM! Proper delegation to domain layer.Replacing local filtering logic with
getCompletedChecklistsproperly delegates the business logic to the domain layer, keeping the component lean and focused on rendering. The use ofcreateMemoensures reactive updates.packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (1)
14-119: LGTM! Consistent status presentation.The use of centralized
getStatusLabelandgetStatusStylefunctions ensures consistent status badge presentation across all components and eliminates inline styling logic.packages/web/src/components/project-ui/overview-tab/ChartSection.jsx (1)
6-6: LGTM! Simplified filtering logic.The unified filtering approach using
CHECKLIST_STATUS.COMPLETEDremoves unnecessary branching logic for single vs. dual reviewer modes, making the code cleaner and more maintainable.Also applies to: 150-163
packages/web/src/primitives/useProject/checklists.js (2)
7-7: LGTM! Centralized status initialization.Using
CHECKLIST_STATUS.PENDINGfor initialization instead of a magic string ensures consistency and type safety across the codebase.Also applies to: 87-87
483-485: LGTM! Auto-transition logic properly uses constants.The auto-transition from
PENDINGtoIN_PROGRESSon first edit correctly uses the centralizedCHECKLIST_STATUSenum, maintaining consistency with the broader status management refactor.packages/web/src/components/project-ui/ProjectView.jsx (1)
21-21: LGTM! Proper delegation to domain utilities.Replacing local tab counting logic with
getChecklistCountproperly centralizes the filtering logic in the domain layer, making the component cleaner and ensuring consistent counting logic across the application.Also applies to: 193-201
packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx (2)
9-10: Well-structured status-based filtering logic.The imports use correct aliases and the
awaitingReconcileChecklistslogic is consistent withReconcileStatusTag.jsx(lines 13-16). Both components use the same filtering pattern, which is appropriate since they operate on the same data model.Also applies to: 18-26
29-34: LGTM!The
startReconciliationfunction correctly guards against missing checklists before invoking the callback.packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (1)
13-18: LGTM!The status filtering and readiness check are correctly implemented using centralized constants.
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx (2)
54-56: Good implementation of mutual exclusion for reviewer selection.The
disabledValuesmemos correctly prevent selecting the same reviewer for both slots.
117-138: LGTM!The
inDialog={true}prop ensures proper dropdown positioning within the modal context, and theShowwrapper with a placeholder maintains layout during the ready state transition.packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx (3)
7-8: Clean refactor to centralized status utilities.The
isReadOnlyfunction now delegates toisEditable, keeping the component lean and aligned with centralized status management.Also applies to: 60-64
253-287: LGTM!The
handleToggleCompletefunction correctly:
- Guards against missing study data
- Uses
getNextStatusForCompletionfor context-aware status transitions- Provides dynamic toast messaging based on the resulting status
307-323: LGTM!The
getBackTabfunction correctly routes users based on checklist status and reviewer configuration.packages/web/src/constants/checklist-status.js (2)
8-13: Well-structured status enum.The string values are appropriate for persistence/serialization, and the enum provides a single source of truth for status values across the codebase.
69-100: The transition logic correctly prevents direct PENDING → COMPLETED, but thecanTransitionTovalidation is never enforced.The design is intentional: checklists must progress through IN_PROGRESS (automatic on first edit via
updateChecklistAnswerat line 484) before reaching terminal states. However,canTransitionTois defined but never called in the codebase. TheupdateChecklistfunction directly sets status without validation, meaning invalid transitions could occur if called with arbitrary status values. Either enforce validation inupdateChecklistusingcanTransitionTo, or remove the unused function.packages/web/src/lib/checklist-domain.js (3)
16-20: LGTM!The
isReconciledChecklistfunction correctly identifies reconciled checklists by theassignedTo === nullconvention.
90-104: Well-implemented reconciliation tab logic.The filter correctly identifies studies with 1-2 individual checklists awaiting reconciliation, covering both "waiting for one reviewer" and "ready to reconcile" states.
164-175: LGTM!The status determination logic is clear: single reviewer goes directly to
COMPLETED, dual reviewer entersAWAITING_RECONCILE.packages/ui/src/zag/Select.jsx (1)
104-120: LGTM!The
handleValueChangehandler correctly:
- Converts Ark UI's array format back to single value for single-select mode
- Prevents selection of disabled values
- Handles both single and multiple selection modes
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx (1)
70-71: Misleading comment: no delay is actually implemented.The comment states "Small delay to ensure Select components are ready" but
setSelectsReady(true)is called synchronously with no delay. Either remove the misleading comment or, if a delay is truly needed for Select component initialization, implement one withsetTimeout.Suggested fix (remove misleading comment)
- // Small delay to ensure Select components are ready before rendering setSelectsReady(true);
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
🧰 Additional context used
📓 Path-based instructions (14)
**/*
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Do not use emojis in code, comments, documentation, or commit messages
NEVER use emojis anywhere in code, comments, documentation, plan files, or commit messages. This includes unicode symbols. For UI icons, use solid-icons library or SVGs only.
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/web/src/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/**/*.{js,jsx,ts,tsx}: For UI icons, use thesolid-iconslibrary or SVGs only. Do not use emojis
Ensure browser compatibility for all frontend code (Safari is usually problematic)
Keep files small, focused, and modular. If a file exceeds a high number of lines, consider refactoring by extracting sub-modules into a folder with index.jsx and helper components, moving complex logic into separate utility files or primitives, or splitting large forms into section components
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
UsecreateMemofor derived values to ensure they update reactivelyUse import aliases from jsconfig.json instead of relative paths
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features in JavaScript/TypeScript code
Comments should explain why something is being done, not narrate what the code does. Avoid comments that repeat variable names or describe obvious code behavior.
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/web/src/components/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/components/**/*.{js,jsx,ts,tsx}: Use responsive design principles for UI components
Group related components in subdirectories with an index.js barrel export
Use Zag.js for UI components and design system
Zag component exist inpackages/web/src/components/zag/*and should be reused. Check the README.md in that folder for a list of existing components before adding new components and when debugging
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
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
Components should be lean and focused. They should not implement business logic; move that into stores, utilities, or primitives
Never have a component act as a God component coordinating multiple large concerns
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/{web,ui}/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
Group related components in subdirectories with barrel exports
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/{web,landing}/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
packages/{web,landing}/src/**/*.{jsx,tsx}: Use Ark UI components from @corates/ui package, not local component implementations
Use solid-icons library (e.g., solid-icons/bi, solid-icons/fi) for icon imports
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/web/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
packages/web/src/**/*.{jsx,tsx}: In SolidJS, do NOT prop-drill application state. Import stores directly where needed instead.
In SolidJS, do NOT destructure props. Access props.field directly or wrap in a function: () => props.field
In SolidJS components, components should receive at most 1-5 props (local config only, not shared state)
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/web/src/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)
In SolidJS, use createMemo for derived values
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/web/src/**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
packages/web/src/**/*.{js,ts,jsx,tsx}: Always usehandleFetchErrorfrom@/lib/error-utils.jsfor fetch calls in frontend code with options like{ showToast: true }for error handling
UsecreateFormErrorSignalsfrom@/lib/form-errors.jsfor form validation error handling with field-level and global error management
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}: Never throw string literals; always throw Error objects or return domain errors from API routes
Use error utility functions likeisErrorCodefrom@corates/sharedor@/lib/error-utils.jsto check specific error types instead of manual string comparisons
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
{packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursor/rules/solidjs.mdc)
{packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts}: Never destructure props in SolidJS components - destructuring breaks reactivity. Access props directly (e.g.,props.name) or wrap in a function (e.g.,const name = () => props.name) to maintain reactivity.
Import stores directly in components rather than prop-drilling store data through component hierarchies.
Use separate read and write patterns for stores: import the store directly for reading data (e.g.,projectStore.getProjectList()) and import action stores separately for writing (e.g.,projectActionsStore.createProject()).
UsecreateSignalfrom solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.
UsecreateStorefrom solid-js/store for managing complex objects and arrays that require granular reactivity, enabling fine-grained updates where only affected parts re-render.
UsecreateMemofrom solid-js for derived values that depend on reactive state, ensuring computed values update only when their dependencies change.
Always clean up effects that create subscriptions or timers using theonCleanupfunction from solid-js. Use effects sparingly, only when derived values won't work well.
Keep components lean and focused on rendering. Move business logic to stores (for shared state and operations), primitives (for reusable hooks/logic), or utilities (for pure functions).
Use theShowcomponent from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.
Use theForcomponent from solid-js for rendering lists. It provides better performance and keying compared to JavaScript's map function in JSX.
When manipulating children in wrapper components, use thechildrenhelper from solid-js to ensure proper reactivity and handling of child elements.
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/{web,ui}/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
packages/{web,ui}/**/*.{js,jsx,ts,tsx}: Import UI components from '@corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'
Always use 'solid-icons' library for icons. Never use emoji characters or text as icon replacements. Import from specific icon sets like 'solid-icons/bi', 'solid-icons/fi', 'solid-icons/ai', etc.
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/web/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
Use import aliases from 'packages/web/jsconfig.json' instead of relative paths. Aliases include: '@/' (src/), '@components/' (src/components/), '@auth-ui/' (src/components/auth-ui/), '@checklist-ui/' (src/components/checklist-ui/), '@project-ui/' (src/components/project-ui/), '@routes/' (src/routes/), '@primitives/' (src/primitives/), '@api/' (src/api/), '@config/' (src/config/), and '@lib/' (src/lib/)
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
packages/{web,ui}/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)
Use Tailwind CSS classes for styling components
Files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
🧠 Learnings (1)
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use `createSignal` from solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.
Applied to files:
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
🧬 Code graph analysis (1)
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx (2)
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (2)
members(30-30)studies(29-29)packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx (1)
currentStudy(50-52)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Workers Builds: corates
🔇 Additional comments (4)
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx (4)
28-38: Good use of reactive derivation for currentStudy.The pattern of using a reactive getter
studies()combined withcreateMemoensures the component always has the latest study data from the store. This aligns with similar patterns in the codebase (e.g.,ChecklistYjsWrapper.jsx).
54-56: Good UX improvement to prevent duplicate reviewer selection.The
disabledValuesmemos correctly prevent users from assigning the same person as both reviewers.
80-101: Correctly uses derived study for save operation.The
handleSavefunction properly usescurrentStudy()to get the latest study data from the store, ensuring consistency. The early return guard on line 82 is appropriate.Minor note: the dynamic import of
error-utils.json line 94 works but could be a static import at the top of the file for slightly better performance on the error path.
118-139: Good pattern: conditional rendering with layout-stable fallback.The
Showwrapper with a placeholder fallback maintains layout stability while the Select components initialize. TheinDialog={true}prop is correctly applied to both Select components for proper z-index handling within the modal context.
Summary by CodeRabbit
New Features
Improvements
Tests
✏️ Tip: You can customize this high-level summary in your review settings.