84 improve checklist reconcile and complete flow#86
Conversation
…moved around correctly, and inform user of state
WalkthroughThis PR deletes seven planning documents, refactors reconciliation-related UI across project tabs (todo, reconcile, completed, project view), adds a ReconcileStatusTag component, updates checklist completion flow with a confirmation dialog, tweaks navigation/counts, and changes the landing navbar logo image source. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45–60 minutes Areas requiring extra attention:
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ 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)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
corates | 0b2733a | Commit Preview URL | Dec 18 2025, 07:18 PM |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (7)
packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (2)
16-28: Edge case:waitingForReviewer()may return unexpected result when completed reviewer doesn't match study reviewers.If the completed checklist's
assignedTodoesn't matchstudy.reviewer1, the logic assumes it must bereviewer2. However, if data is inconsistent (e.g., a checklist assigned to a removed reviewer),waitingReviewerIdcould incorrectly point toreviewer1, or ifreviewer2is null/undefined, the badge would display "Waiting for Unknown".Consider adding defensive handling:
Suggested improvement
const waitingForReviewer = () => { if (isReady()) return null; const completed = completedChecklists(); if (completed.length !== 1) return null; const completedReviewerId = completed[0].assignedTo; + // Ensure completed reviewer is one of the assigned reviewers + if (completedReviewerId !== props.study.reviewer1 && completedReviewerId !== props.study.reviewer2) { + return null; + } // Find the other reviewer const waitingReviewerId = completedReviewerId === props.study.reviewer1 ? props.study.reviewer2 : props.study.reviewer1; + if (!waitingReviewerId) return null; return props.getAssigneeName(waitingReviewerId); };
30-42: Consider handling null in the fallback rendering.If
waitingForReviewer()returnsnull(when there are 0 or 2+ completed checklists, butisReady()is false due to data inconsistency), the badge would render "Waiting for " with no name.Suggested improvement
- fallback={ - <span class='inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800'> - Waiting for {waitingForReviewer()} - </span> - } + fallback={ + <Show when={waitingForReviewer()}> + {name => ( + <span class='inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800'> + Waiting for {name()} + </span> + )} + </Show> + }packages/web/src/components/project-ui/ReconcileStudyCard.jsx (1)
16-22: Note: DuplicatedcompletedChecklistsandisReadylogic.Both
ReconcileStudyCardandReconcileStatusTagdefine identicalcompletedChecklists()andisReady()computations. This is acceptable for component isolation, but if the logic needs to change in the future, it will need updates in multiple places.Consider extracting to a shared utility if this pattern expands further.
packages/web/src/components/project-ui/ProjectView.jsx (1)
183-190: The to-do filtering logic looks good.The implementation correctly identifies studies where the user is a reviewer and has work to complete. The logic appropriately includes both studies where the user has no checklist yet and those with non-completed checklists.
Optional: Clarify the comment for precision
The comment on line 183 could more accurately reflect that the filter includes studies with no checklists assigned to the user:
- // Count studies where user is a reviewer and has non-completed checklists to work on + // Count studies where user is a reviewer and has no checklist or has non-completed checklistspackages/web/src/components/project-ui/completed-tab/CompletedTab.jsx (1)
14-25: Filtering logic correctly distinguishes reviewer configurations.The implementation properly handles two workflows:
- Single-reviewer studies go directly to completed when the checklist is done
- Dual-reviewer studies require reconciliation before appearing as completed
This aligns well with the overall reconciliation flow improvements.
Optional: Consider extracting the isSingleReviewer pattern
The single-reviewer check pattern (
study.reviewer1 && !study.reviewer2) appears in multiple files (CompletedTab.jsx, CompletedStudyCard.jsx). You could extract this into a utility function for better maintainability:// packages/web/src/utils/studyHelpers.js (or similar) export const isSingleReviewerStudy = (study) => { return study?.reviewer1 && !study?.reviewer2; };Then import and use it:
- const isSingleReviewer = study.reviewer1 && !study.reviewer2; + const isSingleReviewer = isSingleReviewerStudy(study);packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx (2)
260-288: Unreachable code: thestatus === 'completed'check is redundant.Since
isReadOnly()(line 261) already returnstruewhenstatus === 'completed'(see lines 49-50), the function will return early before reaching the check on line 266. The toast message "Checklist Locked" will never be shown.Consider removing the redundant block or restructuring if the specific toast message is desired for this case.
🔎 Option 1: Remove the redundant block
async function handleToggleComplete() { if (isReadOnly()) return; const checklist = currentChecklist(); if (!checklist) return; - // If already completed, don't allow toggle back (checklist is locked) - if (checklist.status === 'completed') { - showToast.info('Checklist Locked', 'Completed checklists cannot be edited.'); - return; - } - // Show confirmation dialog before marking complete const confirmed = await confirmDialog.open({🔎 Option 2: Show specific toast for completed status
If the distinct toast message is intentional, check for completed status before the generic
isReadOnly()check:async function handleToggleComplete() { + const checklist = currentChecklist(); + if (!checklist) return; + + // If already completed, show specific locked message + if (checklist.status === 'completed') { + showToast.info('Checklist Locked', 'Completed checklists cannot be edited.'); + return; + } + if (isReadOnly()) return; - const checklist = currentChecklist(); - if (!checklist) return; - - // If already completed, don't allow toggle back (checklist is locked) - if (checklist.status === 'completed') { - showToast.info('Checklist Locked', 'Completed checklists cannot be edited.'); - return; - } // Show confirmation dialog before marking complete
356-365: Dead code: button's completed state is unreachable.This button is only rendered when
!isReadOnly()is true. SinceisReadOnly()returnstruewhenstatus === 'completed', the button will never be visible in the completed state. The ternary conditions checking forstatus === 'completed'(styling and text) will always evaluate to the false branch.Consider simplifying to remove the unreachable paths:
🔎 Simplify the button
<button onClick={handleToggleComplete} - class={`px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${ - currentChecklist()?.status === 'completed' ? - 'bg-green-100 text-green-700 hover:bg-green-200' - : 'bg-blue-600 text-white hover:bg-blue-700' - }`} + class='px-3 py-1.5 text-sm font-medium rounded-lg transition-colors bg-blue-600 text-white hover:bg-blue-700' > - {currentChecklist()?.status === 'completed' ? 'Completed' : 'Mark Complete'} + Mark Complete </button>
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
docs/plans/audit-logs-plan.md(0 hunks)docs/plans/cn-utility-migration.plan.md(0 hunks)docs/plans/dashboard-ux-improvements.plan.md(0 hunks)docs/plans/presence.plan.md(0 hunks)docs/plans/pricing-model.plan.md(0 hunks)docs/plans/stripe-implementation.plan.md(0 hunks)docs/plans/yjs-awareness.plan.md(0 hunks)packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx(6 hunks)packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx(1 hunks)packages/web/src/components/project-ui/ProjectHeader.jsx(1 hunks)packages/web/src/components/project-ui/ProjectView.jsx(3 hunks)packages/web/src/components/project-ui/ReconcileStudyCard.jsx(2 hunks)packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx(3 hunks)packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx(1 hunks)packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx(1 hunks)packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx(2 hunks)packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx(3 hunks)
💤 Files with no reviewable changes (7)
- docs/plans/yjs-awareness.plan.md
- docs/plans/dashboard-ux-improvements.plan.md
- docs/plans/cn-utility-migration.plan.md
- docs/plans/pricing-model.plan.md
- docs/plans/audit-logs-plan.md
- docs/plans/presence.plan.md
- docs/plans/stripe-implementation.plan.md
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
For UI icons, use the
solid-iconslibrary or SVGs only. Do not use emojis
Files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.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
Use Zod for schema and input validation
**/*.{js,jsx,ts,tsx}: Follow standard JavaScript/SolidJS/Cloudflare best practices
Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Keep files small, focused, and modular. If a file exceeds a high number of lines, consider refactoring by extracting sub-modules into a folder, moving complex logic into separate utility files or primitives, or splitting large forms into section components
Each file should handle one coherent responsibility
Use Zod for schema and input validation
Files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
packages/web/src/components/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/components/**/*.{jsx,tsx}: Use responsive design principles for UI components
Use Zag.js for UI components and design system
Reuse existing Zag components from packages/web/src/components/zag/* and check the README.md list before adding new components
Components should receive at most 1–5 props for local configuration only, not shared state
Components should be lean and focused on rendering, not implement business logic. Move business logic into stores, utilities, or primitives
Never have a component act as a God component coordinating multiple large concerns
packages/web/src/components/**/*.{jsx,tsx}: Group related components in subdirectories with anindex.jsbarrel export
Use Zag.js for UI components and design system
Zag components 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
Do NOT prop-drill application state. Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file. Import stores directly where needed instead of passing values through multiple components
Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context (when scoped to a feature)
With SolidJS, do not destructure props 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/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
packages/web/src/components/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Group related components in subdirectories with an index.js barrel export
Files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
packages/web/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/**/*.{jsx,tsx}: Do NOT prop-drill application state in SolidJS. Use external stores under packages/web/src/stores/ or component-relative stores instead
Do not destructure props in SolidJS components; access props directly or wrap them in a function to maintain reactivity
Use createMemo for derived values and createStore for complex state in SolidJS
packages/web/src/**/*.{jsx,tsx}: When you need to compute a value based on props or state in SolidJS, usecreateMemoto ensure it updates reactively
When you have complex state or state objects, use SolidJS'screateStorefor better performance and reactivity
You may create reusable logic in 'primitives' (hooks) that can be shared across components. This keeps components clean and focused on rendering
Files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
packages/web/src/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Create reusable logic in primitives (hooks) that can be shared across components
Files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
**/*.{js,jsx,ts,tsx,md,json,sql}
📄 CodeRabbit inference engine (.cursorrules)
Do not use emojis in code, comments, documentation, or commit messages
Files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{jsx,tsx}: For UI icons, use thesolid-iconslibrary or SVGs only. Do not use emojis
Use responsive design principles for UI components
Files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/completed-tab/CompletedTab.jsxpackages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
🧠 Learnings (12)
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Do not destructure props in SolidJS components; access props directly or wrap them in a function to maintain reactivity
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsx
📚 Learning: 2025-12-18T17:05:47.242Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-18T17:05:47.242Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : With SolidJS, do not destructure props as it breaks reactivity. Instead, access props directly from the props object or wrap them in a function to ensure they are always up-to-date
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Use createMemo for derived values and createStore for complex state in SolidJS
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Do NOT prop-drill application state in SolidJS. Use external stores under packages/web/src/stores/ or component-relative stores instead
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsx
📚 Learning: 2025-12-18T17:05:47.242Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-18T17:05:47.242Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : When you need to compute a value based on props or state in SolidJS, use `createMemo` to ensure it updates reactively
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
📚 Learning: 2025-12-18T17:05:47.242Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-18T17:05:47.242Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : When you have complex state or state objects, use SolidJS's `createStore` for better performance and reactivity
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsxpackages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : Create reusable logic in primitives (hooks) that can be shared across components
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsx
📚 Learning: 2025-12-18T17:05:47.242Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-18T17:05:47.242Z
Learning: Applies to **/*.{jsx,tsx} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to **/*.{jsx,tsx,js,ts} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsx
📚 Learning: 2025-12-18T17:05:47.242Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-18T17:05:47.242Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : You may create reusable logic in 'primitives' (hooks) that can be shared across components. This keeps components clean and focused on rendering
Applied to files:
packages/web/src/components/project-ui/ProjectHeader.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Reuse existing Zag components from packages/web/src/components/zag/* and check the README.md list before adding new components
Applied to files:
packages/web/src/components/project-ui/todo-tab/ToDoTab.jsxpackages/web/src/components/project-ui/ReconcileStudyCard.jsxpackages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsxpackages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
📚 Learning: 2025-12-18T17:05:47.242Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-18T17:05:47.242Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Zag components 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/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
🧬 Code graph analysis (6)
packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (10)
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (2)
currentUserId(23-23)studies(21-21)packages/web/src/components/project-ui/ProjectView.jsx (1)
studies(51-51)packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx (1)
studies(11-11)packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx (1)
studies(17-17)packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx (1)
studies(63-63)packages/web/src/components/project-ui/ReviewerAssignment.jsx (1)
studies(37-37)packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCard.jsx (1)
study(30-30)packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx (1)
study(28-28)packages/web/src/components/project-ui/all-studies-tab/study-card/StudyPdfSection.jsx (1)
study(29-29)packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (1)
study(29-29)
packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx (1)
packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx (1)
isSingleReviewer(16-16)
packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx (12)
packages/web/src/components/project-ui/ProjectView.jsx (1)
studies(51-51)packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (1)
studies(22-22)packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx (1)
studies(63-63)packages/web/src/components/project-ui/ReviewerAssignment.jsx (1)
studies(37-37)packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (1)
studies(21-21)packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCard.jsx (1)
study(30-30)packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx (1)
study(28-28)packages/web/src/components/project-ui/all-studies-tab/study-card/StudyPdfSection.jsx (1)
study(29-29)packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (1)
study(29-29)packages/web/src/primitives/useLocalChecklists.js (1)
checklists(71-71)packages/web/src/components/project-ui/ReconcileStudyCard.jsx (1)
completedChecklists(17-19)packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (1)
completedChecklists(11-12)
packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (1)
packages/web/src/components/project-ui/ReconcileStudyCard.jsx (2)
completedChecklists(17-19)isReady(22-22)
packages/web/src/components/project-ui/ProjectView.jsx (3)
packages/web/src/primitives/useProject/sync.js (1)
study(59-88)packages/web/src/components/project-ui/ReconcileStudyCard.jsx (1)
completedChecklists(17-19)packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx (1)
completedChecklists(11-12)
packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx (2)
packages/ui/src/zag/Dialog.jsx (1)
useConfirmDialog(243-321)packages/ui/src/zag/Toast.jsx (2)
showToast(121-139)showToast(121-139)
⏰ 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 (19)
packages/web/src/components/project-ui/ProjectHeader.jsx (1)
1-1: LGTM! Clean removal of unused import.Removing
createEffectalong with the logging side effect is a good cleanup. The component now only imports what it uses, and unnecessary console logging during the component lifecycle has been eliminated.packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx (1)
224-226: LGTM!The navigation target update from
ready-to-reconciletoreconcilecorrectly aligns with the tab renaming across the project.packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (2)
30-54: LGTM!The filtering logic correctly:
- Identifies studies where the current user is assigned as a reviewer
- Separates active (non-completed) checklists from completed ones
- Flags studies where the user needs to create a checklist
- Uses
createMemofor derived values as per SolidJS best practicesThe
_needsChecklistunderscore prefix appropriately indicates an internal/transient property.
74-81: LGTM!Clean empty state implementation using
solid-iconsas per coding guidelines, with clear messaging for users.packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx (2)
19-39: LGTM!The filtering logic correctly implements the new reconciliation workflow:
- Restricts to dual-reviewer studies (both
reviewer1andreviewer2required)- Excludes already-reconciled studies via
isReconciledcheck- Includes studies with 1-2 completed checklists, enabling the "waiting" state display
This aligns well with the new
ReconcileStatusTagcomponent behavior.
44-68: LGTM!The UI updates—renamed heading to "Reconciliation" and updated description—are consistent with the broader tab renaming in this PR.
packages/web/src/components/project-ui/ReconcileStudyCard.jsx (2)
73-85: LGTM!Good integration of
ReconcileStatusTag. The conditional rendering of reviewer names only whenisReady()is true prevents displaying incomplete information, and the callback syntax inShowcorrectly uses the accessor pattern.
87-98: LGTM!The button's disabled state with visual feedback (
bg-gray-200,cursor-not-allowed) provides clear UX indication when reconciliation isn't available.packages/web/src/components/project-ui/ProjectView.jsx (3)
193-202: Good improvement to reconciliation counting logic.The updated logic correctly identifies dual-reviewer studies ready for reconciliation. Lowering the threshold from requiring exactly 2 completed checklists to "at least 1" is a workflow improvement that allows reconciliation to begin as soon as the first reviewer completes their work.
The upper bound check (
<= 2) provides defensive validation against potential data integrity issues where more than 2 checklists might exist.
219-222: LGTM on tab configuration update.The tab rename to "Reconcile" is clearer and more concise, and correctly references the updated
getReconcileCountfunction.
276-276: Show condition correctly updated.The condition properly matches the new tab value 'reconcile'.
packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx (3)
1-5: Documentation clearly explains dual-mode behavior.The updated JSDoc accurately describes how the component handles both single-reviewer and dual-reviewer studies.
15-27: Well-structured reactive logic for checklist filtering.The implementation follows SolidJS best practices:
- Props are accessed directly without destructuring (preserves reactivity)
createMemois used appropriately for the derived checklist list- Filtering logic correctly mirrors the CompletedTab filtering behavior
63-67: Rendering logic correctly uses the memoized checklist filter.The component properly renders the filtered checklists and provides appropriate fallback messaging.
packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx (5)
8-8: LGTM!The
useConfirmDialogimport and initialization follow the established pattern from@corates/uiand are correctly placed at the component's top level.Also applies to: 19-19
49-50: LGTM!Extending
isReadOnly()to include the'completed'status correctly prevents edits to locked checklists and follows SolidJS reactive patterns.
307-315: LGTM!The
getBackTab()function correctly determines navigation based on checklist status and reviewer configuration. Since it's called within theonClickhandler, it will read current reactive values at click time.
318-326: LGTM!The
ConfirmDialogComponentis correctly integrated and the back button navigation properly uses the dynamic tab selection.
345-353: LGTM!The status badge correctly differentiates between "Completed" (green) and "Read-only" (gray for reconciled) states with appropriate visual styling.
Summary by CodeRabbit
New Features
Improvements
Chores
✏️ Tip: You can customize this high-level summary in your review settings.