Skip to content

137 checklist status improvements#138

Merged
InfinityBowman merged 6 commits into
mainfrom
137-checklist-status-improvements
Dec 24, 2025
Merged

137 checklist status improvements#138
InfinityBowman merged 6 commits into
mainfrom
137-checklist-status-improvements

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Dec 24, 2025

Summary by CodeRabbit

  • New Features

    • Contact page text updated with explicit early-access subject guidance
    • Select control gains dialog-aware behavior, multi-select/deselect options, and improved overlay layering
  • Improvements

    • Introduced centralized checklist statuses and utilities (labels, styles, transitions)
    • Reconciliation and checklist views now driven by status and shared domain utilities; counts and tab logic unified
    • Checklist persistence/sync no longer includes legacy reconciled flag
  • Tests

    • Adjusted reconciliation test expectations to match status-driven behavior

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

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

coderabbitai Bot commented Dec 24, 2025

📝 Walkthrough

Walkthrough

Centralizes 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

Cohort / File(s) Summary
Landing Page Updates
packages/landing/src/routes/contact.jsx
Edit contact copy: added feedback & early-access topics and instruction to use "Early Access Request" as subject.
UI Select Component
packages/ui/src/constants/zIndex.js, packages/ui/src/index.d.ts, packages/ui/src/zag/Select.jsx, packages/ui/src/zag/index.js
Add SELECT z-index; add inDialog?: boolean to SelectProps; refactor Select to use Ark UI composition API, expose useSelect, and add props (deselectable, closeOnSelect, multiple, positioning, inDialog, arkProps).
Checklist Status Constants
packages/web/src/constants/checklist-status.js
New CHECKLIST_STATUS enum and helpers: isEditable, getStatusLabel, getStatusStyle, canTransitionTo.
Checklist Domain Utilities
packages/web/src/lib/checklist-domain.js
New domain APIs for tab/filtering and reconciliation: isReconciledChecklist, getTodoChecklists, getCompletedChecklists, getReconciliationChecklists, shouldShowInTab, getStudiesForTab, getChecklistCount, getNextStatusForCompletion, findReconciledChecklist, getInProgressReconciledChecklists.
Reconciliation Logic & Tests
packages/web/src/AMSTAR2/checklist-compare.js, packages/web/src/ROBINS-I/checklist-compare.js, packages/web/src/AMSTAR2/__tests__/checklist-compare.test.js, packages/web/src/utils/reconciliation.js, packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
Remove isReconciled usage/field; switch to CHECKLIST_STATUS-based checks; adjust reconciled checklist creation/selection flow; remove isStudyInReconciliation export.
Checklist Creation / Sync
packages/web/src/primitives/useProject/checklists.js, packages/web/src/primitives/useProject/sync.js
Initialize and transition status using CHECKLIST_STATUS; remove isReconciled from creation and Y-Doc sync paths.
Checklist UI & Interaction Updates
packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx, packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
Replace read-only checks with isEditable(status); add study presence guards; use inDialog on Selects; compute nextStatus via domain helper when completing.
Tabs, Cards & Badges
multiple files under packages/web/src/components/project-ui/..., packages/web/src/components/sidebar/ChecklistTreeItem.jsx
Replace inline status strings and local styling with CHECKLIST_STATUS and helpers (getStatusLabel/getStatusStyle); delegate tab filtering/counting to checklist-domain utilities (getStudiesForTab, getChecklistCount, getCompletedChecklists, getReconciliationChecklists).

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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~70 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 A hop through status, oh what cheer!

No more reconciled whispers unclear;
AWAITING_RECONCILE takes the stage,
Enum-driven, the modern age!
Select finds height with inDialog's grace — a rabbit's happy trace.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.32% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'checklist status improvements' accurately summarizes the core changes: migration from boolean isReconciled flag and hardcoded status strings to a centralized CHECKLIST_STATUS enum with supporting utilities and domain logic across the codebase.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 137-checklist-status-improvements

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

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

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

Deploying with  Cloudflare Workers  Cloudflare Workers

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

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
packages/landing/src/routes/contact.jsx (1)

184-207: Consider using SolidJS Show component for conditional rendering.

The ternary operator (line 184) and logical AND operators (lines 196, 202) for conditional rendering could be replaced with the Show component 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 Show component 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 when props.getAssigneeName returns falsy value.

The waitingForReviewer function returns the result of props.getAssigneeName(waitingReviewerId) directly at line 31. If this returns null or undefined, 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 with selectsReady.

The effect tracks props.study?.id, props.open, and currentStudy(), but setSelectsReady(true) is called inside the if (isOpen && studyId && study) branch. However, selectsReady is never reset to false when 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 selectsReady at 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 mixing props and merged.

Lines 65-72 create accessors that access both props and merged, but some values like items and disabledValues are also in local from splitProps. This could lead to confusion:

  • items() uses props.items but items is also in local
  • placeholder() uses both props.placeholder and merged.placeholder

Consider consistently using either local or merged for 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 inDialog and 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

📥 Commits

Reviewing files that changed from the base of the PR and between acb1000 and 3697045.

📒 Files selected for processing (28)
  • packages/landing/src/routes/contact.jsx
  • packages/ui/src/constants/zIndex.js
  • packages/ui/src/index.d.ts
  • packages/ui/src/zag/Select.jsx
  • packages/ui/src/zag/index.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
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/lib/checklist-domain.js
  • packages/web/src/primitives/useProject/checklists.js
  • packages/web/src/primitives/useProject/sync.js
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/ui/src/index.d.ts
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/landing/src/routes/contact.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/ui/src/constants/zIndex.js
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/ui/src/zag/index.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/primitives/useProject/checklists.js
  • packages/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 the solid-icons library 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
