Skip to content

84 improve checklist reconcile and complete flow#86

Merged
InfinityBowman merged 3 commits into
mainfrom
84-improve-checklist-reconcile-and-complete-flow
Dec 18, 2025
Merged

84 improve checklist reconcile and complete flow#86
InfinityBowman merged 3 commits into
mainfrom
84-improve-checklist-reconcile-and-complete-flow

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Dec 18, 2025

Summary by CodeRabbit

  • New Features

    • Confirmation dialog when marking checklists completed (locks checklist)
    • Reconciliation status badge indicating ready/waiting states
  • Improvements

    • Renamed tab to "Reconciliation" and reorganized reconciliation workflow
    • Smarter checklist filtering for single vs dual-reviewer flows; reconcile button enabled only when ready
    • To Do view now shows user-specific active checklists and improved empty-state UI
    • Updated navbar logo
  • Chores

    • Removed several planning documents from the repo

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

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

coderabbitai Bot commented Dec 18, 2025

Walkthrough

This 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

Cohort / File(s) Summary
Documentation Plans Removal
docs/plans/audit-logs-plan.md, docs/plans/cn-utility-migration.plan.md, docs/plans/dashboard-ux-improvements.plan.md, docs/plans/presence.plan.md, docs/plans/pricing-model.plan.md, docs/plans/stripe-implementation.plan.md, docs/plans/yjs-awareness.plan.md
Deleted seven planning/specification documents covering audit logging, cn() migration, dashboard UX, presence, pricing, Stripe integration, and Y.js awareness.
Reconciliation UI & Counts
packages/web/src/components/project-ui/ProjectView.jsx, packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx, packages/web/src/components/project-ui/ReconcileStudyCard.jsx
Renamed "Ready to Reconcile" → "Reconciliation"; changed filtering to include 1–2 completed checklists for dual-reviewer workflows; updated tab value to reconcile; added readiness gating and conditional reviewer display.
New Reconcile Status Component
packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
Added ReconcileStatusTag component rendering "Ready" or "Waiting for {reviewer}" badges based on completed checklists and reviewer assignments.
Completed Tab & Card Logic
packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx, packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
Differentiated single- vs dual-reviewer behavior: single-reviewer shows completed checklists; dual-reviewer shows reconciled checklists; updated display selection logic.
To‑Do Tab Filtering
packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
Restricts studies to those where current user is a reviewer; computes user-specific active (non-completed) checklists and a _needsChecklist flag; filters displayed studies accordingly and updates empty-state UI.
Checklist Completion Flow
packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
Made handleToggleComplete async; added useConfirmDialog confirmation before marking completed; treats completed as read-only; injects confirm dialog component into header; dynamic back-navigation based on checklist status.
Navigation Target Update
packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
Changed cancel navigation to use the new reconcile tab (?tab=reconcile).
Header Cleanup
packages/web/src/components/project-ui/ProjectHeader.jsx
Removed a createEffect that logged the project name (deleted console.log side-effect).
Landing Navbar Logo
packages/landing/src/components/Navbar.jsx
Swapped logo image source from /CoRATES.svg to /logo.svg.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–60 minutes

Areas requiring extra attention:

  • Reconciliation filtering and readiness logic across ReconcileTab.jsx, ReconcileStudyCard.jsx, ProjectView.jsx, and ReconcileStatusTag.jsx.
  • Checklist completion flow changes in ChecklistYjsWrapper.jsx (async confirmation, read-only semantics, UI injection).
  • Single- vs dual-reviewer branching in CompletedTab.jsx and CompletedStudyCard.jsx.
  • Consistency of tab value/name changes (ready-to-reconcilereconcile) across navigation and routing.
  • ToDoTab user-specific checklist selection and _needsChecklist flag correctness.

Possibly related PRs

  • #71 — Adds the @corates/ui package and UI primitives (e.g., useConfirmDialog) now imported and used by ChecklistYjsWrapper.jsx.
  • #77 — Overlapping checklist and reconciliation UI changes; touches similar checklist-ui components and flows.
  • #83 — Modifies project UI tabs and reconciliation-related components (ProjectView, ToDoTab, ReconcileTab, CompletedTab), indicating related refactoring.