Use createMemo for derived values to ensure they update reactively

Use import aliases from jsconfig.json instead of relative paths

Files:

  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/ui/src/index.d.ts
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/landing/src/routes/contact.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/ui/src/constants/zIndex.js
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/ui/src/zag/index.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/primitives/useProject/checklists.js
  • packages/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 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
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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/landing/src/routes/contact.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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 use handleFetchError from @/lib/error-utils.js for fetch calls in frontend code with options like { showToast: true } for error handling
Use createFormErrorSignals from @/lib/form-errors.js for form validation error handling with field-level and global error management

Files:

  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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 like isErrorCode from @corates/shared or @/lib/error-utils.js to check specific error types instead of manual string comparisons

Files:

  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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()).
Use createSignal from solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.
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.
Use createMemo from 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 the onCleanup function 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 the Show component from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.
Use the For component 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 the children helper from solid-js to ensure proper reactivity and handling of child elements.

Files:

  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/landing/src/routes/contact.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/ui/src/index.d.ts
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/ui/src/constants/zIndex.js
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/ui/src/zag/index.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/primitives/useProject/checklists.js
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/utils/reconciliation.js
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/constants/checklist-status.js
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/lib/checklist-domain.js
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx
  • packages/web/src/components/project-ui/ChecklistRow.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/ui/src/zag/index.js
  • packages/web/src/primitives/useProject/checklists.js
  • packages/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.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • packages/ui/src/zag/index.js
  • packages/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.jsx
  • packages/web/src/components/sidebar/ChecklistTreeItem.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • 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,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.jsx
  • packages/web/src/components/project-ui/overview-tab/ChartSection.jsx
  • 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,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.jsx
  • packages/ui/src/zag/index.js
  • packages/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.jsx
  • packages/ui/src/zag/index.js
  • packages/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.js
  • packages/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.js
  • packages/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 inDialog prop 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 include todoChecklists and _needsChecklist flags, 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_RECONCILE and the isReconciledChecklist helper. 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_STATUS and 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 isReconciled flag 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 previous isReconciled flag 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 getStudiesForTab from 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. The userId is correctly passed as null since 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 getStudiesForTab from 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() and getStatusLabel() helpers, ensuring consistent status display across the application. The Show wrapper 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 new inDialog prop 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_STATUS constants and the use of shouldShowInTab for 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 getStatusLabel and getStatusStyle functions 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 useSelect hook alongside the Select component 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 getCompletedChecklists properly delegates the business logic to the domain layer, keeping the component lean and focused on rendering. The use of createMemo ensures reactive updates.

packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (1)

14-119: LGTM! Consistent status presentation.

The use of centralized getStatusLabel and getStatusStyle functions 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.COMPLETED removes 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.PENDING for 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 PENDING to IN_PROGRESS on first edit correctly uses the centralized CHECKLIST_STATUS enum, 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 getChecklistCount properly 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 awaitingReconcileChecklists logic is consistent with ReconcileStatusTag.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 startReconciliation function 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 disabledValues memos 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 the Show wrapper 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 isReadOnly function now delegates to isEditable, keeping the component lean and aligned with centralized status management.

Also applies to: 60-64


253-287: LGTM!

The handleToggleComplete function correctly:

  1. Guards against missing study data
  2. Uses getNextStatusForCompletion for context-aware status transitions
  3. Provides dynamic toast messaging based on the resulting status

307-323: LGTM!

The getBackTab function 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 the canTransitionTo validation is never enforced.

The design is intentional: checklists must progress through IN_PROGRESS (automatic on first edit via updateChecklistAnswer at line 484) before reaching terminal states. However, canTransitionTo is defined but never called in the codebase. The updateChecklist function directly sets status without validation, meaning invalid transitions could occur if called with arbitrary status values. Either enforce validation in updateChecklist using canTransitionTo, or remove the unused function.

packages/web/src/lib/checklist-domain.js (3)

16-20: LGTM!

The isReconciledChecklist function correctly identifies reconciled checklists by the assignedTo === null convention.


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 enters AWAITING_RECONCILE.

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

104-120: LGTM!

The handleValueChange handler correctly:

  1. Converts Ark UI's array format back to single value for single-select mode
  2. Prevents selection of disabled values
  3. Handles both single and multiple selection modes

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
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 with setTimeout.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 92deb6a and f317180.

📒 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 the solid-icons library 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
Use createMemo for derived values to ensure they update reactively

Use 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 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
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 use handleFetchError from @/lib/error-utils.js for fetch calls in frontend code with options like { showToast: true } for error handling
Use createFormErrorSignals from @/lib/form-errors.js for 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 like isErrorCode from @corates/shared or @/lib/error-utils.js to 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()).
Use createSignal from solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.
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.
Use createMemo from 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 the onCleanup function 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 the Show component from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.
Use the For component 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 the children helper 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 with createMemo ensures 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 disabledValues memos correctly prevent users from assigning the same person as both reviewers.


80-101: Correctly uses derived study for save operation.

The handleSave function properly uses currentStudy() 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.js on 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 Show wrapper with a placeholder fallback maintains layout stability while the Select components initialize. The inDialog={true} prop is correctly applied to both Select components for proper z-index handling within the modal context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checklist status improvements

2 participants