Poem

🐰 I nudged the plans into a drawer,
Tabs renamed and badges soar,
Checklists lock with one brave click,
Reviewers wait, the UI's slick —
A hop, a cheer, the code's encore! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% 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 accurately describes the main changes in the PR, which focus on improving the checklist reconciliation and completion workflows across multiple components.
✨ 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 84-improve-checklist-reconcile-and-complete-flow

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59657d8 and 0b2733a.

⛔ Files ignored due to path filters (2)
  • packages/landing/public/favicon.svg is excluded by !**/*.svg
  • packages/landing/public/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • packages/landing/src/components/Navbar.jsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/landing/src/components/Navbar.jsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: corates

Comment @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 18, 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 0b2733a Commit Preview URL Dec 18 2025, 07:18 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 (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 assignedTo doesn't match study.reviewer1, the logic assumes it must be reviewer2. However, if data is inconsistent (e.g., a checklist assigned to a removed reviewer), waitingReviewerId could incorrectly point to reviewer1, or if reviewer2 is 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() returns null (when there are 0 or 2+ completed checklists, but isReady() 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: Duplicated completedChecklists and isReady logic.

Both ReconcileStudyCard and ReconcileStatusTag define identical completedChecklists() and isReady() 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 checklists
packages/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: the status === 'completed' check is redundant.

Since isReadOnly() (line 261) already returns true when status === '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. Since isReadOnly() returns true when status === 'completed', the button will never be visible in the completed state. The ternary conditions checking for status === '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

📥 Commits

Reviewing files that changed from the base of the PR and between d68cdf2 and 59657d8.

📒 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-icons library or SVGs only. Do not use emojis

Files:

  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/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 an index.js barrel export
Use Zag.js for UI components and design system
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
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.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/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, use createMemo to ensure it updates reactively
When you have complex state or state objects, use SolidJS's createStore for 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.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/checklist-ui/ChecklistYjsWrapper.jsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{jsx,tsx}: For UI icons, use the solid-icons library or SVGs only. Do not use emojis
Use responsive design principles for UI components

Files:

  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedTab.jsx
  • packages/web/src/components/checklist-ui/compare/ReconciliationWrapper.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/web/src/components/project-ui/completed-tab/CompletedStudyCard.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/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.jsx
  • packages/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.jsx
  • packages/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.jsx
  • packages/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.jsx
  • packages/web/src/components/project-ui/ReconcileStudyCard.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileStatusTag.jsx
  • packages/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 createEffect along 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-reconcile to reconcile correctly 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:

  1. Identifies studies where the current user is assigned as a reviewer
  2. Separates active (non-completed) checklists from completed ones
  3. Flags studies where the user needs to create a checklist
  4. Uses createMemo for derived values as per SolidJS best practices

The _needsChecklist underscore prefix appropriately indicates an internal/transient property.


74-81: LGTM!

Clean empty state implementation using solid-icons as 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:

  1. Restricts to dual-reviewer studies (both reviewer1 and reviewer2 required)
  2. Excludes already-reconciled studies via isReconciled check
  3. Includes studies with 1-2 completed checklists, enabling the "waiting" state display

This aligns well with the new ReconcileStatusTag component 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 when isReady() is true prevents displaying incomplete information, and the callback syntax in Show correctly 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 getReconcileCount function.


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)
  • createMemo is 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 useConfirmDialog import and initialization follow the established pattern from @corates/ui and 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 the onClick handler, it will read current reactive values at click time.


318-326: LGTM!

The ConfirmDialogComponent is 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.

@InfinityBowman InfinityBowman merged commit 38a48f2 into main Dec 18, 2025
3 checks passed
@InfinityBowman InfinityBowman deleted the 84-improve-checklist-reconcile-and-complete-flow branch December 18, 2025 19:26
@coderabbitai coderabbitai Bot mentioned this pull request Dec 27, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Jan 18, 2026
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.

Improve checklist reconcile and complete flow

1 participant